forked from mystiq/dex
refactor: version command
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
c55d84b5d2
commit
6742008fc2
1 changed files with 8 additions and 5 deletions
|
@ -13,11 +13,14 @@ func commandVersion() *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "Print the version and exit",
|
Short: "Print the version and exit",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(_ *cobra.Command, _ []string) {
|
||||||
fmt.Printf(`dex Version: %s
|
fmt.Printf(
|
||||||
Go Version: %s
|
"Dex Version: %s\nGo Version: %s\nGo OS/ARCH: %s %s\n",
|
||||||
Go OS/ARCH: %s %s
|
version.Version,
|
||||||
`, version.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
runtime.Version(),
|
||||||
|
runtime.GOOS,
|
||||||
|
runtime.GOARCH,
|
||||||
|
)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue