Documentation
¶
Overview ¶
Package cli discovers the opencode binary and validates its version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("opencode binary not found")
ErrNotFound is returned when the opencode binary cannot be located.
View Source
var ErrUnsupportedVersion = errors.New("opencode binary is older than minimum supported version")
ErrUnsupportedVersion is returned when the discovered binary is older than MinimumVersion.
Functions ¶
This section is empty.
Types ¶
type Discoverer ¶
type Discoverer struct {
// Path pins a specific binary path. If set and non-empty, no $PATH
// lookup is performed.
Path string
// SkipVersionCheck disables the MinimumVersion assertion.
SkipVersionCheck bool
// MinimumVersion is the lowest acceptable opencode version. Empty
// disables the check.
MinimumVersion string
// Logger receives diagnostics. Must not be nil (caller is expected
// to supply io.Discard-backed logger when silent).
Logger *slog.Logger
}
Discoverer resolves the path to the opencode CLI binary.
Click to show internal directories.
Click to hide internal directories.