Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for SwitchOrFatal (0.34 sec)

  1. src/cmd/go/internal/workcmd/sync.go

    		base.Fatalf("go: no go.work file found\n\t(run 'go work init' first or specify path using GOWORK environment variable)")
    	}
    
    	_, err := modload.LoadModGraph(ctx, "")
    	if err != nil {
    		toolchain.SwitchOrFatal(ctx, err)
    	}
    	mustSelectFor := map[module.Version][]module.Version{}
    
    	mms := modload.MainModules
    
    	opts := modload.PackageOpts{
    		Tags:                     imports.AnyTags(),
    		VendorModulesInGOROOTSrc: true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modcmd/graph.go

    	}
    	modload.ForceUseModules = true
    	modload.RootMode = modload.NeedRoot
    
    	goVersion := graphGo.String()
    	if goVersion != "" && gover.Compare(gover.Local(), goVersion) < 0 {
    		toolchain.SwitchOrFatal(ctx, &gover.TooNewError{
    			What:      "-go flag",
    			GoVersion: goVersion,
    		})
    	}
    
    	mg, err := modload.LoadModGraph(ctx, goVersion)
    	if err != nil {
    		base.Fatal(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 03 21:13:11 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/toolchain/switch.go

    	counterSwitchExec.Inc()
    	Exec(tv)
    	panic("unreachable")
    }
    
    var counterSwitchExec = telemetry.NewCounter("go/toolchain/switch-exec")
    
    // SwitchOrFatal attempts a toolchain switch based on the information in err
    // and otherwise falls back to base.Fatal(err).
    func SwitchOrFatal(ctx context.Context, err error) {
    	var s Switcher
    	s.Error(err)
    	s.Switch(ctx)
    	base.Exit()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modcmd/download.go

    				_, err := modload.LoadModGraph(ctx, "")
    				if err != nil {
    					// TODO(#64008): call base.Fatalf instead of toolchain.SwitchOrFatal
    					// here, since we can only reach this point with an outdated toolchain
    					// if the go.mod file is inconsistent.
    					toolchain.SwitchOrFatal(ctx, err)
    				}
    
    				for _, m := range modFile.Require {
    					args = append(args, m.Mod.Path)
    				}
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 19:32:39 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modcmd/tidy.go

    	modload.ForceUseModules = true
    	modload.RootMode = modload.NeedRoot
    
    	goVersion := tidyGo.String()
    	if goVersion != "" && gover.Compare(gover.Local(), goVersion) < 0 {
    		toolchain.SwitchOrFatal(ctx, &gover.TooNewError{
    			What:      "-go flag",
    			GoVersion: goVersion,
    		})
    	}
    
    	modload.LoadPackages(ctx, modload.PackageOpts{
    		TidyGoVersion:            tidyGo.String(),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modget/get.go

    		// when all the required modules are old enough
    		// but the command line is not.
    		// TODO(bcmills): modload.EditBuildList should catch this instead,
    		// and then this can be changed to base.Fatal(err).
    		toolchain.SwitchOrFatal(ctx, err)
    	}
    
    	newReqs := reqsFromGoMod(modload.ModFile())
    	r.reportChanges(oldReqs, newReqs)
    
    	if gowork := modload.FindGoWork(base.Cwd()); gowork != "" {
    		wf, err := modload.ReadWorkFile(gowork)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 18:26:32 UTC 2024
    - 66.5K bytes
    - Viewed (0)
  7. src/cmd/go/internal/toolchain/select.go

    	if errors.Is(err, gover.ErrTooNew) {
    		// Run early switch, same one go install or go run would eventually do,
    		// if it understood all the command-line flags.
    		SwitchOrFatal(ctx, err)
    	}
    
    	return true // pkg@version found
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:25:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top