mirror of https://github.com/knative/func.git
26 lines
369 B
Go
26 lines
369 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Version
|
|
// Printed on subcommand `version` or flag `--version`
|
|
const Version = "v0.0.15"
|
|
|
|
func init() {
|
|
root.AddCommand(versionCmd)
|
|
}
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print version",
|
|
Run: version,
|
|
}
|
|
|
|
func version(cmd *cobra.Command, args []string) {
|
|
fmt.Println(Version)
|
|
}
|