Documentation
¶
Overview ¶
Package apply brings a project in line with its platformgo.yaml.
A plan compares three things: what generation produces now, what the project has on disk, and what platformgo.lock says was applied before. From that it knows which files to write, which files a newly enabled module needs, and which generated files belong to a module that is gone. That last part is what makes removing a module a one line edit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plan ¶
type Plan struct {
Service string
Modules []string
Diff lock.Diff
Create []string // files a module needs and the project does not have yet
Write []string // generated files that differ from the project
Delete []string // generated files of removed modules
Kept []string // generated files of removed modules that were edited by hand
AddTools []registry.Tool // tools of enabled modules missing from go.mod
DropTools []string // tools of removed modules still declared in go.mod
LockStale bool // platformgo.lock does not match
Codemods []codemod.Change // project files rewritten for changes of kit
// contains filtered or unexported fields
}
Plan is what apply would do to a project.
Click to show internal directories.
Click to hide internal directories.