Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindModuleRoot ¶
FindModuleRoot resolves the Go module root using `go env GOMOD`.
func IsOlderThan ¶
IsOlderThan returns true if ver is a valid semver version strictly less than baseline. Returns false if either version is invalid.
func ModuleDependencyVersion ¶
ModuleDependencyVersion returns the version for modulePath in the go.mod file for moduleRoot. Replace directives take precedence over require directives. If a replace exists without a version, it falls back to the require entry.
func ModuleReplace ¶
ModuleReplace reports whether modulePath is replaced in moduleRoot's go.mod and returns the replacement's New.Version. found is true when any replace directive matches modulePath by its old path — covering the same-path (version bump), fork, versioned-old, and path-only (local) replace forms. newVersion is the version the backend actually builds against for a versioned replace, and "" for a path-only local replace (e.g. "=> ./local"), whose effective version cannot be determined from go.mod alone.
ModuleDependencyVersion falls back to the require line for a path-only replace, which is indistinguishable from a plain, un-replaced dependency — use ModuleReplace to tell them apart so a path-only replace can skip a version comparison rather than compare a stale require hint.
Types ¶
This section is empty.