Update version output
parent
004f6ef0a2
commit
b7887ed162
|
@ -86,13 +86,22 @@ func setupViper() {
|
|||
viper.AddConfigPath(".")
|
||||
}
|
||||
|
||||
func printVersion() {
|
||||
if version == "" {
|
||||
fmt.Println("filemanager is at an untracked version")
|
||||
} else {
|
||||
fmt.Println("filemanager", version)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func main() {
|
||||
setupViper()
|
||||
flag.Parse()
|
||||
|
||||
if showVer {
|
||||
fmt.Println("filemanager version", version)
|
||||
os.Exit(0)
|
||||
printVersion()
|
||||
}
|
||||
|
||||
// Add a configuration file if set.
|
||||
|
|
Loading…
Reference in New Issue