Expand description
Discover go.mod modules and resolve import paths to files on disk.
Structs§
- GoModule
- One Go module root:
modulepath from go.mod and directory containing go.mod. - GoReplace
replace old => ../localfrom go.mod: imports underold/...resolve underlocal_root.
Functions§
- discover_
go_ modules - Walk
rootforgo.modfiles and parsemodulelines. - discover_
go_ replaces - Collect
replacedirectives from everygo.modunderroot. - 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
.gofile path usingreplace, go.mod roots, then substring fallback.