Documentation
¶
Index ¶
- Variables
- func DocsCommand() *ffcli.Command
- func DocsInitCommand() *ffcli.Command
- func DocsListCommand() *ffcli.Command
- func DocsShowCommand() *ffcli.Command
- func NewInitReferenceCommand(flagSetName, commandName, shortUsage, shortHelp, longHelp, errorPrefix string) *ffcli.Command
- type InitOptions
- type InitResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrASCReferenceExists indicates ASC.md already exists and --force was not set. ErrASCReferenceExists = errors.New("ASC.md already exists") // ErrInvalidASCReferencePath indicates --path does not target ASC.md or a directory. ErrInvalidASCReferencePath = errors.New("path must target ASC.md or a directory") )
Functions ¶
func DocsInitCommand ¶
DocsInitCommand returns the docs init subcommand.
func DocsListCommand ¶
DocsListCommand returns the docs list subcommand.
func DocsShowCommand ¶
DocsShowCommand returns the docs show subcommand.
func NewInitReferenceCommand ¶
func NewInitReferenceCommand(flagSetName, commandName, shortUsage, shortHelp, longHelp, errorPrefix string) *ffcli.Command
NewInitReferenceCommand builds an init-style command that writes ASC.md references.
Types ¶
type InitOptions ¶
InitOptions controls ASC reference generation.
type InitResult ¶
type InitResult struct {
Path string `json:"path"`
Created bool `json:"created"`
Overwritten bool `json:"overwritten"`
Linked []string `json:"linked,omitempty"`
}
InitResult describes the output of an init run.
func InitReference ¶
func InitReference(opts InitOptions) (InitResult, error)
InitReference generates ASC.md in the target repo and links agent files. Every validation, including the symlink containment checks on the ASC.md destination and the agent files, runs before the first write, so a failed init leaves the repository untouched.
Click to show internal directories.
Click to hide internal directories.