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

Top 3.7% on proxy.golang.org
Top 1.1% dependent packages on proxy.golang.org
Top 1.1% dependent repos on proxy.golang.org
Top 7.8% forks on proxy.golang.org
Top 0.6% docker downloads on proxy.golang.org

proxy.golang.org : github.com/itzg/go-flagsfiller

Package flagsfiller makes Go's flag package pleasant to use by mapping the fields of a given struct into flags in a FlagSet. A FlagSetFiller is created with the New constructor, passing it any desired FillerOptions. With that, call Fill, passing it a flag.FlatSet, such as flag.CommandLine, and your struct to be mapped. Even a simple struct with no special changes can be used, such as: After calling Parse on the flag.FlagSet, the corresponding fields of the mapped struct will be populated with values passed from the command-line. For an even quicker start, flagsfiller provides a convenience Parse function that does the same as the snippet above in one call: By default, the flags are named by taking the field name and performing a word-wise conversion to kebab-case. For example the field named "MyMultiWordField" becomes the flag named "my-multi-word-field". The naming strategy can be changed by passing a custom Renamer using the WithFieldRenamer option in the constructor. Additional aliases, such as short names, can be declared with the `aliases` tag as a comma-separated list: FlagSetFiller supports nested structs and computes the flag names by prefixing the field name of the struct to the names of the fields it contains. For example, the following maps to the flags named remote-host, remote-auth-username, and remote-auth-password: To declare a flag's usage add a `usage:""` tag to the field, such as: Since flag.UnquoteUsage normally uses back quotes to locate the argument placeholder name but struct tags also use back quotes, flagsfiller will instead use [square brackets] to define the placeholder name, such as: results in the rendered output: To declare the default value of a flag, you can either set a field's value before passing the struct to process, such as: or add a `default:""` tag to the field. Be sure to provide a valid string that can be converted into the field's type. For example, FlagSetFiller also includes support for []string fields. Repetition of the argument appends to the slice and/or an argument value can contain a comma or newline separated list of values. For example: results in a three element slice. The default tag's value is provided as a comma-separated list, such as FlagSetFiller also includes support for map[string]string fields. Each argument entry is a key=value and/or repetition of the arguments adds to the map or multiple entries can be comma or newline separated in a single argument value. For example: results in a map with three entries. The default tag's value is provided a comma-separate list of key=value entries, such as FlagSetFiller also supports following field types: - net.IP: format used by net.ParseIP() - net.IPNet: format used by net.ParseCIDR() - net.HardwareAddr (MAC addr): format used by net.ParseMAC() - time.Time: format is the layout string used by time.Parse(), default layout is time.DateTime, could be overriden by field tag "layout" - slog.Level: parsed as specified by https://pkg.go.dev/log/slog#Level.UnmarshalText, such as "info" To activate the setting of flag values from environment variables, pass the WithEnv option to flagsfiller.New or flagsfiller.Parse. That option takes a prefix that will be prepended to the resolved field name and then the whole thing is converted to SCREAMING_SNAKE_CASE. The environment variable name will be automatically included in the flag usage along with the standard inclusion of the default value. For example, using the option WithEnv("App") along with the following field declaration would render the following usage: To override the naming of a flag, the field can be declared with the tag `flag:"name"` where the given name will be used exactly as the flag name. An empty string for the name indicates the field should be ignored and no flag is declared. For example, Environment variable naming and processing can be overridden with the `env:"name"` tag, where the given name will be used exactly as the mapped environment variable name. If the WithEnv or WithEnvRenamer options were enabled, a field can be excluded from environment variable mapping by giving an empty string. Conversely, environment variable mapping can be enabled per field with `env:"name"` even when the flagsfiller-wide option was not included. For example, This file implements support for all types that support interface encoding.TextUnmarshaler

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/itzg/go-flagsfiller
License: MIT
Latest release: 8 months ago
First release: over 5 years ago
Namespace: github.com/itzg
Dependent packages: 20
Dependent repositories: 25
Stars: 32 on GitHub
Forks: 9 on GitHub
Docker dependents: 34
Docker downloads: 385,317,276
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/itzg
Last synced: 13 days ago

