github.com/jxskiss/gopkg@v0.17.3/README.md (about)

     1  # gopkg
     2  
     3  This repository collects many frequently used small packages, it is designed
     4  to have reasonable trade-off between generic, performance and API friendliness.
     5  It helps to make life easier!
     6  
     7  ## Status
     8  
     9  This v1 branch is the legacy code which is released as versions v0.x.x.
    10  This branch is not actively maintained, there shall be no further changes to the v1 APIs.
    11  
    12  A new v2 branch is being built, which will be released as "github.com/jxskiss/gopkg/v2".
    13  v2 requires Go 1.18+, users are recommended to upgrade to v2 when the generics feature is stable.
    14  
    15  ## Packages
    16  
    17  1. `confr` provides a simple but powerful configuration loader.
    18  
    19  1. `easy` contains many handy utilities as a complementary to the standard library,
    20     it really makes life easier.
    21  
    22  1. `errcode` provides a registry to manage error codes and messages.
    23  
    24  1. `forceexport` force exports private types and functions of other packages. As you might
    25     expect, this package is unsafe and fragile and shouldn't be used in production, it is
    26     mainly for testing purpose.
    27  
    28  1. `gemap` contains some utilities to manipulate map data structure.
    29  
    30  1. `json` provides a drop-in replacement of `encoding/json` and extended features.
    31     When compiled with tag `gojson`, it uses the `goccy/go-json` in underlying, which has
    32     much better performance then `encoding/json` and many other third-party libraries.
    33     Check json/README.md for detailed introduction.
    34  
    35  1. `lru` is a high performance implementation of the LRU cache, it features pre-allocation,
    36     item expiration, friendly and type-safe APIs for commonly used key types.
    37     It also provides a sharded version for heavy lock contention use-case.
    38  
    39  1. `ptr` provides small functions to work with pointer types, such as copying value as pointer,
    40     converting integer to string pointer, or dereference pointer which may be nil, etc.
    41     It helps to reduce duplicate code and makes code clearer and simpler.
    42  
    43  1. `reflectx` contains many utilities to work with reflection, providing convenient APIs
    44     or better performance.
    45  
    46  1. `retry` implements frequently used strategies and options to do retry when error
    47     occurs, with various hooks and circuit breaker to protect system overload.
    48  
    49  1. `rthash` exposes the various hash functions in runtime package.
    50  
    51  1. `set` provides a generic set data structure, and some most frequently used concrete types.
    52  
    53  1. `sqlutil` provides utilities to work with relational database ORM libraries,
    54     it keeps simple and can work with `database/sql` and many ORM libraries.
    55  
    56  1. `structtag` contains some handy utilities to work with struct tags.
    57  
    58  1. `strutil` provides utilities to work with string data as supplement to the standard
    59     libraries `strings` and `unicode/utf8`.
    60  
    61  1. `zlog` provides a common logger interface which is implemented by
    62     many logging libraries, and some opinionated logging facilities wrapped around
    63     [zap](https://github.com/uber-go/zap).
    64  
    65  See https://pkg.go.dev/github.com/jxskiss/gopkg for detailed online docs.