Skip to content

v0.0.1

Choose a tag to compare

@memclutter memclutter released this 25 Sep 17:23
a7b3da8

First release of confparse — a declarative command-line argument parser for Go.

Added

  • Parse(container interface{}) error, which reflects over a pointer-to-struct and registers each field as a standard-library flag.
  • Struct tags name (flag name), value (string default), usage (help text), and envVar (environment-variable fallback for the default).
  • Supported field types: string, int, bool, and time.Duration.
  • Environment extension: when a field's envVar variable is set and non-empty, its value becomes the field's default.

Install: go get github.com/memclutter/confparse@v0.0.1