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

Function ExecutePluginHookAt

pkg/devspace/plugin/hook.go:224–241  ·  view source on GitHub ↗
(plugin Metadata, events ...string)

Source from the content-addressed store, hash-verified

222}
223
224func ExecutePluginHookAt(plugin Metadata, events ...string) error {
225 for _, e := range events {
226 // apply global plugin context
227 newEnv := map[string]string{}
228 pluginContextLock.Lock()
229 for k, v := range pluginContext {
230 newEnv[k] = v
231 }
232 pluginContextLock.Unlock()
233
234 err := executePluginHookAt(plugin, e, newEnv)
235 if err != nil {
236 return err
237 }
238 }
239
240 return nil
241}
242
243func executePluginHookAt(plugin Metadata, event string, env map[string]string) error {
244 pluginFolder := plugin.PluginFolder

Callers 3

RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92

Calls 3

executePluginHookAtFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected