forked from AliyunContainerService/pouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
36 lines (29 loc) · 804 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"fmt"
"os"
)
func main() {
cli := NewCli()
// set global flags for rootCmd in cli.
cli.SetFlags()
base := &baseCommand{cmd: cli.rootCmd, cli: cli}
// Add all subcommands.
cli.AddCommand(base, &PullCommand{})
cli.AddCommand(base, &CreateCommand{})
cli.AddCommand(base, &StartCommand{})
cli.AddCommand(base, &StopCommand{})
cli.AddCommand(base, &PsCommand{})
cli.AddCommand(base, &ExecCommand{})
cli.AddCommand(base, &VersionCommand{})
cli.AddCommand(base, &ImageCommand{})
cli.AddCommand(base, &VolumeCommand{})
cli.AddCommand(base, &InspectCommand{})
cli.AddCommand(base, &RenameCommand{})
// add generate doc command
cli.AddCommand(base, &GenDocCommand{})
if err := cli.Run(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}