MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / newConfigViewCmd

Function newConfigViewCmd

app/cli/cmd/config_view.go:25–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23)
24
25func newConfigViewCmd() *cobra.Command {
26 cmd := &cobra.Command{
27 Use: "view",
28 Short: "View the current CLI configuration",
29 Annotations: map[string]string{
30 skipActionOptsInit: trueString,
31 },
32 Run: func(cmd *cobra.Command, args []string) {
33 fmt.Printf("Config file: %s\n", viper.ConfigFileUsed())
34
35 for _, opt := range []*confOpt{confOptions.controlplaneAPI, confOptions.controlplaneCA, confOptions.CASAPI, confOptions.CASCA} {
36 if v := viper.GetString(opt.viperKey); v != "" {
37 fmt.Printf("%s: %s\n", opt.flagName, v)
38 }
39 }
40 },
41 }
42
43 return cmd
44}

Callers 1

newConfigCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected