Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for modRoots (0.13 sec)

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

    		}
    		if v, ok := rawGoVersion.Load(m); ok {
    			info.GoVersion = v.(string)
    		} else {
    			panic("internal error: GoVersion not set for main module")
    		}
    		if modRoot := MainModules.ModRoot(m); modRoot != "" {
    			info.Dir = modRoot
    			info.GoMod = modFilePath(modRoot)
    		}
    		return info
    	}
    
    	info := &modinfo.ModulePublic{
    		Path:     m.Path,
    		Version:  m.Version,
    		Indirect: rs != nil && !rs.direct[m.Path],
    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/cgo/internal/testshared/shared_test.go

    func cloneTestdataModule(gopath string) (string, error) {
    	modRoot := filepath.Join(gopath, "src", "testshared")
    	if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil {
    		return "", err
    	}
    	if err := os.WriteFile(filepath.Join(modRoot, "go.mod"), []byte("module testshared\n"), 0644); err != nil {
    		return "", err
    	}
    	return modRoot, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 26 01:54:41 UTC 2023
    - 36.3K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/build_trimpath.txt

    		log.Fatal(err)
    	}
    
    	if os.Getenv("GO111MODULE") == "on" {
    		out, err := exec.Command("go", "env", "GOMOD").Output()
    		if err != nil {
    			log.Fatal(err)
    		}
    		modRoot := filepath.Dir(strings.TrimSpace(string(out)))
    		check(data, "module root", modRoot)
    	} else {
    		check(data, "GOPATH", os.Getenv("GOPATH"))
    	}
    	check(data, "GOROOT", os.Getenv("GOROOT"))
    }
    
    func check(data []byte, desc, dir string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testcshared/cshared_test.go

    		log.Panic(err)
    	}
    	defer os.RemoveAll(GOPATH)
    	os.Setenv("GOPATH", GOPATH)
    
    	modRoot := filepath.Join(GOPATH, "src", "testcshared")
    	if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil {
    		log.Panic(err)
    	}
    	if err := os.Chdir(modRoot); err != nil {
    		log.Panic(err)
    	}
    	os.Setenv("PWD", modRoot)
    	if err := os.WriteFile("go.mod", []byte("module testcshared\n"), 0666); err != nil {
    		log.Panic(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:19:50 UTC 2023
    - 21K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testcarchive/carchive_test.go

    	// Copy testdata into GOPATH/src/testarchive, along with a go.mod file
    	// declaring the same path.
    	modRoot := filepath.Join(GOPATH, "src", "testcarchive")
    	if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil {
    		log.Panic(err)
    	}
    	if err := os.Chdir(modRoot); err != nil {
    		log.Panic(err)
    	}
    	os.Setenv("PWD", modRoot)
    	if err := os.WriteFile("go.mod", []byte("module testcarchive\n"), 0666); err != nil {
    		log.Panic(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:43:51 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/load/pkg.go

    			}
    			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) {
    					modroot = gorootSrcCmd
    				}
    			}
    			if modroot != "" {
    				if rp, err := modindex.GetPackage(modroot, r.dir); err == nil {
    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