Documentation
¶
Overview ¶
Package cli implements the global `vukem` command: project scaffolding, generators, the dev server and delegation of app commands to the project's own binary (cmd/app). It works on files and never imports user code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUsage = errors.New("usage error")
ErrUsage marks invalid invocations; Run exits with code 2.
Functions ¶
Types ¶
type Env ¶
type Env struct {
// Dir is the project directory (the working directory).
Dir string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// Interactive reports that Stdin is a terminal, so commands may prompt.
Interactive bool
// Getenv reads the process environment.
Getenv func(string) (string, bool)
// Now is the clock used for migration timestamps.
Now func() time.Time
// Version overrides the build-info version (tests).
Version string
}
Env is everything the CLI touches outside its arguments, so tests can run it in a temp directory with captured output.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.