2022-07-16 22:16:29 +00:00
|
|
|
/*
|
|
|
|
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
|
|
|
|
|
|
|
|
*/
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// versionCmd represents the version command
|
|
|
|
var versionCmd = &cobra.Command{
|
|
|
|
Use: "version",
|
2022-07-25 20:43:53 +00:00
|
|
|
Short: "Show gouick version",
|
2022-07-16 22:16:29 +00:00
|
|
|
Run: runVersion,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(versionCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
func runVersion(cmd *cobra.Command, args []string) {
|
|
|
|
// could probably have a look at runtime/debug
|
|
|
|
fmt.Printf("version: v%s\n", version)
|
|
|
|
}
|