Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for WorkFile (0.15 sec)

  1. src/cmd/vendor/golang.org/x/mod/modfile/work.go

    	}
    	f.SortBlocks()
    }
    
    func (f *WorkFile) DropUse(path string) error {
    	for _, d := range f.Use {
    		if d.Path == path {
    			d.Syntax.markRemoved()
    			*d = Use{}
    		}
    	}
    	return nil
    }
    
    func (f *WorkFile) AddReplace(oldPath, oldVers, newPath, newVers string) error {
    	return addReplace(f.Syntax, &f.Replace, oldPath, oldVers, newPath, newVers)
    }
    
    func (f *WorkFile) DropReplace(oldPath, oldVers string) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 18:34:56 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. src/cmd/go/internal/telemetrystats/telemetrystats.go

    }
    
    // incrementConfig increments counters for the configuration
    // the command is running in.
    func incrementConfig() {
    	if !modload.WillBeEnabled() {
    		telemetry.Inc("go/mode:gopath")
    	} else if workfile := modload.FindGoWork(base.Cwd()); workfile != "" {
    		telemetry.Inc("go/mode:workspace")
    	} else {
    		telemetry.Inc("go/mode:module")
    	}
    	telemetry.Inc("go/platform/target/goos:" + cfg.Goos)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/cmd/go/internal/workcmd/init.go

    	}
    
    	if _, err := fsys.Stat(gowork); err == nil {
    		base.Fatalf("go: %s already exists", gowork)
    	}
    
    	goV := gover.Local() // Use current Go version by default
    	wf := new(modfile.WorkFile)
    	wf.Syntax = new(modfile.FileSyntax)
    	wf.AddGoStmt(goV)
    	workUse(ctx, gowork, wf, args)
    	modload.WriteWorkFile(gowork, wf)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/cmd/go/internal/workcmd/use.go

    	wf, err := modload.ReadWorkFile(gowork)
    	if err != nil {
    		base.Fatal(err)
    	}
    	workUse(ctx, gowork, wf, args)
    	modload.WriteWorkFile(gowork, wf)
    }
    
    func workUse(ctx context.Context, gowork string, wf *modfile.WorkFile, args []string) {
    	workDir := filepath.Dir(gowork) // absolute, since gowork itself is absolute
    
    	haveDirs := make(map[string][]string) // absolute → original(s)
    	for _, use := range wf.Use {
    		var abs string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 7K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/vendor.go

    			}
    		}
    	}
    	for _, modFile := range modFiles {
    		checkReplace(modFile.Replace)
    	}
    	if MainModules.workFile != nil {
    		checkReplace(MainModules.workFile.Replace)
    	}
    
    	for _, mod := range vendorList {
    		meta := vendorMeta[mod]
    		if meta.Explicit {
    			// in workspace mode, check that it's required by at least one of the main modules
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 24 18:09:22 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/gover/version.go

    	}
    	return mf.Go.Version
    }
    
    // FromGoWork returns the go version from the go.mod file.
    // It returns DefaultGoWorkVersion if the go.mod file does not contain a go line or if wf is nil.
    func FromGoWork(wf *modfile.WorkFile) string {
    	if wf == nil || wf.Go == nil {
    		return DefaultGoWorkVersion
    	}
    	return wf.Go.Version
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 15:21:14 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top