MCPcopy Create free account
hub / github.com/anchordotdev/cli / ContextWithConfig

Function ContextWithConfig

cli.go:144–146  ·  view source on GitHub ↗
(ctx context.Context, cfg *Config)

Source from the content-addressed store, hash-verified

142}
143
144func ContextWithConfig(ctx context.Context, cfg *Config) context.Context {
145 return context.WithValue(ctx, configKey, cfg)
146}
147
148func ReportError(ctx context.Context, err error, drv *ui.Driver, cmd *cobra.Command, args []string) {
149 cfg := ConfigFromContext(ctx)

Callers 15

TestErrorFunction · 0.92
TestPanicFunction · 0.92
TestTrustFunction · 0.92
TestAuditFunction · 0.92
TestCleanFunction · 0.92
TestWhoAmIFunction · 0.92
PerformMethod · 0.92
TestSignoutFunction · 0.92
TestSelectorFunction · 0.92
TestConfigViaFunction · 0.92
TestLclMkcertFunction · 0.92
TestTrustFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestErrorFunction · 0.74
TestPanicFunction · 0.74
TestTrustFunction · 0.74
TestAuditFunction · 0.74
TestCleanFunction · 0.74
TestWhoAmIFunction · 0.74
TestSignoutFunction · 0.74
TestSelectorFunction · 0.74
TestConfigViaFunction · 0.74
TestLclMkcertFunction · 0.74
TestTrustFunction · 0.74
TestSetupFunction · 0.74