2023-12-13 15:26:33 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var versionCmd = &cobra.Command{
|
|
|
|
Use: "version",
|
|
|
|
Short: "Displays the tool version",
|
2024-03-02 10:19:11 +00:00
|
|
|
Run: func(*cobra.Command, []string) {
|
2023-12-13 15:26:33 +00:00
|
|
|
fmt.Printf("ots-cli %s\n", version) //nolint:forbidigo
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(versionCmd)
|
|
|
|
}
|