commit | a3682377147edf596d303faabd89f81977b3f678 | [log] [tgz] |
---|---|---|
author | slewiskelly <slewiskelly@google.com> | Tue Mar 06 04:16:00 2018 +1100 |
committer | Andrew Jackura <ajackura@google.com> | Mon Mar 05 09:16:00 2018 -0800 |
tree | 0d5ccd5837e251efa02b2db1908e0ce16d1f63e8 | |
parent | ce3d4cfc062faac7115d44e5befec8b5a08c3faa [diff] |
Update panic message to include the name of the undefined, important flag (#12)
diff --git a/subcommands.go b/subcommands.go index a42a0c8..019758a 100644 --- a/subcommands.go +++ b/subcommands.go
@@ -175,7 +175,7 @@ for _, name := range cdr.important { f := cdr.topFlags.Lookup(name) if f == nil { - panic("Important flag is not defined") + panic(fmt.Sprintf("Important flag (%s) is not defined", name)) } fmt.Fprintf(w, " -%s=%s: %s\n", f.Name, f.DefValue, f.Usage) }