MCPcopy Index your code
hub / github.com/devspace-sh/devspace / SetPluginKubeContext

Function SetPluginKubeContext

pkg/devspace/plugin/hook.go:65–77  ·  view source on GitHub ↗
(kubeContext, namespace string)

Source from the content-addressed store, hash-verified

63var kubeContextOnce sync.Once
64
65func SetPluginKubeContext(kubeContext, namespace string) {
66 kubeContextOnce.Do(func() {
67 pluginContextLock.Lock()
68 defer pluginContextLock.Unlock()
69
70 if kubeContext != "" {
71 pluginContext[KubeContextFlagEnv] = kubeContext
72 }
73 if namespace != "" {
74 pluginContext[KubeNamespaceFlagEnv] = namespace
75 }
76 })
77}
78
79var commandOnce sync.Once
80

Callers 1

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected