forked from 99designs/aws-vault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
37 lines (29 loc) · 740 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
37
package main
import (
"os"
"github.com/99designs/aws-vault/cli"
"gopkg.in/alecthomas/kingpin.v2"
)
// Version is provided at compile time
var Version = "dev"
func main() {
run(os.Args[1:], os.Exit)
}
func run(args []string, exit func(int)) {
app := kingpin.New(
`aws-vault`,
`A vault for securely storing and accessing AWS credentials in development environments.`,
)
app.Writer(os.Stdout)
app.Version(Version)
app.Terminate(exit)
cli.ConfigureGlobals(app)
cli.ConfigureAddCommand(app)
cli.ConfigureListCommand(app)
cli.ConfigureRotateCommand(app)
cli.ConfigureExecCommand(app)
cli.ConfigureRemoveCommand(app)
cli.ConfigureLoginCommand(app)
cli.ConfigureServerCommand(app)
kingpin.MustParse(app.Parse(args))
}