Skip to content

turbinelabs/nonstdlib

Repository files navigation

turbinelabs/nonstdlib

This project is no longer maintained by Turbine Labs, which has shut down.

Apache 2.0 GoDoc CircleCI Go Report Card codecov

The nonstdlib project comprises extensions to the Go stdlib, either to increase feature set or testability, and other utility code. The nonstdlib project has no external dependencies beyond the go standard library; the tests depend on our test package and gomock.

Where possible, we mirror the stdlib package naming, though in practice, we commonly import packages with a tbn prefix for clarity, e.g.:

import (
  "os"

  tbnos "github.com/turbinelabs/nonstdlib/os"
)

Requirements

  • Go 1.10.3 or later (previous versions may work, but we don't build or test against them)

Install

go get -u github.com/turbinelabs/nonstdlib/...

Clone/Test

mkdir -p $GOPATH/src/turbinelabs
git clone https://github.com/turbinelabs/nonstdlib.git > $GOPATH/src/turbinelabs/nonstdlib
go test github.com/turbinelabs/nonstdlib/...

Packages

Each package is best described in its respective Godoc:

  • arrays: includes several sub-packages allowing type-safe execution of tasks commonly applied to slices
  • editor: provides simple wrappers for interacting with an environment configured text editor
  • executor: provides a mechanism for asyncronous execution of tasks, using callbacks to indicate success or failure
  • flag: provides convenience methods for dealing with golang flag.FlagSets
  • log: provides infrastructure for topic based logging to files
  • math: provides mathematical utilities
  • must: provides extraction of useful information out of (data, error) tuples
  • net: provides convenience methods for dealing with the net package of the stdlib
  • os: provides an OS interface mirroring a subset of commonly used functions and variables from the golang os package
  • proc: provides a mechanism for running processes under management
  • ptr: provides convenience and conversion methods for working with pointer types
  • stats: provides an interface for reporting simple statistics
  • strings: provides convenience methods for working with strings and string slices
  • text/tabwriter: provides a set of sane defaults for converting tab separated values into a pretty column formatted output.
  • time: provides utility functions for go time.Time instances

Versioning

Please see Versioning of Turbine Labs Open Source Projects.

Pull Requests

Patches accepted! Please see Contributing to Turbine Labs Open Source Projects.

Code of Conduct

All Turbine Labs open-sourced projects are released with a Contributor Code of Conduct. By participating in our projects you agree to abide by its terms, which will be carefully enforced.