MCPcopy
hub / github.com/psviderski/uncloud / SetCurrentContext

Method SetCurrentContext

internal/cli/cli.go:68–74  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

66}
67
68func (cli *CLI) SetCurrentContext(name string) error {
69 if _, ok := cli.Config.Contexts[name]; !ok {
70 return api.ErrNotFound
71 }
72 cli.Config.CurrentContext = name
73 return cli.Config.Save()
74}
75
76func (cli *CLI) ContextOverrideOrCurrent() string {
77 if cli.contextOverride != "" {

Callers 3

initRemoteMachineMethod · 0.95
NewUseCommandFunction · 0.80
selectContextFunction · 0.80

Calls 1

SaveMethod · 0.45

Tested by

no test coverage detected