Files
filebrowser/cmd/version.go
T

21 lines
356 B
Go
Raw Normal View History

2019-01-05 22:44:33 +00:00
package cmd
import (
2019-02-15 12:54:44 +01:00
"fmt"
2019-01-05 22:44:33 +00:00
2019-02-15 12:54:44 +01:00
"github.com/filebrowser/filebrowser/v2/version"
2019-01-05 22:44:33 +00:00
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
2019-02-15 12:54:44 +01:00
Short: "Print the version number",
2019-01-05 22:44:33 +00:00
Run: func(cmd *cobra.Command, args []string) {
2019-02-15 12:54:44 +01:00
fmt.Println("File Browser Version " + version.Version)
2019-01-05 22:44:33 +00:00
},
}