nonstdlib

package module
v0.0.0-...-c8a214a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

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.

Documentation

Overview

Package nonstdlib comprises extensions to the Go stdlib, either to increase featureset or testability, and other utility code. Where possible, we mirror the stdlib package naming, though in practice, we commonly import packages with a tbn prefix for clarity, eg:

import (
  "os"

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

Directories

Path Synopsis
Package arrays includes several sub-packages allowing type-safe execution of tasks commonly applied to slices.
Package arrays includes several sub-packages allowing type-safe execution of tasks commonly applied to slices.
dedupe
Package dedupe comprises types and functions in support of removing duplicates from a slice of a given type.
Package dedupe comprises types and functions in support of removing duplicates from a slice of a given type.
indexof
Package indexof comprises types and functions in support of finding the index of a target value within a slice of same-typed values.
Package indexof comprises types and functions in support of finding the index of a target value within a slice of same-typed values.
Package editor provides simple wrappers for interacting with an environment configured text editor.
Package editor provides simple wrappers for interacting with an environment configured text editor.
Package executor provides a mechanism for asynchronous execution of tasks, using callbacks to indicate success or failure.
Package executor provides a mechanism for asynchronous execution of tasks, using callbacks to indicate success or failure.
Package flag provides convenience methods for dealing with golang flag.FlagSets
Package flag provides convenience methods for dealing with golang flag.FlagSets
usage
Package usages provides a mechanism to insert and recover richer usage information (eg whether a flag is required, whether it contains sensitive information) into and from a flag.Flag usage string, respectively.
Package usages provides a mechanism to insert and recover richer usage information (eg whether a flag is required, whether it contains sensitive information) into and from a flag.Flag usage string, respectively.
Package io contains utilities for working with the standard io package
Package io contains utilities for working with the standard io package
log
Package log provides infrastructure for topic based logging to files.
Package log provides infrastructure for topic based logging to files.
console
Package console provides simple console logging to Stderr, configurable through a FlagSet.
Package console provides simple console logging to Stderr, configurable through a FlagSet.
Package math provides mathematical utilities.
Package math provides mathematical utilities.
Package must is a convenience wrapper for extracting useful information out of (data, error) tuples when you really just want the data and exiting on errors is acceptable.
Package must is a convenience wrapper for extracting useful information out of (data, error) tuples when you really just want the data and exiting on errors is acceptable.
os
Package os provides an OS interface mirroring a subset of commonly used functions and variables from the golang os package.
Package os provides an OS interface mirroring a subset of commonly used functions and variables from the golang os package.
exec
Package exec provides extensions of the os/exec package that provides streamlined execution of a command.
Package exec provides extensions of the os/exec package that provides streamlined execution of a command.
Package proc provides a mechanism for running processes under management.
Package proc provides a mechanism for running processes under management.
proc-test
proc-test is a trivial application that responds to signals such as those sent by proc.LoggingCommand and proc.ManagedProc
proc-test is a trivial application that responds to signals such as those sent by proc.LoggingCommand and proc.ManagedProc
Package ptr provides convenience and conversion methods for working with pointer types.
Package ptr provides convenience and conversion methods for working with pointer types.
Package regexp is a place to put useful regex patterns
Package regexp is a place to put useful regex patterns
Package strings introduces additional utilities for dealing with strings and slices of strings.
Package strings introduces additional utilities for dealing with strings and slices of strings.
text
tabwriter
Package tabwriter provides a set of sane defaults for converting tab separated values into a pretty column formatted output.
Package tabwriter provides a set of sane defaults for converting tab separated values into a pretty column formatted output.
Package time provides utility functions for go time.Time instances.
Package time provides utility functions for go time.Time instances.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL