mirror of
https://github.com/mudler/luet.git
synced 2025-04-27 19:25:15 +00:00
and add a `version` command that only prints the version (without the build time) Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
20 lines
274 B
Go
20 lines
274 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
RootCmd.AddCommand(versionCmd)
|
|
}
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version of luet",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println(Version)
|
|
},
|
|
}
|