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

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 - Source - Documentation - JSON
purl: pkg:golang/github.com/mleku/autoflags
License: MIT
Latest release: over 1 year ago
First release: over 8 years ago
Namespace: github.com/mleku
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 21 days ago

    Loading...
    Readme
    Loading...