func (registry *pluginRegistry) GetPlugin(ID string) Plugin {
	registry.guard.RLock()
	plugin, exists := registry.plugins[ID]
	registry.guard.RUnlock()
	if exists {
		return plugin
	}
	return nil
}
GetPlugin returns a plugin by name or nil if not found.
package core
import (
	"sync"
)
type pluginRegistry struct {
	plugins map[string]Plugin
	guard   *sync.RWMutex
}
var PluginRegistry = pluginRegistry{
	plugins: make(map[string]Plugin),
	guard:   new(sync.RWMutex),
}
func (registry *pluginRegistry) RegisterUnique(plugin Plugin, ID string) bool {
	registry.guard.Lock()
	defer registry.guard.Unlock()
	if _, exists := registry.plugins[ID]; !exists {
		registry.plugins[ID] = plugin
		return true
	}
	return false
}