Categorygithub.com/obsidiandynamics/libstdgo

# README

logo libstdgo

Go version Build Release Codecov Go Report Card Total alerts GoDoc Reference

Standard libraries for Go, taking care of things like:

  • concurrent: concurrent and thread-safe data structures
    • AtomicCounter: atomic int64 counter
    • Scoreboard: a space-efficient map of string-keyed int64 counters
    • AtomicReference an atomic reference that allows for nil pointers
    • Deadline - conditional running of tasks that are bound to a deadline
  • scribe: logging façade that features logger mocking and assertions, and comes with ready-to-go bindings for —
    • The built-in os.Stdout file handle
    • The built-in log package
    • Glog
    • Log15
    • Logrus
    • Seelog
    • Zap
    • Overlog — a thread-safe logger for debugging concurrent apps, built into Scribe
  • check: assertion utilities
    • ThatPanicsAsExpected(func): asserting panic expectations
    • Wait(t, timeout).UntilAsserted(assertion): time-based assertions
    • TestCapture: capture of testing.T failures (for self-testing of assertion libraries)
    • Intercept(t).Mutate(...): enrichment of assertion failure messages
  • commander: schemaless command-line argument parsing
    • Parse(os.Args).Mappify
  • fault: fault injection
  • arity: extraction of optional arguments to variadic functions
    • arg := arity.SoleUntyped("a_default", args).(string)
  • diags: debugging and diagnostics

Check out the GoDocs.

# Packages

Package arity contains helpers for working with variadic functions.
Package check contains assertions to assist with unit testing.
Package commander contains a simple command-line argument parser that supports flags, switches and free-form trailing (and mid-stream) arguments, and provides methods for their retrieval.
Package concurrent provides high-level synchronization tooling and thread-safe data structures.
Package diags contains helpers to assist in debugging and diagnostics.
Package fault provides facilities for simulated fault injection.
Package scribe represents a functional abstraction for unifying loggers.