Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for ExitIfErrors (0.14 sec)

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

    	if ld.Switcher != nil {
    		ld.Switcher.Switch(ctx)
    	}
    }
    
    // exitIfErrors switches toolchains if a switch is needed
    // or else exits if any errors have been reported.
    func (ld *loader) exitIfErrors(ctx context.Context) {
    	ld.switchIfErrors(ctx)
    	base.ExitIfErrors()
    }
    
    // goVersion reports the Go version that should be used for the loader's
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 84K bytes
    - Viewed (0)
  2. src/cmd/go/internal/base/base.go

    }
    
    func Fatalf(format string, args ...any) {
    	Errorf(format, args...)
    	Exit()
    }
    
    func Errorf(format string, args ...any) {
    	log.Printf(format, args...)
    	SetExitStatus(1)
    }
    
    func ExitIfErrors() {
    	if exitStatus != 0 {
    		Exit()
    	}
    }
    
    func Error(err error) {
    	// We use errors.Join to return multiple errors from various routines.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modget/get.go

    // implicit @upgrade. path@none is "downgrade away".
    func parseArgs(ctx context.Context, rawArgs []string) (dropToolchain bool, queries []*query) {
    	defer base.ExitIfErrors()
    
    	for _, arg := range search.CleanPatterns(rawArgs) {
    		q, err := newQuery(arg)
    		if err != nil {
    			base.Error(err)
    			continue
    		}
    
    		if q.version == "none" {
    			switch q.pattern {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 18:26:32 UTC 2024
    - 66.5K bytes
    - Viewed (0)
  4. src/cmd/go/internal/workcmd/use.go

    		if err != nil {
    			sw.Error(err)
    			continue
    		}
    		goV = gover.Max(goV, gover.FromGoMod(mf))
    	}
    	sw.Switch(ctx)
    	base.ExitIfErrors()
    
    	modload.UpdateWorkGoVersion(wf, goV)
    	modload.UpdateWorkFile(wf)
    }
    
    // pathRel returns the absolute and canonical forms of dir for use in a
    // go.work file located in directory workDir.
    //
    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/generate/generate.go

    			if !generate(file) {
    				break
    			}
    		}
    
    		for _, file := range pkg.InternalXGoFiles() {
    			if !generate(file) {
    				break
    			}
    		}
    	}
    	base.ExitIfErrors()
    }
    
    // generate runs the generation directives for a single file.
    func generate(absFile string) bool {
    	src, err := os.ReadFile(absFile)
    	if err != nil {
    		log.Fatalf("generate: %s", err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 29 19:39:24 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modcmd/download.go

    			if m.Error != "" {
    				base.SetExitStatus(1)
    			}
    		}
    	} else {
    		for _, m := range mods {
    			if m.Error != "" {
    				base.Error(errors.New(m.Error))
    			}
    		}
    		base.ExitIfErrors()
    	}
    
    	// If there were explicit arguments, update go.mod and especially go.sum.
    	// 'go mod download mod@version' is a useful way to add a sum without using
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 19:32:39 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  7. src/cmd/go/internal/list/list.go

    		if !*listE {
    			for _, m := range mods {
    				if m.Error != nil {
    					base.Error(errors.New(m.Error.Err))
    				}
    			}
    			if err != nil {
    				base.Error(err)
    			}
    			base.ExitIfErrors()
    		}
    		for _, m := range mods {
    			do(m)
    		}
    		return
    	}
    
    	// Package mode (not -m).
    	if *listU {
    		base.Fatalf("go list -u can only be used with -m")
    	}
    	if *listVersions {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/main.go

    			Exitf("mapping output file failed: %v", err)
    		}
    	}
    	// asmb will redirect symbols to the output file mmap, and relocations
    	// will be applied directly there.
    	bench.Start("Asmb")
    	asmb(ctxt)
    
    	exitIfErrors()
    
    	// Generate additional symbols for the native symbol table just prior
    	// to code generation.
    	bench.Start("GenSymsLate")
    	if thearch.GenSymsLate != nil {
    		thearch.GenSymsLate(ctxt, ctxt.loader)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. src/cmd/go/internal/work/build.go

    			default:
    				base.Errorf("go: no install location for directory %s outside GOPATH\n"+
    					"\tFor more details see: 'go help gopath'", p.Dir)
    			}
    		}
    	}
    	base.ExitIfErrors()
    
    	b := NewBuilder("")
    	defer func() {
    		if err := b.Close(); err != nil {
    			base.Fatal(err)
    		}
    	}()
    
    	depMode := ModeBuild
    	a := &Action{Mode: "go install"}
    	var tools []*Action
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 17:22:59 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/lib.go

    		default:
    			Errorf(nil, "unknown *flagEntrySymbol for buildmode %v", ctxt.BuildMode)
    		}
    	}
    }
    
    func exitIfErrors() {
    	if nerrors != 0 || checkStrictDups > 1 && strictDupMsgCount > 0 {
    		mayberemoveoutfile()
    		Exit(2)
    	}
    
    }
    
    func errorexit() {
    	exitIfErrors()
    	Exit(0)
    }
    
    func loadinternal(ctxt *Link, name string) *sym.Library {
    	zerofp := goobj.FingerprintType{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
Back to top