Skip to content
Myr

Add a tags field for user defined tags on a Command. (#359)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Nephin · committed by Eric Paris · parent 35136c0 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Daniel Nephin <dnephin@gmail.com>

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:command.go+4 added-1 removed
55 unmodified lines
56 // Is this command deprecated and should print this string when used?57 Deprecated string58 // Is this command hidden and should NOT show up in the list of available commands?59 Hidden bool60 // Annotations are key/value pairs that can be used by applications to identify or61 // group commands62 Annotations map[string]string63 // Full set of flags64 flags *flag.FlagSet65 // Set of flags childrens of this command will inherit66 pflags *flag.FlagSet
390 unmodified lines
457 }458 return args459}460458// Find finds the target command given the args and command tree461// Find the target command given the args and command tree462// Meant to be run on the highest node. Only searches down.463func (c *Command) Find(args []string) (*Command, []string, error) {464 if c == nil {465 return nil, nil, fmt.Errorf("Called find() on a nil Command")
843 unmodified lines