Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ExitIfErrors (0.3 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/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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/cmd/go/internal/load/pkg.go

    			anyIncomplete = true
    		}
    	}
    	if anyIncomplete {
    		all := PackageList(pkgs)
    		for _, p := range all {
    			if p.Error != nil {
    				base.Errorf("%v", p.Error)
    			}
    		}
    	}
    	base.ExitIfErrors()
    
    	// Check for duplicate loads of the same package.
    	// That should be impossible, but if it does happen then
    	// we end up trying to build the same package twice,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
  10. src/cmd/go/internal/test/test.go

    					buf.WriteString(pkg.ImportPath)
    					buf.WriteString("\n")
    				}
    
    				base.Errorf("cannot write test binary %s for multiple packages:\n%s", testBinary, buf.String())
    			}
    		}
    
    		base.ExitIfErrors()
    	}
    
    	initCoverProfile()
    	defer closeCoverProfile()
    
    	// If a test timeout is finite, set our kill timeout
    	// to that timeout plus one minute. This is a backup alarm in case
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
Back to top