Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExecCommand = exec.Command
ExecCommand is used to run external commands. It can be replaced in tests.
Functions ¶
func ChangeFileContent ¶ added in v0.1.0
func ChangeFileContent(cwd string, processorFn FileProcessor) (bool, error)
ChangeFileContent walks through cwd and applies the processorFn to every Go file found. Files in a vendor directory are skipped. It returns true if any file content was modified.
func RunGoMod ¶ added in v0.4.0
RunGoMod executes `go mod tidy`, `go mod download` and `go mod vendor` inside every directory under root that contains a go.mod file referencing github.com/gofiber/fiber. Directories named `vendor` are skipped.
func SetFileFilters ¶ added in v0.6.0
func SetFileFilters(include, exclude []string)
SetFileFilters sets the include and exclude patterns used by ChangeFileContent.
Types ¶
type FileProcessor ¶ added in v0.1.0
FileProcessor processes the file content and returns the modified content.
type Prompt ¶
type Prompt struct {
// contains filtered or unexported fields
}
Prompt represents a small interactive input prompt used in the CLI.
type SpinnerCmd ¶ added in v0.0.5
type SpinnerCmd struct {
// contains filtered or unexported fields
}
SpinnerCmd wraps an exec.Cmd and displays a spinner while it runs.
func NewSpinnerCmd ¶ added in v0.0.5
func NewSpinnerCmd(cmd *exec.Cmd, title ...string) *SpinnerCmd
NewSpinnerCmd returns a SpinnerCmd that runs the given command. The optional title is shown alongside the spinner.
func (*SpinnerCmd) Init ¶ added in v0.0.5
func (t *SpinnerCmd) Init() tea.Cmd
Init implements the tea.Model interface.
func (*SpinnerCmd) Run ¶ added in v0.0.5
func (t *SpinnerCmd) Run() (err error)
Run executes the command and manages the spinner lifecycle.
func (*SpinnerCmd) UpdateOutput ¶ added in v0.0.5
func (t *SpinnerCmd) UpdateOutput(c <-chan []byte)
UpdateOutput retrieves lines from c and stores them for display.
func (*SpinnerCmd) View ¶ added in v0.0.5
func (t *SpinnerCmd) View() string
type SpinnerTask ¶ added in v0.0.5
type SpinnerTask struct {
// contains filtered or unexported fields
}
SpinnerTask runs a Task while showing a spinner animation.
func NewSpinnerTask ¶ added in v0.0.5
func NewSpinnerTask(title string, task Task) *SpinnerTask
NewSpinnerTask creates a SpinnerTask with the provided title and Task.
func (*SpinnerTask) Init ¶ added in v0.0.5
func (t *SpinnerTask) Init() tea.Cmd
Init implements the tea.Model interface.
func (*SpinnerTask) Run ¶ added in v0.0.5
func (t *SpinnerTask) Run() (err error)
Run executes the task while showing a spinner.
func (*SpinnerTask) View ¶ added in v0.0.5
func (t *SpinnerTask) View() string
View renders the spinner view.