Documentation ¶
Index ¶
- Constants
- func CallFunctions(reverse bool, fs ...func() error) error
- func DoCommands(mon CommandMon, dryRun bool, cmds ...Command) error
- func EndCommands(mon CommandMon, dryRun bool, cmds ...Command) error
- func UndoCommands(mon CommandMon, dryRun bool, cmds ...Command)
- type Command
- type CommandAction
- type CommandMon
- type Commands
- type Shell
- type ShellCommand
- type SrChanges
- func (c SrChanges) Compare(keys ...string) bool
- func (c SrChanges) GetChange(key string) bool
- func (c SrChanges) GetChanges(keys ...string) bool
- func (c SrChanges) OneOfChange(keys ...string) bool
- func (c SrChanges) SetChange(key string)
- func (c SrChanges) SetChanges(keys ...string)
- func (c SrChanges) String() string
Constants ¶
View Source
const ( CommandActionDo = CommandAction("Do") CommandActionUndo = CommandAction("Undo") CommandActionEnd = CommandAction("End") )
Variables ¶
This section is empty.
Functions ¶
func CallFunctions ¶
func DoCommands ¶
func DoCommands(mon CommandMon, dryRun bool, cmds ...Command) error
func EndCommands ¶
func EndCommands(mon CommandMon, dryRun bool, cmds ...Command) error
func UndoCommands ¶
func UndoCommands(mon CommandMon, dryRun bool, cmds ...Command)
Types ¶
type CommandAction ¶
type CommandAction string
type CommandMon ¶
type CommandMon func(CommandAction, Command, []byte)
type Commands ¶
type Commands struct { DryRun bool // contains filtered or unexported fields }
func NewCommands ¶
func NewCommands(mon CommandMon) *Commands
type ShellCommand ¶
type ShellCommand struct {
// contains filtered or unexported fields
}
func NewShellCommand ¶
func NewShellCommand(doCmd, undoCmd, endCmd *Shell) *ShellCommand
func (*ShellCommand) DoCommand ¶
func (s *ShellCommand) DoCommand() ([]byte, error)
func (*ShellCommand) EndCommand ¶
func (s *ShellCommand) EndCommand() ([]byte, error)
func (*ShellCommand) Line ¶
func (s *ShellCommand) Line(action CommandAction) string
func (*ShellCommand) String ¶
func (s *ShellCommand) String() string
func (*ShellCommand) UndoCommand ¶
func (s *ShellCommand) UndoCommand() ([]byte, error)
type SrChanges ¶
type SrChanges map[string]struct{}
func NewSrChanges ¶
func NewSrChanges() SrChanges
func (SrChanges) GetChanges ¶
func (SrChanges) OneOfChange ¶
func (SrChanges) SetChanges ¶
Click to show internal directories.
Click to hide internal directories.