MCPcopy
hub / github.com/MadAppGang/dingo / RegisterPlugin

Method RegisterPlugin

pkg/plugin/plugin.go:43–50  ·  view source on GitHub ↗

RegisterPlugin adds a plugin to the pipeline

(plugin Plugin)

Source from the content-addressed store, hash-verified

41
42// RegisterPlugin adds a plugin to the pipeline
43func (p *Pipeline) RegisterPlugin(plugin Plugin) {
44 p.plugins = append(p.plugins, plugin)
45
46 // Set context if plugin is ContextAware
47 if ca, ok := plugin.(ContextAware); ok {
48 ca.SetContext(p.Ctx)
49 }
50}
51
52// Transform transforms an AST using the 3-phase pipeline
53// Phase 1: Discovery - Process() to discover types

Callers 2

NewWithPluginsFunction · 0.95
RegisterDefaultPluginsFunction · 0.80

Calls 1

SetContextMethod · 0.65

Tested by

no test coverage detected