diff --git a/cmd/cmd.go b/cmd/cmd.go index 133fdd8b..4f777349 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,4 +1,4 @@ -// Package cmd is an interface for parsing the command line +// Package cmd is an interface for building a command line binary package cmd import ( @@ -87,13 +87,15 @@ import ( ) type Cmd interface { + // Init parses the command line args + // TODO: replace with Run method + Init(opts ...Option) error // The cli app within this cmd App() *cli.App - // Adds options, parses flags and initialise - // exits on error - Init(opts ...Option) error // Options set within this command Options() Options + // Implementation + String() string } type cmd struct { @@ -902,6 +904,10 @@ func (c *cmd) Init(opts ...Option) error { return nil } +func (c *cmd) String() string { + return "micro/cli" +} + func App() *cli.App { return DefaultCmd.App() }