MCPcopy Create free account
hub / github.com/exercism/cli / printCurrentConfig

Function printCurrentConfig

cmd/configure.go:199–211  ·  view source on GitHub ↗
(configuration config.Config)

Source from the content-addressed store, hash-verified

197}
198
199func printCurrentConfig(configuration config.Config) {
200 w := tabwriter.NewWriter(Err, 0, 0, 2, ' ', 0)
201 defer w.Flush()
202
203 v := configuration.UserViperConfig
204
205 fmt.Fprintln(w, "")
206 fmt.Fprintln(w, fmt.Sprintf("Config dir:\t\t%s", configuration.Dir))
207 fmt.Fprintln(w, fmt.Sprintf("Token:\t(-t, --token)\t%s", v.GetString("token")))
208 fmt.Fprintln(w, fmt.Sprintf("Workspace:\t(-w, --workspace)\t%s", v.GetString("workspace")))
209 fmt.Fprintln(w, fmt.Sprintf("API Base URL:\t(-a, --api)\t%s", v.GetString("apibaseurl")))
210 fmt.Fprintln(w, "")
211}
212
213func commandify(flags *pflag.FlagSet) string {
214 var cmd string

Callers 1

runConfigureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected