Documentation ¶
Index ¶
- Variables
- func Failf(msg string, args ...interface{})
- func MustRunCmd(name string, args ...string) string
- func MustRunInteractiveCmd(name string, args ...string)
- func MustRunTestCmd(msg string, name string, args ...string)
- func PrintCmdLine(status CmdStatus, name string, colorNum int, format string, ...)
- func Reformat(ws Workspace, executor Executor, check ReformatCheck) error
- func RunCheck(ws Workspace, executor Executor, check Check, err chan<- error)
- func RunCmd(name string, args ...string) (string, error)
- func SetDebug(d bool)
- type Check
- type CmdStatus
- type Command
- type CommandExecutor
- type Executor
- type ManyChecks
- type Parser
- type ReformatCheck
- type SingleCheck
- type Workspace
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MustRunCmd ¶
func MustRunInteractiveCmd ¶
func MustRunTestCmd ¶
func PrintCmdLine ¶
Types ¶
type CommandExecutor ¶
type CommandExecutor struct {
DryRun bool
}
func (CommandExecutor) Execute ¶
func (executor CommandExecutor) Execute(ws Workspace, cmd Command) error
Run Command returning output and error status
func (CommandExecutor) ExecuteWithOutput ¶
func (executor CommandExecutor) ExecuteWithOutput(ws Workspace, cmd Command) ([]byte, error)
type ManyChecks ¶
type ReformatCheck ¶
type ReformatCheck struct { Check SingleCheck Format SingleCheck }
type SingleCheck ¶
type SingleCheck struct {
Command
}
type Workspace ¶
type Workspace struct { GitDir string // Original git directory WorkDir string // Base of the temporary directory created with git index RootDir string // Base directory of the top-level go package in the git index UpdatedDirs []string // Directories that have changed and still exist (sorted) UpdatedTrees []string // Top directories that have changed and still exist (sorted) UpdatedFiles []string // Files that have changed and still exist UpdatedPackages []string // Packages that have changed and still exist LocallyChangedFiles []string // Files where the git index differs from what's in the working tree }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.