plugins

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(name string, static ...bool) bool

Has checks if plugin exists

@static (optional):
- true: check plugin only if static
- false: check plugin only if dynamic

func New

func New(name string, cb func(args map[string]string, cont []byte, static bool) ([]byte, error), static ...bool) error

New creates a new plugin

@static (default: false):
- true: call at compiletime
- false: call at runtime

func Remove

func Remove(name string)

Remove a plugin by name

Types

type Plugin

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

func Get

func Get(name string, static ...bool) (*Plugin, bool)

Get a plugin by name

@static (optional):
- true: get plugin only if static
- false: get plugin only if dynamic

func (*Plugin) Run

func (plugin *Plugin) Run(args map[string]string, cont []byte, static bool) ([]byte, error)

Run plugin

func (*Plugin) Static

func (plugin *Plugin) Static() bool

Static returns whether or not plugin is static (true) or dynamic (false)

Jump to

Keyboard shortcuts

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