🚧 Stub commands
This commit is contained in:
parent
9c84bdd7c7
commit
a9c62f7d20
4 changed files with 45 additions and 2 deletions
17
commands/cmds.go
Normal file
17
commands/cmds.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
type Command interface {
|
||||
Name() string
|
||||
FlagSet() *pflag.FlagSet
|
||||
Run() error
|
||||
}
|
||||
|
||||
func New(name string, args []string) (Command, error) {
|
||||
return nil, fmt.Errorf("Unknown command: %s", name)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue