gopkg

module
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT

README

gopkg

This repository collects many frequently used small packages, it is designed to have reasonable trade-off between generic, performance and API friendliness. It helps to make life easier!

Status

This v1 branch is the legacy code which is released as versions v0.x.x. This branch is not actively maintained, there shall be no further changes to the v1 APIs.

A new v2 branch is being built, which will be released as "github.com/jxskiss/gopkg/v2". v2 requires Go 1.18+, users are recommended to upgrade to v2 when the generics feature is stable.

Packages

  1. confr provides a simple but powerful configuration loader.

  2. easy contains many handy utilities as a complementary to the standard library, it really makes life easier.

  3. errcode provides a registry to manage error codes and messages.

  4. forceexport force exports private types and functions of other packages. As you might expect, this package is unsafe and fragile and shouldn't be used in production, it is mainly for testing purpose.

  5. gemap contains some utilities to manipulate map data structure.

  6. json provides a drop-in replacement of encoding/json and extended features. When compiled with tag gojson, it uses the goccy/go-json in underlying, which has much better performance then encoding/json and many other third-party libraries. Check json/README.md for detailed introduction.

  7. lru is a high performance implementation of the LRU cache, it features pre-allocation, item expiration, friendly and type-safe APIs for commonly used key types. It also provides a sharded version for heavy lock contention use-case.

  8. ptr provides small functions to work with pointer types, such as copying value as pointer, converting integer to string pointer, or dereference pointer which may be nil, etc. It helps to reduce duplicate code and makes code clearer and simpler.

  9. reflectx contains many utilities to work with reflection, providing convenient APIs or better performance.

  10. retry implements frequently used strategies and options to do retry when error occurs, with various hooks and circuit breaker to protect system overload.

  11. rthash exposes the various hash functions in runtime package.

  12. set provides a generic set data structure, and some most frequently used concrete types.

  13. sqlutil provides utilities to work with relational database ORM libraries, it keeps simple and can work with database/sql and many ORM libraries.

  14. structtag contains some handy utilities to work with struct tags.

  15. strutil provides utilities to work with string data as supplement to the standard libraries strings and unicode/utf8.

  16. zlog provides a common logger interface which is implemented by many logging libraries, and some opinionated logging facilities wrapped around zap.

See https://pkg.golang.ir/github.com/jxskiss/gopkg for detailed online docs.

Directories

Path Synopsis
Package confr provides a simple but yet powerful configuration loader.
Package confr provides a simple but yet powerful configuration loader.
unsafeheader
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
Package retry implements frequently used retry strategies and options.
Package retry implements frequently used retry strategies and options.
Package rthash exposes the various hash functions in runtime package.
Package rthash exposes the various hash functions in runtime package.

Jump to

Keyboard shortcuts

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