You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
314 B
26 lines
314 B
1 year ago
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
const versionStr = "0.2.4"
|
||
|
|
||
|
var (
|
||
|
versionCmd = &cobra.Command{
|
||
|
Use: "version",
|
||
|
Short: "Prints the version and exits.",
|
||
|
Run: version,
|
||
|
}
|
||
|
)
|
||
|
|
||
|
func version(cmd *cobra.Command, args []string) {
|
||
|
|
||
|
fmt.Printf("v%s\n", versionStr)
|
||
|
|
||
|
os.Exit(0)
|
||
|
}
|