https://github.com/obsidiandynamics/libstdgo
Standard libraries for Go
https://github.com/obsidiandynamics/libstdgo
cli concurrency golang logging testing
Last synced: about 1 year ago
JSON representation
Standard libraries for Go
- Host: GitHub
- URL: https://github.com/obsidiandynamics/libstdgo
- Owner: obsidiandynamics
- License: bsd-3-clause
- Created: 2020-04-17T23:56:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-06T09:20:09.000Z (almost 6 years ago)
- Last Synced: 2025-03-26T11:21:33.634Z (about 1 year ago)
- Topics: cli, concurrency, golang, logging, testing
- Language: Go
- Homepage:
- Size: 117 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`libstdgo`
===

[ ](https://travis-ci.org/obsidiandynamics/libstdgo#)

[](https://codecov.io/gh/obsidiandynamics/libstdgo)
[](https://goreportcard.com/report/github.com/obsidiandynamics/libstdgo)
[](https://lgtm.com/projects/g/obsidiandynamics/libstdgo/alerts/)
[](https://pkg.go.dev/github.com/obsidiandynamics/libstdgo?tab=subdirectories)
**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](https://github.com/golang/glog)
- [Log15](https://github.com/inconshreveable/log15)
- [Logrus](https://github.com/sirupsen/logrus)
- [Seelog](https://github.com/cihub/seelog)
- [Zap](https://github.com/uber-go/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](https://pkg.go.dev/github.com/obsidiandynamics/libstdgo?tab=subdirectories).