-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
main.go
27 lines (23 loc) · 593 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
package main
import (
"context"
"flag"
"os"
"github.com/google/subcommands"
)
//
// Setup our sub-commands and use them.
//
func main() {
subcommands.Register(subcommands.HelpCommand(), "")
subcommands.Register(subcommands.FlagsCommand(), "")
subcommands.Register(subcommands.CommandsCommand(), "")
subcommands.Register(&compileCmd{}, "")
subcommands.Register(&dumpCmd{}, "")
subcommands.Register(&executeCmd{}, "")
subcommands.Register(&runCmd{}, "")
subcommands.Register(&versionCmd{}, "")
flag.Parse()
ctx := context.Background()
os.Exit(int(subcommands.Execute(ctx)))
}