Skip to content
/ x Public

Go packages that are common to many rotationalio projects -- in the spirit of golang.org/x

License

Notifications You must be signed in to change notification settings

rotationalio/x

Repository files navigation

Toolkit GoDoc

Go packages that are common to many Rotational Labs projects -- in the spirit of golang.org/x

Usage

To get these packages into your project, it's as easy as:

$ go get go.rtnl.ai/x/[pkg]

Where [pkg] is the name of the package you want to use in your project. Note that the go modules are at the top level of the toolkit, so please specify the latest version of the x package that has the tools that you need.

Subpackages

This is single repository that stores many, independent small subpackages. This list changes often as common code gets moved from specific projects into this repository.

  • api: common utilities and responses for our JSON/REST APIs that our services run.
  • assert: simple test assertions for no-dependency testing
  • base58: base58 encoding package as used by Bitcoin and travel addresses
  • country: a helper package for resolving ISO-3166-1 country codes to country information
  • dsn: parses data source names in order to connect to both server and embedded databases easily.
  • gravatar: helper to create Gravatar urls from email addresses
  • httpcc: http cache control header parsing and directives management
  • humanize: creates human readable strings from various types
  • noplog: no operation logger to capture internal logging with no output
  • out: hierarchical logger to manage logging verbosity to stdout
  • probez: http handlers for kubernetes probes (livez, healthz, and readyz)
  • quant: metrics for quantitative text analysis.
  • radish: run asynchronous tasks
  • randstr: generate random strings using the crypto/rand package as efficiently as possible
  • semver: allows parsing and comparison of semantic versioning numbers.
  • typecase: convert strings to different variable cases such as camel or snake case.
  • vero: create verification tokens against a record identifier, with an expiration.

Development

The primary rule of this package is that there should be no dependencies added to go.mod. For testing in this package, please use the assert package locally. If there is a dependency on a large third party package (e.g. gin) then that library should be in its own repository; otherwise anything that imports x will also import those dependencies.

About

Package x hosts several packages, modules, and libraries that are common across most Rotational Labs projects for easy reuse. This package is very much in the spirit of golang.org/x and even has a vanity url to make the import path as short as possible!

It is important to note is that most of the subpackages in this repository are independent. That is that they are implemented and tested separately from other subpackages. Anyone who would like to use this package should only go get exactly what they need and rely on the documentation on godoc and in the subpackage README.md for more information.

About

Go packages that are common to many rotationalio projects -- in the spirit of golang.org/x

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages