-
Notifications
You must be signed in to change notification settings - Fork 140
/
app.go
44 lines (39 loc) · 949 Bytes
/
app.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
37
38
39
40
41
42
43
44
package main
import (
"github.com/urfave/cli"
"github.com/zalando/zally/cli/zally/commands"
)
// CreateApp creates CLI application with defined commands
func CreateApp() *cli.App {
app := cli.NewApp()
app.Name = "Zally-CLI"
app.Version = "1.1"
app.Usage = "Zally Command Line Interface"
app.Commands = []cli.Command{
commands.SupportedRulesCommand,
commands.LintCommand,
}
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "linter-service, l",
Usage: "Linter service `URL`",
Value: "http://localhost:8000",
EnvVar: "ZALLY_URL",
},
cli.StringFlag{
Name: "token, t",
Usage: "OAuth2 Token `OAUTH2_TOKEN`",
EnvVar: "TOKEN",
},
cli.StringFlag{
Name: "format",
Usage: "Output format `[pretty|markdown|text]`",
Value: "pretty",
},
cli.BoolFlag{
Name: "skip-ssl-verification",
Usage: "Skip SSL certificate verification when sending a request to linter service",
},
}
return app
}