This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/cmd/poke/version.go

23 lines
418 B
Go
Raw Normal View History

2016-07-26 01:30:28 +05:30
package main
import (
"fmt"
"runtime"
"github.com/coreos/poke/version"
"github.com/spf13/cobra"
)
func commandVersion() *cobra.Command {
return &cobra.Command{
2016-08-10 03:08:09 +05:30
Use: "version",
Short: "Print the version and exit",
2016-07-26 01:30:28 +05:30
Run: func(cmd *cobra.Command, args []string) {
2016-08-10 03:08:09 +05:30
fmt.Printf(`dex Version:%s
Go Version: %s
Go OS/ARCH: %s %s
2016-07-26 01:30:28 +05:30
`, version.Version, runtime.Version(), runtime.GOOS, runtime.GOARCH)
},
}
}