webdav-server/cmd/version.go

19 lines
300 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var version = "untracked"
func init() {
rootCmd.AddCommand(&cobra.Command{
Use: "version",
Short: "Print the version number",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("WebDAV version: %s\n", version)
},
})
}