TopGit tracks urfave/sflags on GitHub. The project has 167 stars.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
$ go run ./main.go --help
Usage of _obj/exe/main:
-http-host value
HTTP host (default 127.0.0.1)
-http-port value
(default 6000)
-http-ssl
-http-timeout value
(default 15s)
exit status 2
Options for flag tag
The flag default key string is the struct field name but can be specified in the struct field's tag value.
The "flag" key in the struct field's tag value is the key name, followed by an optional comma and options. Examples:
// Field is ignored by this package.
Field int `flag:"-"`
// Field appears in flags as "myName".
Field int `flag:"myName"`
// If this field is from nested struct, prefix from parent struct will be ingored.
Field int `flag:"~myName"`
// You can set short name for flags by providing it's value after a space
// Prefixes will not be applied for short names.
Field int `flag:"myName a"`
// this field will be removed from generated help text.
Field int `flag:",hidden"`
// this field will be marked as deprecated in generated help text
Field int `flag:",deprecated"`
Options for desc tag
If you specify description in description tag (desc by default) it will be used in USAGE section.
Addr string `desc:"HTTP host"`
This description produces something like:
-addr value
HTTP host (default 127.0.0.1)
Options for env tag
If you specify environment variable name in env tag, it will be used to set the value of the field.
SSL bool `env:"HTTP_SSL_VALUE"`
Options for Parse function:
// DescTag sets custom description tag. It is "desc" by default.
func DescTag(val string)
// FlagTag sets custom flag tag. It is "flag" be default.
func FlagTag(val string)
// Prefix sets prefix that will be applied for all flags (if they are not marked as ~).
func Prefix(val string)
// EnvPrefix sets prefix that will be applied for all environment variables (if they are not marked as ~).
func EnvPrefix(val string)
// FlagDivider sets custom divider for flags. It is dash by default. e.g. "flag-name".
func FlagDivider(val string)
// EnvDivider sets custom divider for environment variables.
// It is underscore by default. e.g. "ENV_NAME".
func EnvDivider(val string)
// Validator sets validator function for flags.
// Check existed validators in sflags/validator package.
func Validator(val ValidateFunc)
// Set to false if you don't want anonymous structure fields to be flattened.
func Flatten(val bool)
// InheritHidden sets if fields should inherit the value of the hidden tag from parent structs.
func InheritHidden()
// InheritDeprecated sets if fields should inherit the value of the deprecated tag from parent structs.
func InheritDeprecated()
Known issues
kingpin doesn't pass value for boolean arguments. Counter can't get initial value from arguments.
TopGit's last sync did not record any GitHub topics for urfave/sflags. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How many stars does urfave/sflags have?
urfave/sflags has 167 GitHub stars — refresh the page for the live number, or check github.com/urfave/sflags. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is urfave/sflags still maintained?
TopGit's metadata for urfave/sflags does not include a recent push date. Check the commit history on the GitHub repository page for the most authoritative activity timeline.
What is urfave/sflags?
urfave/sflags (urfave/sflags) is a multi-language project tracked by TopGit. The repository has 167 GitHub stars at the time of our last sync.
What language is urfave/sflags written in?
TopGit's last sync did not record a primary language for urfave/sflags. Open the repository on GitHub to see the full breakdown by file extension.
Read full README in the tab above.
Still deciding about sflags?
One click hands the question to an AI along with this page — see what it says about sflags.