Documentation
¶
Overview ¶
Package cmd messages - error and log message constants Exported so tests can compare against them
Index ¶
Constants ¶
View Source
const ( ErrLoadingVersion = "error loading version" ErrCustomKeyNotFound = "custom key not found" )
Error messages
View Source
const ( LogCommandStarted = "command_started" LogCommandCompleted = "command_completed" LogCommandFailed = "command_failed" LogTagCreated = "tag_created" LogEmitCompleted = "emit_completed" )
Log messages for structured logging
View Source
const ( // FilePermission is the default permission for created files (owner rw, group/other r) FilePermission os.FileMode = 0644 )
File permission constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLISchema ¶
type CLISchema struct {
Schema string `json:"$schema"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Generated string `json:"generated"`
Commands []CommandSchema `json:"commands"`
GlobalFlags []FlagSchema `json:"globalFlags"`
TemplateVariables TemplateVarsSchema `json:"templateVariables"`
}
CLISchema is the root schema describing the CLI
type CommandSchema ¶
type CommandSchema struct {
Name string `json:"name"`
Path []string `json:"path"`
Short string `json:"short"`
Long string `json:"long,omitempty"`
Usage string `json:"usage"`
Aliases []string `json:"aliases,omitempty"`
Flags []FlagSchema `json:"flags,omitempty"`
Subcommands []CommandSchema `json:"subcommands,omitempty"`
}
CommandSchema describes a CLI command
type FlagSchema ¶
type FlagSchema struct {
Name string `json:"name"`
Shorthand string `json:"shorthand,omitempty"`
Type string `json:"type"`
Default string `json:"default"`
Description string `json:"description"`
}
FlagSchema describes a CLI flag
type TemplateVarSchema ¶
type TemplateVarSchema struct {
Name string `json:"name"`
Description string `json:"description"`
Example string `json:"example,omitempty"`
}
TemplateVarSchema describes a template variable
type TemplateVarsSchema ¶
type TemplateVarsSchema struct {
VersionComponents []TemplateVarSchema `json:"versionComponents"`
PreRelease []TemplateVarSchema `json:"preRelease"`
Metadata []TemplateVarSchema `json:"metadata"`
VCS []TemplateVarSchema `json:"vcs"`
CommitInfo []TemplateVarSchema `json:"commitInfo"`
BuildTimestamps []TemplateVarSchema `json:"buildTimestamps"`
}
TemplateVarsSchema groups template variables by category
Click to show internal directories.
Click to hide internal directories.