first commit
This commit is contained in:
24
cmd/cli/main.go
Normal file
24
cmd/cli/main.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cloudsave/cmd/cli/commands/add"
|
||||
"cloudsave/cmd/cli/commands/run"
|
||||
"context"
|
||||
"flag"
|
||||
"os"
|
||||
|
||||
"github.com/google/subcommands"
|
||||
)
|
||||
|
||||
func main() {
|
||||
subcommands.Register(subcommands.HelpCommand(), "help")
|
||||
subcommands.Register(subcommands.FlagsCommand(), "help")
|
||||
subcommands.Register(subcommands.CommandsCommand(), "help")
|
||||
|
||||
subcommands.Register(add.AddCmd{}, "management")
|
||||
subcommands.Register(run.RunCmd{}, "management")
|
||||
|
||||
flag.Parse()
|
||||
ctx := context.Background()
|
||||
os.Exit(int(subcommands.Execute(ctx)))
|
||||
}
|
||||
Reference in New Issue
Block a user