externalcmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const EnvDebugCommands = "GOFUL_DEBUG_COMMANDS"

EnvDebugCommands enables DEBUG output for command loading.

View Source
const MenuName = "external-command"

MenuName is the canonical menu that hosts external command bindings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Menu      string   `json:"menu" yaml:"menu"`
	Key       string   `json:"key" yaml:"key"`
	Label     string   `json:"label" yaml:"label"`
	Command   string   `json:"command" yaml:"command"`
	RunMenu   string   `json:"runMenu" yaml:"runMenu"`
	Offset    int      `json:"offset" yaml:"offset"`
	Platforms []string `json:"platforms" yaml:"platforms"`
	Disabled  bool     `json:"disabled" yaml:"disabled"`
}

Entry represents a single external command binding definition. [IMPL:EXTERNAL_COMMAND_LOADER] [ARCH:EXTERNAL_COMMAND_REGISTRY] [REQ:EXTERNAL_COMMAND_CONFIG]

func Defaults

func Defaults(goos string) []Entry

Defaults returns a deep copy of the built-in entries for the current GOOS. [IMPL:EXTERNAL_COMMAND_LOADER] [ARCH:EXTERNAL_COMMAND_REGISTRY] [REQ:EXTERNAL_COMMAND_CONFIG]

func Load

func Load(opts Options) ([]Entry, error)

Load resolves and parses the external command configuration file. Falls back to baked-in defaults if the file is missing or invalid. [IMPL:EXTERNAL_COMMAND_LOADER] [ARCH:EXTERNAL_COMMAND_REGISTRY] [REQ:EXTERNAL_COMMAND_CONFIG]

type Options

type Options struct {
	Path     string
	GOOS     string
	ReadFile func(string) ([]byte, error)
	Logf     func(format string, args ...interface{})
	Debug    bool
}

Options controls how the loader resolves and parses the config file.

Jump to

Keyboard shortcuts

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