-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
49 lines (45 loc) · 1.2 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
package main
import (
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"k8s-playground/cmd"
"k8s-playground/conf"
"k8s-playground/util/version"
"os"
)
var debug bool
func init() {
log.SetOutput(os.Stdout)
if os.Getenv("DEBUG") != "" {
log.SetFormatter(&log.TextFormatter{
ForceColors: false,
DisableColors: false,
ForceQuote: false,
DisableQuote: true,
EnvironmentOverrideColors: false,
DisableTimestamp: false,
FullTimestamp: false,
TimestampFormat: "",
DisableSorting: false,
SortingFunc: nil,
DisableLevelTruncation: false,
PadLevelText: false,
QuoteEmptyFields: false,
FieldMap: nil,
CallerPrettyfier: nil,
})
log.SetLevel(log.InfoLevel)
}
}
func main() {
//defer timeUtil.FromStart(time.Now(), "Cli Command Execution")
version.Lookup()
app := cli.NewApp()
app.Version = conf.VERSION
app.Usage = "This CLI brings together some personal tests using the K8S and OCP libraries."
app.Commands = cmd.Cmds
err := app.Run(os.Args)
if err != nil {
log.Fatalf("Main: %s", err)
}
}