An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

proxy.golang.org : github.com/mleku/autoflags : v1.0.0

Package autoflags provides a convenient way of exposing struct fields as command line flags. Each exposed field should have a special tag attached: After declaring your flags and their default values as above, just register flags with autoflags.Define and call flag.Parse as usual: Now config struct has its fields populated from command line flags. Call the program with flags to override default values: Package autoflags understands all basic types supported by the flag package xxxVar functions: int, int64, uint, uint64, float64, bool, string, time.Duration. Types implementing flag.Value interface are also supported. Attaching a non-empty `flag` tag to field of an unsupported type would result in panic.

Registry - Documentation - Download - JSON
purl: pkg:golang/github.com/mleku/[email protected]
Published:
Indexed:

    Loading...
    Readme
    Loading...