mirror of
https://github.com/vee1e/kubearmor-client.git
synced 2026-09-02 18:58:45 +00:00
26 lines
546 B
Go
26 lines
546 B
Go
// SPDX-License-Identifier: Apache-2.0
|
|
// Copyright 2021 Authors of KubeArmor
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/kubearmor/kubearmor-client/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// versionCmd represents the get command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Display version information",
|
|
Long: `Display version information`,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
if err := version.PrintVersion(client); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|