Skip to content

foomo/go

Repository files navigation

Go Report Card GoDoc Coverage GitHub Stars

go

go

Go standard library extension, adding the missing parts used in the foomo ecosystem to keep DRY.

Features

  • errors — Variadic match helpers (AsAny, IsAny) wrapping errors.As / errors.Is
  • fmt — Template string formatting with %{.key} syntax
  • net — Free port allocation and TCP connection wait helpers (FreePort, FreePorts, WaitFor, WaitForFreePort)
  • options — Generic functional options pattern (Option, OptionE, Builder, BuilderE)
  • os — Typed Getenv/MustGetenv for scalars, slices, and maps with defaults; path Expand (~/, env vars)
  • runtime — Enriched caller introspection (Caller, CallerFunc, StackTrace) and panic recovery
  • sec — Safe path joining to prevent directory traversal (gosec G304)
  • slices — Generic slice utilities: Filter, Map, GroupBy (with error variants)
  • slog — Test-friendly slog.Handler that writes to testing.TB output
  • strings — Case conversions, padding, validation, prefix/suffix matching, and composition
  • testing — Tag-based test filtering via GO_TEST_TAGS, crypto key helpers, ExampleTB
  • time — Context-aware Sleep and polling WaitFor; ParseDuration (adds d/w units)
  • types — Common interface contracts (Closer, Starter, Stopper, …) with function adapters and As<X> helpers

How to Contribute

Contributions are welcome! Please read the contributing guide.

Contributors

License

Distributed under MIT License, please read the license file for more details.

Made with ♥ foomo by bestbytes

About

Go standard library extension, adding the missing parts used in the foomo ecosystem to keep dry.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

3 watching

Forks

Contributors