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

23 lines
418 B
Go
Raw Normal View History

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