Files
cilium-envoy-hook/cmd/version.go
2023-07-22 06:32:44 +00:00

25 lines
328 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var (
// Version is set at compile time.
Version = "dev"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(Version)
},
}