Skip to main content

Module go_resolve

Module go_resolve 

Source
Expand description

Discover go.mod modules and resolve import paths to files on disk.

Structs§

GoModule
One Go module root: module path from go.mod and directory containing go.mod.
GoReplace
replace old => ../local from go.mod: imports under old/... resolve under local_root.

Functions§

discover_go_modules
Walk root for go.mod files and parse module lines.
discover_go_replaces
Collect replace directives from every go.mod under root.
is_likely_third_party_go_import
First path segment looks like a domain (third-party / vanity), not a local module alias.
resolve_go_import_to_known_go_file
Resolve import to a scanned .go file path using replace, go.mod roots, then substring fallback.