first alpha version cli
This commit is contained in:
@@ -17,19 +17,19 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (AddCmd) Name() string { return "add" }
|
||||
func (AddCmd) Synopsis() string { return "Add a folder to the sync list" }
|
||||
func (AddCmd) Usage() string {
|
||||
func (*AddCmd) Name() string { return "add" }
|
||||
func (*AddCmd) Synopsis() string { return "Add a folder to the sync list" }
|
||||
func (*AddCmd) Usage() string {
|
||||
return `add:
|
||||
Add a folder to the sync list
|
||||
`
|
||||
}
|
||||
|
||||
func (p AddCmd) SetFlags(f *flag.FlagSet) {
|
||||
func (p *AddCmd) SetFlags(f *flag.FlagSet) {
|
||||
f.StringVar(&p.name, "name", "", "Override the name of the game")
|
||||
}
|
||||
|
||||
func (p AddCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {
|
||||
func (p *AddCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {
|
||||
if f.NArg() != 1 {
|
||||
fmt.Fprintln(os.Stderr, "error: the command is expecting for 1 argument")
|
||||
return subcommands.ExitUsageError
|
||||
|
||||
Reference in New Issue
Block a user