Register adds a plugin to the global registry. Plugins call this from init() (typically through a blank import in the embedder's main). Register is intentionally tolerant of malformed input: validation happens later in the host's InstallAll phase, where errors can be surfaced through the typed plug
(p Plugin)
| 17 | // The registry holds plugins in insertion order so InstallAll can |
| 18 | // process them deterministically. |
| 19 | func Register(p Plugin) { |
| 20 | pluginRegistry.add(p) |
| 21 | } |
| 22 | |
| 23 | // RegisteredPlugins returns a snapshot of the global plugin registry. |
| 24 | // Order matches Register insertion. The host reads this once during |