Files
grafana/main.go

37 lines
680 B
Go
Raw Normal View History

2014-08-08 12:35:15 +02:00
package main
import (
"os"
2014-10-04 13:33:20 +02:00
"runtime"
"strconv"
2014-08-08 12:35:15 +02:00
2014-10-04 13:33:20 +02:00
"github.com/torkelo/grafana-pro/pkg/cmd"
"github.com/torkelo/grafana-pro/pkg/setting"
2014-11-28 11:51:34 +01:00
"github.com/codegangsta/cli"
2014-08-08 12:35:15 +02:00
)
var version = "master"
var commit = "NA"
var buildstamp string
2014-08-08 12:35:15 +02:00
2014-10-04 13:33:20 +02:00
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
}
2014-08-08 12:35:15 +02:00
2014-10-04 13:33:20 +02:00
func main() {
buildstampInt64, _ := strconv.ParseInt(buildstamp, 10, 64)
setting.BuildVersion = version
setting.BuildCommit = commit
setting.BuildStamp = buildstampInt64
2014-10-04 13:33:20 +02:00
app := cli.NewApp()
app.Name = "Grafana Backend"
app.Usage = "grafana web"
app.Version = version
2014-11-28 11:51:34 +01:00
app.Commands = []cli.Command{cmd.CmdWeb}
2014-10-04 13:33:20 +02:00
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args)
2014-08-08 12:35:15 +02:00
}