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

Top 3.6% on proxy.golang.org
Top 0.8% dependent packages on proxy.golang.org
Top 1.0% dependent repos on proxy.golang.org
Top 8.8% forks on proxy.golang.org
Top 0.9% docker downloads on proxy.golang.org

proxy.golang.org : github.com/artyom/autoflags

Package autoflags provides a convenient way of exposing struct fields as command line flags. Exposed fields should have 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 flag's package xxxVar functions: int, int64, uint, uint64, float64, bool, string, time.Duration. Types implementing flag.Value interface are also supported. Attaching non-empty `flag` tag to field of unsupported type would result in panic.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/artyom/autoflags
Keywords: command-line , go
License: MIT
Latest release: over 6 years ago
First release: over 8 years ago
Namespace: github.com/artyom
Dependent packages: 48
Dependent repositories: 34
Stars: 38 on GitHub
Forks: 4 on GitHub
Docker dependents: 1
Docker downloads: 27,533
See more repository details: repos.ecosyste.ms
Last synced: 14 days ago

    Loading...
    Readme
    Loading...