mirror of
				https://github.com/filebrowser/filebrowser.git
				synced 2025-10-31 17:23:09 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			376 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			376 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package cmd
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| 
 | |
| 	"github.com/spf13/cobra"
 | |
| 
 | |
| 	"github.com/filebrowser/filebrowser/v2/version"
 | |
| )
 | |
| 
 | |
| 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)
 | |
| 	},
 | |
| }
 | 
