filebrowser/cmd/version.go

22 lines
371 B
Go
Raw Permalink Normal View History

package cmd
import (
"fmt"
"github.com/spf13/cobra"
2020-06-01 07:12:36 +08:00
"github.com/filebrowser/filebrowser/v2/version"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number",
2024-04-02 00:24:06 +08:00
Run: func(_ *cobra.Command, _ []string) {
fmt.Println("File Browser v" + version.Version + "/" + version.CommitSHA)
},
}