Documentation
¶
Overview ¶
Package gomod keeps Go module paths in step with the project's identity.
Every module in the workspace is rooted at github.com/<repo_owner>/<name>: the shared module common/go owns that root directly, and each service owns the root plus its own name. When [project] name or repo_owner changes in project.toml, refresh calls Sync to propagate the new identity everywhere — rewriting the `module`, `require` and `replace` directives in every go.mod and the import paths that depend on them, so the project still builds after a rename.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync reconciles Go module paths against the project's current identity.
func (*Sync) Run ¶
Run reconciles the workspace against the project's owner and name. It reconciles every go.mod — the module directive plus any require or replace directive that names the old namespace — then, when the namespace root actually moved, rewrites the import paths across all Go sources so they resolve again. It returns the paths of every file changed.