various libs or tools for Golang
exp
holds experimental packages and defines variousslog
MultiHandler
might be useful for write log toRotateHandler
might be useful for write logtime
, BurstLimiter controls how frequently events are allowed to happen.
PutToken
PutTokenN
. The difference istime/rate.Limiter
initially full and refilled at rate r tokens per second.Reserve
ReserveN
into account when allowing future events and Wait
or WaitN
blocks until lim permits n events toGenerator
in python or ES6, with yield and next statements.NullDuration represents an interface that may be null. NullDuration implements the Scanner interface so it can be used as a scan destination, similar to sql.NullString.
NullJson represents an interface that may be null. NullJson implements the Scanner interface so it can be used as a scan destination, similar to sql.NullString. Deprecate, use go-nulljson instead. For more information, see: https://pkg.go.dev/github.com/searKing/golang/tools/go-nulljson
go generate is only useful if you have tools to use it with! Here is an incomplete list of useful tools that generate code.
go-syncmap — Generates Go code using a package as a generic template for sync.Map.
go-syncpool — Generates Go code using a package as a generic template for sync.Pool.
go-atomicvalue — Generates Go code using a package as a generic template for atomic.Value.
go-option — Generates Go code using a package as a graceful option.
go-nulljson — Generates Go code using a package as a generic template that implements sql.Scanner and sql.Valuer.
go-enum — Generates Go code using a package as a generic template, which implements interface fmt.Stringer | binary | json | text | sql | yaml for enums.
go-import — Performs auto import of non go files.
go-sqlx — Generates Go code using a package as a generic template that implements sqlx.