go-packagex

module
v6.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2021 License: MIT

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL