Versions in this module Expand all Collapse all v1 v1.0.91 Jul 30, 2026 v1.0.90 Jul 23, 2026 Changes in this version + var CodeAction = CodeActionBlock + var CommentAction = CommentActionBlock + func Ask(prompt string, f func(string) bool) (string, error) + func AskYesNo(prompt string) (bool, error) + func AskYesNoWithDefault(prompt string, defaultVal bool) (bool, error) + func Continue(prompt string, defaultValue bool) + func Exec(program string, colorStdout bool, args ...string) error + func NewSlowWriter(newlinePause time.Duration) io.Writer + func ParseArgumentsWithStrings(val string) []string + type ActionContext struct + Action string + Body string + Headers map[string]string + Runner *Runner + type ActionHandler interface + Execute func(ctx *ActionContext) error + type ActionHandlerF func(ctx *ActionContext) error + func (self ActionHandlerF) Execute(ctx *ActionContext) error + type CodeActionBlock struct + func (self CodeActionBlock) GetEndToken() string + func (self CodeActionBlock) GetStartToken() string + func (self CodeActionBlock) IsStarting(source []byte) bool + type CommentActionBlock struct + func (self CommentActionBlock) GetEndToken() string + func (self CommentActionBlock) GetStartToken() string + func (self CommentActionBlock) IsStarting(source []byte) bool + type ExecActionHandler struct + func (self *ExecActionHandler) Execute(ctx *ActionContext) error + type Runner struct + AssumeDefault bool + LeftPad int + LineWidth int + NewLinePause time.Duration + func NewRunner() *Runner + func (self *Runner) AddVariable(name string, val interface{}) + func (self *Runner) ClearVariable(name string) + func (self *Runner) EmitTemplatized(s string, out io.Writer) error + func (self *Runner) HandlePause(*ActionContext) error + func (self *Runner) HandlePromptForInput(ctx *ActionContext) error + func (self *Runner) LeftPadBuilder(b *strings.Builder) + func (self *Runner) RegisterActionHandler(action string, handler ActionHandler) + func (self *Runner) RegisterActionHandlerF(action string, handler func(ctx *ActionContext) error) + func (self *Runner) Run(source []byte) error + func (self *Runner) Template(s string) (string, error) + type ShowActionHandler struct + func NewShowActionHandler() *ShowActionHandler + func (self *ShowActionHandler) Add(name, contents string) + func (self *ShowActionHandler) Execute(ctx *ActionContext) error + type WriterWrapper struct + func (self *WriterWrapper) Write(p []byte) (n int, err error)