Documentation
¶
Overview ¶
Package pack writes packs into a project. A pack is a directory of ready-made machines, in a git repository or on this computer.
Index ¶
Constants ¶
const Dir = ".packs"
Dir is the directory in a project that holds its packs. Corbie rewrites it, and a person changes nothing in it.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Report ¶
type Report struct {
Packs []Written `json:"packs"`
Started []string `json:"started"` // the starting files it wrote
Differ []string `json:"differ"` // the starting files that were there, and are not as the pack starts them
}
A Report is what corbie add did.
func Add ¶
Add writes a pack into a project. It rewrites the pack's directory under .packs, and that of each pack of the same source that the pack's files name. It writes each starting file that is not there and that it has not written before, with each word set written in place of itself in the file's path and text. It adds .packs/ to the project's .corbieignore when it lacks it. It changes no other file.
type Source ¶
type Source struct {
Text string // as it was written, with its ref
Repo string // what git fetches from; empty for a directory that is copied as it is
Path string // the pack's directory: under the repository, or on this computer
Ref string // a tag, a branch or a commit; empty for the default branch
Name string // the pack's name: the last part of its path
}
A Source is where a pack comes from, as corbie add was given it.