# README
go-packagex
Extra helpers for Go (Go 1.11+).
Import path:
import "github.com/mgenware/go-packagex/v5/<sub_package>"
Packages
strconvx
Overview:
- Quick
ParseXXX
functions withoutbase
orbitSize
parameters.
stringsx
Overview:
SubString
for Unicode chars(rune
),SubStringFromStart
,SubStringToEnd
.Truncate
.
mathx
Overview:
Min
,Max
forint
,int64
,uint
,uint64
andbyte
types.Abs
forint
andint64
.
slicex
Overview:
- Check for deep equality for slices (types supported:
byte
,int
,uint
,int64
,uint64
).
iox
Overview:
- Read text file.
- Check if a file/directory exists.
httpx
Overview:
- Set HTTP response
Content-Type
to common MIME types or from an file extension.
dbx
Overview:
- Helper function to start a database transaction.
- Convert
Result.LastInsertId
touint64
,int
,uint
. - Convert
Result.RowsAffected
touint64
,int
,uint
. - Limit number of rows affected.
- Common interface definition for
database/sql
package.
templatex
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
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