You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
413 B
25 lines
413 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
var Version = "nightly"
|
|
|
|
func main() {
|
|
|
|
if viper.GetBool("version") {
|
|
fmt.Print(Version)
|
|
return
|
|
}
|
|
|
|
viper.SetConfigFile(viper.GetString("config"))
|
|
if err := viper.ReadInConfig(); err != nil {
|
|
logrus.Debugf("Skip invalid config file %s, %v", viper.ConfigFileUsed(), err)
|
|
}
|
|
|
|
logrus.Infof("Version: %s", Version)
|
|
}
|
|
|