-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
42 lines (34 loc) · 1 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
package chart
import (
flags "github.com/jessevdk/go-flags"
)
type ChartCommand struct {
Profile string `short:"p" long:"profile" env:"AWS_PROFILE" default:"default" description:"What profile to use"`
Region string `short:"r" long:"region" env:"AWS_REGION" default:"us-east-1" description:"What region to use"`
}
type NMCommand struct {
Profile string `short:"p" long:"profile" env:"AWS_PROFILE" default:"default" description:"What profile to use"`
Region string `short:"r" long:"region" env:"AWS_REGION" default:"us-east-1" description:"What region to use"`
}
var (
chartCommand ChartCommand
nmCommand NMCommand
)
func Init(parser *flags.Parser) {
cmd, err := parser.AddCommand(
"chart",
"Chart",
"Chart relationship between resources",
&struct{}{})
if err != nil {
return
}
cmd.AddCommand("peering",
"Chart peering relationship",
"Chart peering relationship",
&chartCommand)
cmd.AddCommand("nm",
"Chart NetworkManager topology",
"Chart NetworkManager topology",
&nmCommand)
}