The Central Go Modules Repository

To use GoCenter:
export GOPROXY=https://gocenter.io
0
Stars
UNKNOWN
License
4
Downloads
January 1st 0001
Last Modified
Version:
Loading...

go

Go helper packages

Install

  • Install to your local
  go get -u bitbucket.org/absoluteyl/go
  • Import to your project
  import "bitbucket.org/absoluteyl/go"

Packages

absoluthttp

  • GetLogLevel:

Automatically set log level by HTTP response code, for example:

  absoluthttp.GetLogLevel(http.StatusOK) // INFO level
  absoluthttp.GetLogLevel(http.StatusNotFound) // ERROR level

absolutos

Enhancement of go official os package, currently supports following method:

  • Getenv:

Enhance Getenv method of official os package with a default value, for example:

  absolutos.Getenv("PORT", "8080")