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
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
starter
|
|
|
app/controllers
Package controllers holds the HTTP handlers.
|
Package controllers holds the HTTP handlers. |
|
app/jobs
Package jobs holds the queued jobs.
|
Package jobs holds the queued jobs. |
|
app/models
Package models holds the database models.
|
Package models holds the database models. |
|
app/requests
Package requests holds validated request inputs.
|
Package requests holds validated request inputs. |
|
database/factories
Package factories builds models with fake data for tests and seeders.
|
Package factories builds models with fake data for tests and seeders. |
|
routes
Package routes declares the HTTP routes.
|
Package routes declares the HTTP routes. |
Click to show internal directories.
Click to hide internal directories.