mirror of
https://github.com/elyby/chrly.git
synced 2025-01-20 18:42:49 +05:30
Добавлена команда version для отображения версии
This commit is contained in:
parent
74564b4747
commit
2e9520db89
23
cmd/version.go
Normal file
23
cmd/version.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
"elyby/minecraft-skinsystem/bootstrap"
|
||||||
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var versionCmd = &cobra.Command{
|
||||||
|
Use: "version",
|
||||||
|
Short: "Show the Minecraft Skinsystem version information",
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
fmt.Printf("Version: %s\n", bootstrap.GetVersion())
|
||||||
|
fmt.Printf("Go version: %s\n", runtime.Version())
|
||||||
|
fmt.Printf("OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
RootCmd.AddCommand(versionCmd)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user