plugins

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// Name returns the name of the plugin (used as the command name)
	Name() string

	// Description returns a short description of what the plugin does
	Description() string

	// Execute runs the plugin with the given arguments and output format
	Execute(args []string, outputFormat string) error
}

Plugin defines the interface that all command plugins must implement

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry manages all registered plugins

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new plugin registry

func (*Registry) All

func (r *Registry) All() []Plugin

All returns all registered plugins

func (*Registry) Get

func (r *Registry) Get(name string) (Plugin, bool)

Get retrieves a plugin by name

func (*Registry) Register

func (r *Registry) Register(plugin Plugin) error

Register adds a plugin to the registry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL