mirror of
https://github.com/Luzifer/ots.git
synced 2024-10-01 01:06:09 -04:00
20 lines
309 B
Go
20 lines
309 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
var versionCmd = &cobra.Command{
|
||
|
Use: "version",
|
||
|
Short: "Displays the tool version",
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
fmt.Printf("ots-cli %s\n", version) //nolint:forbidigo
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
rootCmd.AddCommand(versionCmd)
|
||
|
}
|