-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package config | ||
|
||
import "github.com/lyft/flytestdlib/config" | ||
|
||
//go:generate pflags Config | ||
|
||
var ( | ||
defaultConfig = &Config{} | ||
section = config.MustRegisterSection("root", defaultConfig) | ||
) | ||
|
||
type Config struct { | ||
Project string `json:"project" pflag:",Specifies the project to work on."` | ||
Domain string `json:"domain" pflag:",Specified the domain to work on."` | ||
} | ||
|
||
func GetConfig() *Config { | ||
return section.GetConfig().(*Config) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
admin: | ||
endpoint: dns:///flyte.lyft.net | ||
endpoint: http://localhost:30082 | ||
insecure: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/lyft/flytectl/cmd/config" | ||
"github.com/lyft/flytestdlib/logger" | ||
"github.com/lyft/flytestdlib/version" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var ( | ||
versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Displays version information for the client and server.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
version.LogBuildInformation("flytectl") | ||
logger.InfofNoCtx(config.GetConfig().Project) | ||
logger.InfofNoCtx(config.GetConfig().Domain) | ||
}, | ||
} | ||
) |