From 47ebf174f4e726346a651bc74ee234bbaeb6cf17 Mon Sep 17 00:00:00 2001 From: Matt Bell <mappum@gmail.com> Date: Fri, 10 Oct 2014 11:40:57 -0700 Subject: [PATCH] commands: Created a list of global options (for options owned by commands package) --- commands/option.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/commands/option.go b/commands/option.go index ca26208b8..e14b1bf68 100644 --- a/commands/option.go +++ b/commands/option.go @@ -15,6 +15,17 @@ const ( type Option struct { Names []string // a list of unique names to Type reflect.Kind // value must be this type + + // TODO: add more features(?): //Default interface{} // the default value (ignored if `Required` is true) //Required bool // whether or not the option must be provided } + +// options that are used by this package +var globalOptions []Option = []Option{ + Option{ []string{ "enc", "encoding" }, String }, +} +// the above array of Options, wrapped in a Command +var globalCommand *Command = &Command{ + Options: globalOptions, +} -- GitLab