all repos — weimar @ 9b2b569d75975b2ae6868e6708a18ee78a305125

Unnamed repository; edit this file 'description' to name the repository.

cmd/weimar/version.go (view raw)

 1package main
 2
 3import (
 4	"fmt"
 5
 6	"github.com/spf13/cobra"
 7)
 8
 9var (
10	Version   = "dev"
11	BuildDate = "unknown"
12)
13
14var versionCmd = &cobra.Command{
15	Use:   "version",
16	Short: "Print version information",
17	RunE: func(cmd *cobra.Command, args []string) error {
18		fmt.Fprintf(cmd.OutOrStdout(), "weimar %s (built %s)\n", Version, BuildDate)
19		return nil
20	},
21}
22
23func init() {
24	rootCmd.AddCommand(versionCmd)
25}