Coder Social home page Coder Social logo

x's Introduction

Toolkit GoDoc

Go packages that are common to many of my projects โ€” in the spirit of golang.org/x

Usage

To get these packages on your system, it's as easy as:

$ go get github.com/bbengfort/x/[pkg]

Where [pkg] is the name of the package you want to install. Import the packages required in your code, vendoring as necessary in order to use them in other projects.

About

Package x hosts several packages, modules, and libraries that are common across most of my code for easy reuse. This package is very much in the spirit of golang.org/x though it does have a slightly longer import path as a result of being hosted in my GitHub repository.

One thing that I think 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. Future me and 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.

Generally speaking, these things are simply ported out of my other applications once I discover that they need to be reused. The x repository gives me the ability to manage them all in the same version control without jumping through all the GitHub hoops. I'm not sure this is what was intended by Golang, but managing multiple repositories with just one or two files was too much of a pain, hence this system.

Subpackages

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

  • net: additional networking packages
  • peers: defines and synchronizes remote peers on the network
  • pid: manages pid files and background processes
  • noplog: no operation logger to capture internal logging
  • stats: online computation of summary statistics
  • console: hierarchical console logging
  • events: event dispatcher and callbacks
  • bandit: multi-armed bandit strategies for random choice
  • lock: provides logging to diagnose lock contention issues
  • unique: finds unique elements in a slice

Under Development

The following subpackages are currently under development

  • cfrv: implements conflict-free replicated versions of multiple types.
  • interval: provides an interface for time based event dispatchers.

Tests and Benchmarks

Packages in this repository use different tests and benchmarking tools. Beyond the standard go test environment, most packages will probably use ginkgo for BDD style testing and gomega for matching and assertions. To install these packages:

$ go get github.com/onsi/ginkgo/ginkgo
$ go get github.com/onsi/gomega

This will install the libraries as well as the runner executables.

x's People

Contributors

bbengfort avatar simukka avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.