-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
70 lines (62 loc) · 1.18 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package main
import (
"fmt"
"github.com/codegangsta/cli"
"os"
)
const version = "0.0.1"
func main() {
app := cli.NewApp()
app.Name = ("linter")
app.Usage = "lint a helm chart"
app.Version = version
app.Run(os.Args)
app.Commands = []cli.Command{
{
Name: "lint",
Usage: "applies linting to the chart path passed in",
Action: func(c *cli.Context) {
Lint(c.Args().First())
},
},
{
Name: "rules",
Usage: "options for chart rules",
Subcommands: []cli.Command{
{
Name: "add",
Usage: "add a new chart linting rule",
Action: func(c *cli.Context) {
path := c.Args().First()
addRules(path)
},
},
{
Name: "list",
Usage: "list chart rules",
Action: func(c *cli.Context) {
listRules(c)
},
},
{
Name: "remove",
Aliases: []string{"rm"},
Usage: "remove a chart rule",
Action: func(c *cli.Context) {
path := c.Args().First()
removeRule(path)
},
},
},
},
}
}
func addRules(path string) {
fmt.Println("coming soon")
}
func listRules(c *cli.Context) {
fmt.Println("coming soon")
}
func removeRule(path string) {
fmt.Println("coming soon")
}