OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"runtime"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
// set by the top level build script
|
|
|
|
|
version = ""
|
|
|
|
|
|
|
|
|
|
cmdVersion = &cobra.Command{
|
|
|
|
|
Use: "version",
|
|
|
|
|
Short: "Print the dexctl version.",
|
|
|
|
|
Long: "Print the dexctl version.",
|
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
|
stdout("dex version %s\ngo version %s", strings.TrimPrefix(version, "v"), strings.TrimPrefix(runtime.Version(), "go"))
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
rootCmd.AddCommand(cmdVersion)
|
|
|
|
|
}
|