Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for PackageModRoot (0.14 sec)

  1. src/cmd/go/internal/modload/build.go

    	rs := LoadModFile(ctx)
    	return moduleInfo(ctx, rs, m, 0, nil)
    }
    
    // PackageModRoot returns the module root directory for the module that provides
    // a given package. If modules are not enabled or if the package is in the
    // standard library or if the package was not successfully loaded with
    // LoadPackages or ImportFromFiles, the empty string is returned.
    func PackageModRoot(ctx context.Context, pkgpath string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/cmd/go/internal/load/pkg.go

    			if !cfg.ModulesEnabled {
    				buildMode = build.ImportComment
    			} else {
    				buildContext.GOPATH = "" // Clear GOPATH so packages are imported as pure module packages
    			}
    			modroot := modload.PackageModRoot(ctx, r.path)
    			if modroot == "" && str.HasPathPrefix(r.dir, cfg.GOROOTsrc) {
    				modroot = cfg.GOROOTsrc
    				gorootSrcCmd := filepath.Join(cfg.GOROOTsrc, "cmd")
    				if str.HasPathPrefix(r.dir, gorootSrcCmd) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
Back to top