Documentation
¶
Overview ¶
Package deprecation carries a process-level notice that the command currently being executed is a backward-compatibility alias, kept alive for users whose skill predates a refactor. The notice is surfaced in JSON output envelopes via output.PendingNotice (wired in cmd/root.go), mirroring internal/skillscheck.
A CLI process runs exactly one shortcut, so a single process-level slot is sufficient: the command's Execute records the notice before producing output, and the output layer reads it back when building the envelope.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetPending ¶
func SetPending(n *Notice)
SetPending stores the notice for consumption by output decorators. Pass nil to clear.
Types ¶
type Notice ¶
type Notice struct {
Command string `json:"command"`
Replacement string `json:"replacement,omitempty"`
Skill string `json:"skill,omitempty"`
}
Notice describes a deprecated command alias and the current command that replaces it. Replacement and Skill are optional.
func GetPending ¶
func GetPending() *Notice
GetPending returns the pending deprecation notice, or nil.