-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
44 lines (38 loc) · 903 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
39
40
41
42
43
44
package main
import (
"fmt"
"os"
"github.com/sn3d/kconf/cmd/kconf/cluster"
"github.com/sn3d/kconf/cmd/kconf/context"
"github.com/sn3d/kconf/cmd/kconf/ns"
"github.com/sn3d/kconf/cmd/kconf/user"
"github.com/sn3d/kconf/cmd/kconf/export"
"github.com/sn3d/kconf/cmd/kconf/imprt"
"github.com/sn3d/kconf/cmd/kconf/split"
"github.com/urfave/cli/v2"
)
// version is set by goreleaser, via -ldflags="-X 'main.version=...'".
var version = "development"
func main() {
app := &cli.App{
Name: "kconf",
Version: version,
Usage: "managing your kubeconfig",
EnableBashCompletion: true,
Commands: []*cli.Command{
imprt.Cmd,
export.Cmd,
context.Cmd,
user.Cmd,
cluster.Cmd,
ns.Cmd,
split.Cmd,
},
}
err := app.Run(os.Args)
if err != nil {
// print error
fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
os.Exit(1)
}
}