-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
38 lines (30 loc) · 915 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
38
package main
import (
_ "embed"
"os"
"github.com/cloudflare/cfssl/log"
"github.com/urfave/cli"
"github.com/utilitywarehouse/docker-cockroach-cfssl-certs/cmd/global"
"github.com/utilitywarehouse/docker-cockroach-cfssl-certs/cmd/refresh"
"github.com/utilitywarehouse/docker-cockroach-cfssl-certs/cmd/refreshandforward"
"github.com/utilitywarehouse/docker-cockroach-cfssl-certs/pkg/clitools"
)
//go:generate sh get_version
//go:embed version.txt
var version string
func main() {
app := cli.NewApp()
app.Version = version
app.Name = "cockroach-certs"
// Default Command
app.Flags = global.Flags
app.Action = clitools.CheckGlobalRequired(global.FetchAndSaveCerts, global.RequiredFlags)
app.Usage = "Fetch certificates for Cockroach DB from cfssl CA."
app.Commands = []cli.Command{
refresh.Command,
refreshandforward.Command,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}