1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-28 11:36:27 +00:00
rke/main.go

37 lines
664 B
Go
Raw Normal View History

2017-10-26 00:02:49 +00:00
package main
import (
"os"
"github.com/Sirupsen/logrus"
2017-10-29 09:45:21 +00:00
"github.com/rancher/rke/cmd"
2017-10-26 00:02:49 +00:00
"github.com/urfave/cli"
)
2017-10-29 09:45:21 +00:00
var VERSION = "v0.1.0-dev"
2017-10-26 00:02:49 +00:00
func main() {
app := cli.NewApp()
app.Name = "rke"
app.Version = VERSION
2017-10-29 09:45:21 +00:00
app.Usage = "Rancher Kubernetes Engine, Running kubernetes cluster in the cloud"
app.Before = func(ctx *cli.Context) error {
if ctx.GlobalBool("debug") {
logrus.SetLevel(logrus.DebugLevel)
}
2017-10-26 00:02:49 +00:00
return nil
}
2017-10-29 09:45:21 +00:00
app.Author = "Rancher Labs, Inc."
app.Email = ""
app.Commands = []cli.Command{
cmd.ClusterCommand(),
}
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "debug,d",
Usage: "Debug logging",
},
}
2017-10-26 00:02:49 +00:00
app.Run(os.Args)
}