Top 7.6% on proxy.golang.org
github.com/mrwong99/summairpg v0.0.1
Summarizing role plays because I am lazy
1 version - Latest release: about 1 year ago - 0 stars on GitHub
Top 8.2% on proxy.golang.org
github.com/itzg/mc-server-runner v0.0.0-20240120190309-6bc00ad24df1 💰
A container entry point to manage graceful shutdown of a Minecraft server
6 versions - Latest release: over 1 year ago - 25 stars on GitHub
Top 5.3% on proxy.golang.org
github.com/drshriveer/gtools/genum v0.0.0-20240118230607-f422767cef16
31 versions - Latest release: over 1 year ago - 1 dependent package - 1 dependent repositories
github.com/drshriveer/gtools/gogenproto v0.0.0-20240118230607-f422767cef16
18 versions - Latest release: over 1 year ago - 1 stars on GitHub
github.com/drshriveer/gtools/gerror v0.0.0-20240118230607-f422767cef16
32 versions - Latest release: over 1 year ago - 2 dependent packages - 1 dependent repositories - 1 stars on GitHub
github.com/drshriveer/gtools/gsort v0.0.0-20240118230607-f422767cef16
5 versions - Latest release: over 1 year ago - 3 stars on GitHub
Top 9.0% on proxy.golang.org
github.com/hatamiarash7/netflow-exporter v1.0.10
Prometheus exporter for NetFlow
11 versions - Latest release: over 1 year ago - 0 stars on GitHub
Top 5.3% on proxy.golang.org
github.com/itzg/mc-router v0.0.0-20231225141854-ac3e315a1fc3 💰
Routes Minecraft client connections to backend servers based upon the requested server address
27 versions - Latest release: over 1 year ago - 328 stars on GitHub
Top 6.0% on proxy.golang.org
github.com/itzg/saml-auth-proxy v0.0.0-20231207154724-6d1c7b264ac2 💰
Provides a SAML SP authentication proxy for backend web services
17 versions - Latest release: over 1 year ago - 40 stars on GitHub
github.com/uablrek/goprog v0.0.0-20230713060610-f2e0f22460b1
Base for go programs. Support for log, config and sub-programs
1 version - Latest release: almost 2 years ago - 0 stars on GitHub
Top 9.7% on proxy.golang.org
github.com/zasdaym/talentaclock v0.0.0-20230612041919-2135b4ca6cd0
Automate https://hr.talenta.co Clock In & Clock Out.
1 version - Latest release: about 2 years ago - 1 stars on GitHub
Top 7.6% on proxy.golang.org
github.com/itzg/web-debug-server v0.0.0-20230605133251-c06343770f39 💰
A very minimal web server that responds with a page containing the request headers and content
4 versions - Latest release: about 2 years ago - 5 stars on GitHub
Top 8.2% on proxy.golang.org
github.com/hujun-open/sconf v0.3.0
A simple configuration management for Golang, support default,YAML and flag
5 versions - Latest release: about 2 years ago - 0 stars on GitHub
Top 9.0% on proxy.golang.org
github.com/kennethklee/saml-auth-proxy v1.6.3-alpha.3 💰
Provides a SAML SP authentication proxy for backend web services
6 versions - Latest release: about 3 years ago - 0 stars on GitHub
Top 7.1% on proxy.golang.org
github.com/itzg/kube-metrics-exporter v1.2.0 💰
Simple application that accesses the Kubernetes metrics API and exports the pod metrics for Prome...
3 versions - Latest release: over 3 years ago - 6 stars on GitHub
github.com/go-snart/route v0.13.0
Package route contains a command Route for Snart.
37 versions - Latest release: about 4 years ago - 7 dependent packages - 2 dependent repositories - 1 stars on GitHub
Top 5.3% on proxy.golang.org
github.com/itzg/mc-monitor v0.1.6 💰
Monitor the status of Minecraft servers and provides Prometheus exporter and Influx line protocol...
7 versions - Latest release: over 5 years ago - 164 stars on GitHub
Top 5.5% on proxy.golang.org
github.com/itzg/go-mc-status v0.1.6 💰
Monitor the status of Minecraft servers and provides Prometheus exporter and Influx line protocol...
7 versions - Latest release: over 5 years ago - 234 stars on GitHub
Top 8.6% on proxy.golang.org
github.com/racker/salus-packages-agent v0.1.0
A Salus monitoring agent that collects and reports on installed software packages
1 version - Latest release: over 5 years ago - 1 stars on GitHub
Top 8.2% on proxy.golang.org
github.com/itzg/kube-metrics-reporter v0.3.2
Simple application that accesses the Kubernetes metrics API and reports pod-container metrics
7 versions - Latest release: over 5 years ago - 0 stars on GitHub
Past Dependents
Include Past Dependents

Check this option to include packages that no longer depend on this package in their latest version but previously did.