golang public library
A golang public library that reduces code writing in daily development and improves development efficiency
| package | desc | note |
|---|---|---|
| concurrent | Provides the function of concurrency limitation | |
| contextx | extended context | |
| di | Function of dependency injection | |
| fx | golang concurrent execution, similar to python's gevent.spawn method use | |
| http | http client | |
| logger | logger | |
| shutdown | Graceful shutdown of services | |
| structx | Some structures, such as set, safe_map, stack, time_wheel | |
| utils | Common tools, such as json, copy, ping, cmd execution and other functions |
- add kq:
- Provides an MQ consumer/producer package. Can provide concurrent consumption
- sequential submission, current limiting, circuit breaker and other functions
go get -u github.com/colinrs/pkgxpackage main
import (
"github.com/colinrs/pkgx/logger"
)
func main() {
logger.Info("test")
}