mirror of
https://github.com/Luzifer/ots.git
synced 2024-12-20 21:14:38 -05:00
3df42cbd32
Signed-off-by: Knut Ahlers <knut@ahlers.me>
20 lines
300 B
Go
20 lines
300 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Displays the tool version",
|
|
Run: func(*cobra.Command, []string) {
|
|
fmt.Printf("ots-cli %s\n", version) //nolint:forbidigo
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|