registry

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

type Tool struct {
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	Binary        string   `json:"binary"`
	BinaryAliases []string `json:"binaryAliases,omitempty"`
	Brew          string   `json:"brew"`
	Apt           string   `json:"apt"`
	Fallback      string   `json:"fallback"`
	Requires      []string `json:"requires,omitempty"`
}

Tool describes a single installable tool from the registry.

func Find

func Find(name string) *Tool

Find returns the tool with the given name, or nil if not found.

func List

func List() []Tool

List returns a copy of all registered tools.

func (Tool) BinaryName

func (t Tool) BinaryName() string

BinaryName returns the primary executable name for the tool. Falls back to Name when the Binary field is empty.

func (Tool) BinaryNames

func (t Tool) BinaryNames() []string

BinaryNames returns all candidate executable names for the tool. When BinaryAliases is non-empty it is returned as-is; otherwise a single-element slice containing BinaryName() is returned. Callers that need to detect whether a tool is installed should try each name in order and stop at the first match.

Jump to

Keyboard shortcuts

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