Categorygithub.com/mgenware/go-packagex/v6
module
6.2.1
Repository: https://github.com/mgenware/go-packagex.git
Documentation: pkg.go.dev

# README

go-packagex

Build

Extra helpers for Go (Go 1.16+).

Import path:

import "github.com/mgenware/go-packagex/v6/<sub_package>"

Packages

strconvx

GoDoc

Overview:

  • Quick ParseXXX functions without base or bitSize parameters.

stringsx

GoDoc

Overview:

  • SubString for Unicode chars(rune), SubStringFromStart, SubStringToEnd.
  • Truncate.

mathx

GoDoc

Overview:

  • Min, Max for int, int64, uint, uint64 and byte types.
  • Abs for int and int64.

slicex

GoDoc

Overview:

  • Check for deep equality for slices (types supported: byte, int, uint, int64, uint64).

iox

GoDoc

Overview:

  • Read text file.
  • Check if a file/directory exists.

httpx

GoDoc

Overview:

  • Set HTTP response Content-Type to common MIME types or from an file extension.

dbx

GoDoc

Overview:

  • Helper function to start a database transaction.
  • Convert Result.LastInsertId to uint64, int, uint.
  • Convert Result.RowsAffected to uint64, int, uint.
  • Limit number of rows affected.
  • Common interface definition for database/sql package.

templatex

GoDoc

Note that templatex is built upon the text/template package, not the html/template.

Overview:

  • Helpers for template parsing and executing.
  • A wrapper of text/template Template, which can load template from a file and provide optional reloading support (useful in development mode).

jsonx

GoDoc

Overview:

  • Fetch values of various types from a loosely typed map map[string]interface{}.
  • Helper to marshal a loosely typed map map[string]interface{} from an array of bytes.

License

MIT

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author