-
Notifications
You must be signed in to change notification settings - Fork 0
StructTags
Eliot Hedeman edited this page Jan 18, 2020
·
1 revision
Struct tags can be used to customize the parsing of arguments.
| tag | meaning |
|---|---|
| long | Change the long form of flag name.This will default to the kebab case version of the field name on a struct |
| short | Add a short version of your flag name. Will start with a single '-' instead of '--' |
| default | The default value to be used for this flag if it is not provided. |
| help | Help text for this flag |
| ignore | Don't add this field to the set of flags to be parsed |
type ls struct {
Path string `short:"p" help:"path to list" default:"."`
}