Versions in this module Expand all Collapse all v0 v0.1.1 Dec 9, 2025 v0.1.0 Jul 25, 2025 Changes in this version + const StatusErr + const StatusOk + var CommandLocked = errors.New("command is locked, skipping execution") + func Bootstrap(args []string, availableCommands *CommandsRegistry, outputWriter io.Writer, ...) + type Command interface + DefineFlags func(flagSet *flag.FlagSet) + Description func() string + Exec func(stdWriter io.Writer) error + Id func() string + ValidateFlags func() error + type CommandWithoutFlags struct + func (*CommandWithoutFlags) DefineFlags(*flag.FlagSet) + func (*CommandWithoutFlags) ValidateFlags() error + type CommandsRegistry struct + func NewCommandsRegistry() *CommandsRegistry + func (registry *CommandsRegistry) Command(id string) (Command, bool) + func (registry *CommandsRegistry) Commands() map[string]Command + func (registry *CommandsRegistry) Register(cmd Command) error + type FsLockableCommand struct + Command Command + func NewLockableCommand(cmd Command, lockFileDirPath string) *FsLockableCommand + func NewLockableCommandWithLockName(cmd Command, lockFileDirPath string, lockName string) *FsLockableCommand + func (l *FsLockableCommand) DefineFlags(flagSet *flag.FlagSet) + func (l *FsLockableCommand) Description() string + func (l *FsLockableCommand) Exec(stdWriter io.Writer) error + func (l *FsLockableCommand) Id() string + func (l *FsLockableCommand) Lock() (bool, error) + func (l *FsLockableCommand) Unlock() error + func (l *FsLockableCommand) ValidateFlags() error + type HelpCommand struct + func NewHelpCommand(availableCommands []Command) *HelpCommand + func (c *HelpCommand) Description() string + func (c *HelpCommand) Exec(baseWriter io.Writer) error + func (c *HelpCommand) Id() string + type LockableCommand interface + Lock func() (bool, error) + Unlock func() error