feat: add version

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2018-12-28 19:44:38 +00:00
parent 2361259e27
commit 7992c8bf50
2 changed files with 6 additions and 1 deletions

View File

@ -97,7 +97,7 @@ var versionCmd = &cobra.Command{
Use: "version", Use: "version",
Short: "Print the version number", Short: "Print the version number",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
fmt.Println("File Browser Version (UNTRACKED)") fmt.Println("File Browser Version " + types.Version)
}, },
} }

View File

@ -18,6 +18,11 @@ import (
"github.com/spf13/afero" "github.com/spf13/afero"
) )
const (
// Version is the current File Browser version.
Version = "(untracked)"
)
// File describes a file. // File describes a file.
type File struct { type File struct {
*Listing *Listing