Update version output
Former-commit-id: 0d8bbcef2b4cdb93fc7c4929b875eb920fc01a64 [formerly 8bf71ac7db4a94d47346bbe382b135f60bc00788] [formerly 1426e8119be5d07f0d2a759f30784a223d76208d [formerly b7887ed162
]]
Former-commit-id: 3e0d9dff358868119c6d3b109896259b84a1e565 [formerly e15610b544cb000a0ce88392bd13949a578fd605]
Former-commit-id: 6497b3d602ac78be939abc70d6c337799e9d85d8
pull/726/head
parent
adc82dd85e
commit
68cb4ee980
|
@ -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