/libstdgo

Standard libraries for Go

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

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.