README
¶
golang
Useful libs or tools for Golang
GoLibs
- generator — Generator behaves like Generator in python or ES6, with yield and next statements.
- signal — Signal enhances signal.Notify with the stacktrace of cgo.
- sql — Enhance go std sql.
- NullDuration -
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 -
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/cmd/go-nulljson
- NullDuration -
- ternary_search_tree — A type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two.
- mux — Mux is a generic Go library to multiplex connections based on their payload. Using mux, you can serve gRPC, SSH, HTTPS, HTTP, Go RPC, and pretty much any other protocol on the same TCP listener.
- SniffReader — A Reader that allows sniff and read from the provided input reader. data is buffered if Sniff(true) is called. buffered data is taken first, if Sniff(false) is called.
- multiple_prefix - Prefixes for decimal and binary multiples, Prefixes for decimal multiples, Prefixes for binary multiples.
- flag — Enhance go std flag, such as StringSlice that is a flag.Value that accumulates strings, e.g. --flag=one --flag=two would produce []string{"one", "two"}.
- goroutine — goroutine is a collection of apis about goroutine.
- ID() — returns goroutine id of the goroutine that calls it.
- Lock — represents a goroutine ID, with goroutine ID checked, that is whether GoRoutines of lock newer and check caller differ.
- hashring — hashring provides a consistent hashing function, read more about consistent hashing on wikipedia: Consistent_hashing.
GoGenerateTools
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.
Documentation
¶
There is no documentation for this package.
Directories
¶
Path | Synopsis |
---|---|
container/hashring
Package hashring provides a consistent hashing function.
|
Package hashring provides a consistent hashing function. |
container/slice
A sequence of elements supporting sequential and parallel aggregate operations.
|
A sequence of elements supporting sequential and parallel aggregate operations. |
container/stack
stack is a [stack](http://en.wikipedia.org/wiki/Stack_(abstract_data_type%29) is a last-in last-out data structure.
|
stack is a [stack](http://en.wikipedia.org/wiki/Stack_(abstract_data_type%29) is a last-in last-out data structure. |
container/stream
A sequence of elements supporting sequential and parallel aggregate operations.
|
A sequence of elements supporting sequential and parallel aggregate operations. |
container/traversal
https://en.wikipedia.org/wiki/Breadth-first_search https://en.wikipedia.org/wiki/Depth-first_search https://en.wikipedia.org/wiki/Tree_traversal#In-order_(LNR) https://en.wikipedia.org/wiki/Tree_traversal#Out-order_(RNL) https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(LRN) https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(LRN)
|
https://en.wikipedia.org/wiki/Breadth-first_search https://en.wikipedia.org/wiki/Depth-first_search https://en.wikipedia.org/wiki/Tree_traversal#In-order_(LNR) https://en.wikipedia.org/wiki/Tree_traversal#Out-order_(RNL) https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(LRN) https://en.wikipedia.org/wiki/Tree_traversal#Post-order_(LRN) |
container/trie_tree/ternary_search_tree
https://en.wikipedia.org/wiki/Ternary_search_tree In computer science, a ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two.
|
https://en.wikipedia.org/wiki/Ternary_search_tree In computer science, a ternary search tree is a type of trie (sometimes called a prefix tree) where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two. |
crypto/auth
https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/ https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml
|
https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/ https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml |
crypto/rand
package rand_ Creating Random Strings in Go
|
package rand_ Creating Random Strings in Go |
net/ice
https://tools.ietf.org/html/rfc7064 https://tools.ietf.org/html/rfc7064 3.2.
|
https://tools.ietf.org/html/rfc7064 https://tools.ietf.org/html/rfc7064 3.2. |
net/mux
Package mux is a library to multiplex network connections based on their payload.
|
Package mux is a library to multiplex network connections based on their payload. |
os/signal/cgo
Package cgo contains runtime support for code generated by the cgo tool.
|
Package cgo contains runtime support for code generated by the cgo tool. |
pragma
Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties.
|
Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties. |
testing/leakcheck
Package leakcheck contains functions to check leaked goroutines.
|
Package leakcheck contains functions to check leaked goroutines. |
time/rate
The key observation and some code (shr) is borrowed from golang.org/x/time/rate/rate.go
|
The key observation and some code (shr) is borrowed from golang.org/x/time/rate/rate.go |
util/function/consumer
A sequence of elements supporting sequential and parallel aggregate operations.
|
A sequence of elements supporting sequential and parallel aggregate operations. |
util/object
object consists of {@code static} utility methods for operating on objects, or checking certain conditions before operation.
|
object consists of {@code static} utility methods for operating on objects, or checking certain conditions before operation. |
util/spliterator
A sequence of elements supporting sequential and parallel aggregate operations.
|
A sequence of elements supporting sequential and parallel aggregate operations. |
x/resilience
Package resilience provides helpers for dealing with resilience.
|
Package resilience provides helpers for dealing with resilience. |
instrumentation/otel
Module
|
|
webserver
Module
|
|
github.com/golang/go
Module
|
|
github.com/golang/protobuf
Module
|
|
github.com/google/uuid
Module
|
|
github.com/spf13/pflag
Module
|
|
github.com/spf13/viper
Module
|
|
github.com/syndtr/goleveldb
Module
|
|
gocloud.dev
Module
|
|
google.golang.org/grpc
Module
|
|
google.golang.org/protobuf
Module
|
|
thirdparty
|
|
github.com/golang/protobuf
Module
|
|
github.com/sirupsen/logrus
Module
|
|
google.golang.org/grpc
Module
|
|
cmd/go-atomicvalue
Module
|
|
cmd/go-enum
Module
|
|
cmd/go-import
Module
|
|
cmd/go-nulljson
Module
|
|
cmd/go-option
Module
|
|
cmd/go-sqlx
Module
|
|
cmd/go-syncmap
Module
|
|
cmd/go-syncpool
Module
|
|
cmd/go-validator
Module
|
|
cmd/protoc-gen-go-tag
Module
|
|
go-atomicvalue
Module
|
|
go-enum
Module
|
|
go-import
Module
|
|
go-nulljson
Module
|
|
go-option
Module
|
|
go-sqlx
Module
|
|
go-syncmap
Module
|
|
go-syncpool
Module
|
|
go-validator
Module
|
|
protoc-gen-go-tag
Module
|
Click to show internal directories.
Click to hide internal directories.