Categorygithub.com/xgfone/go-utils
repository
4.0.0+incompatible
Repository: https://github.com/xgfone/go-utils.git
Documentation: pkg.go.dev

# 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
No description provided by the author
No description provided by the author
No description provided by the author

# README

go-tools

A utility tool library of Golang.

The current version is v4. See Doc.

Announcement

These packages only depend on the standard libraries, not any third-part packages. Go1.7+ will be supported.

Installation

$ go get -u github.com/xgfone/go-tools

Test

go test github.com/xgfone/go-tools/...

Subpackages

Notice:

subpackagenotice
cacheSupply some caches, such as LRUCache. Notice: LRUCache is copied from github.com/youtube/vitess/go/cache.
executionexecution executes a command line program in a new process and returns an output.
fileSome convenient functions about the file operation.
functionCollect some convenient funtions, for example, calling a function or method dynamically, comparing two values, getting a integer range, determining whether a value is in a map or slice, etc.
io2The supplement of the standard library of io.
lifecycleThe manager of the lifecycle of some apps in a program.
net2The supplement of the standard library net, such as some helpers about net.
net2/http2The supplement of the standard library http, not the protocal http2.
poolsSome simple convenient pools, such as BytesPool, BufferPool, ResourcePool, etc.
signal2The supplement of the standard library of signal, such as HandleSignal.
sort2The supplement of the standard library of sort.
sync2The supplement of the standard library sync, such as some atomic types.
tagFind and get the tags in a struct.
typesSome assistant functions about type, such as the type validation and conversion, etc.
waitPoll or listen for changes to a condition. It's copied from k8s.io/apimachinery/pkg/util/wait.

Example

See the test file of each subpackage.