go-tools

module
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0

README

go-tools Build Status GoDoc License

A utility tool library of Golang.

The current version is v6 to support Semantic Import Versioning. See Doc.

Announcement

These packages only depend on the standard libraries, not any third-part packages.

The v6 version requires Go1.11+.

Installation

$ go get -u github.com/xgfone/go-tools/v6
V5
$ go1.x  get -u github.com/xgfone/go-tools
$ go1.11 get -u github.com/xgfone/go-tools@v5.13.0+incompatible
$ go1.12 get -u github.com/xgfone/go-tools@v5.13.0+incompatible
$ GONOSUMDB="*" go1.13 get -u github.com/xgfone/go-tools@v5.13.0+incompatible

Subpackages

Notice:

subpackage notice
cache Supply some caches, such as LRUCache. Notice: LRUCache is copied from github.com/youtube/vitess/go/cache.
execution execution executes a command line program in a new process and returns an output.
file Some convenient functions about the file operation.
function Collect 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.
io2 The supplement of the standard library of io.
json2 The supplement of the standard library of json.
lifecycle The manager of the lifecycle of some apps in a program.
net2 The supplement of the standard library net, such as some helpers about net.
option Supply a type to represent the optional value referring to Option in Rust.
pools Some simple convenient pools, such as BytesPool, BufferPool, ResourcePool, etc.
signal2 The supplement of the standard library of signal, such as HandleSignal.
sort2 The supplement of the standard library of sort.
strings2 The supplement of the standard library of strings.
sync2 The supplement of the standard library sync, such as some atomic types.
tag Find and get the tags in a struct.
types Some assistant functions about type, such as the type validation and conversion, etc.
wait Poll 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.

Directories

Path Synopsis
Package cache implements a LRU cache.
Package cache implements a LRU cache.
Package execution executes a command line program in a new process and returns a output.
Package execution executes a command line program in a new process and returns a output.
Package file supplies some convenient functions about the file operation.
Package file supplies some convenient functions about the file operation.
Package function supplies some convenient functions, such as calling a function or method dynamically, and getting a integer range between the maximal and the minimum.
Package function supplies some convenient functions, such as calling a function or method dynamically, and getting a integer range between the maximal and the minimum.
Package io2 is the supplement of the standard library of `io`.
Package io2 is the supplement of the standard library of `io`.
Package json2 is the supplement of the standard library of `json`.
Package json2 is the supplement of the standard library of `json`.
Package lifecycle offers a manager of the lifecycle of some apps in a program.
Package lifecycle offers a manager of the lifecycle of some apps in a program.
Package net2 is the supplement of the standard library `net`.
Package net2 is the supplement of the standard library `net`.
Package option is used to represent an optional value referring to Option in Rust.
Package option is used to represent an optional value referring to Option in Rust.
Package pools supplies some simple convenient pools, such as `BufferPool`, `ResourcePool`, etc.
Package pools supplies some simple convenient pools, such as `BufferPool`, `ResourcePool`, etc.
Package signal2 is the supplement of the standard library of `signal`, such as `HandleSignal`.
Package signal2 is the supplement of the standard library of `signal`, such as `HandleSignal`.
Package sort2 is the supplement of the standard library of `sort`.
Package sort2 is the supplement of the standard library of `sort`.
Package strings2 is the supplement of the standard library of `strings`.
Package strings2 is the supplement of the standard library of `strings`.
Package sync2 is the supplement of the standard library `sync`.
Package sync2 is the supplement of the standard library `sync`.
Package tag is used to find and get the tags in a struct.
Package tag is used to find and get the tags in a struct.
Package types supplies some assistant functions about type, such as the type validation and conversion, etc.
Package types supplies some assistant functions about type, such as the type validation and conversion, etc.
Package wait provides tools for polling or listening for changes to a condition.
Package wait provides tools for polling or listening for changes to a condition.

Jump to

Keyboard shortcuts

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