mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
7fc4899507
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
21 lines
375 B
Go
21 lines
375 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/filebrowser/filebrowser/v2/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version number",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println("File Browser v" + version.Version + "/" + version.CommitSHA)
|
|
},
|
|
}
|