Skip to content

Commit

Permalink
Merge pull request #23 from xushiwei/q
Browse files Browse the repository at this point in the history
Module.Lookup bugfix: ModDir for PkgtStandard
  • Loading branch information
xushiwei authored Sep 30, 2023
2 parents 24e72fc + 54e62ad commit 406630a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gopmod/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type Package struct {
func (p *Module) Lookup(pkgPath string) (pkg *Package, err error) {
switch pt := p.PkgType(pkgPath); pt {
case PkgtStandard:
modDir := runtime.GOROOT()
modDir := runtime.GOROOT() + "/src"
pkg = &Package{Type: PkgtStandard, ModDir: modDir, Dir: filepath.Join(modDir, pkgPath)}
case PkgtModule:
modPath := p.Path()
Expand Down

0 comments on commit 406630a

Please sign in to comment.