Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 486 for if (0.09 sec)

  1. src/cmd/go/internal/cache/cache_test.go

    )
    
    func init() {
    	verify = false // even if GODEBUG is set
    }
    
    func TestBasic(t *testing.T) {
    	dir, err := os.MkdirTemp("", "cachetest-")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.RemoveAll(dir)
    	_, err = Open(filepath.Join(dir, "notexist"))
    	if err == nil {
    		t.Fatal(`Open("tmp/notexist") succeeded, want failure`)
    	}
    
    	cdir := filepath.Join(dir, "c1")
    	if err := os.Mkdir(cdir, 0777); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:49:37 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  2. src/archive/tar/strconv.go

    		//	-a-1 == ^a
    		//
    		// If the number is negative, we use an inversion mask to invert the
    		// data bytes and treat the value as an unsigned number.
    		var inv byte // 0x00 if positive or zero, 0xff if negative
    		if b[0]&0x40 != 0 {
    			inv = 0xff
    		}
    
    		var x uint64
    		for i, c := range b {
    			c ^= inv // Inverts c only if inv is 0xff, otherwise does nothing
    			if i == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/ssa_test.go

    				continue
    			}
    			if len(fd.Type.Params.List) != 1 {
    				continue
    			}
    			p := fd.Type.Params.List[0]
    			if len(p.Names) != 1 {
    				continue
    			}
    			s, ok := p.Type.(*ast.StarExpr)
    			if !ok {
    				continue
    			}
    			sel, ok := s.X.(*ast.SelectorExpr)
    			if !ok {
    				continue
    			}
    			base, ok := sel.X.(*ast.Ident)
    			if !ok {
    				continue
    			}
    			if base.Name != "testing" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/return.go

    		return hasBreak(s.Stmt, label, implicit)
    
    	case *syntax.BranchStmt:
    		if s.Tok == syntax.Break {
    			if s.Label == nil {
    				return implicit
    			}
    			if s.Label.Value == label {
    				return true
    			}
    		}
    
    	case *syntax.BlockStmt:
    		return hasBreakList(s.List, label, implicit)
    
    	case *syntax.IfStmt:
    		if hasBreak(s.Then, label, implicit) ||
    			s.Else != nil && hasBreak(s.Else, label, implicit) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/positions.go

    		case *ImportDecl:
    			m = n.Path
    		case *ConstDecl:
    			if n.Values != nil {
    				m = n.Values
    				continue
    			}
    			if n.Type != nil {
    				m = n.Type
    				continue
    			}
    			if l := len(n.NameList); l > 0 {
    				m = n.NameList[l-1]
    				continue
    			}
    			return n.Pos()
    		case *TypeDecl:
    			m = n.Type
    		case *VarDecl:
    			if n.Values != nil {
    				m = n.Values
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/help/help.go

    	var n int
    	for i, b := range p {
    		if !c.wroteSlashes {
    			s := "//"
    			if b != '\n' {
    				s = "// "
    			}
    			if _, err := io.WriteString(c.W, s); err != nil {
    				return n, err
    			}
    			c.wroteSlashes = true
    		}
    		n0, err := c.W.Write(p[i : i+1])
    		n += n0
    		if err != nil {
    			return n, err
    		}
    		if b == '\n' {
    			c.wroteSlashes = false
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/tool/tool.go

    	}
    
    	toolPath, err := base.ToolPath(toolName)
    	if err != nil {
    		if toolName == "dist" && len(args) > 1 && args[1] == "list" {
    			// cmd/distpack removes the 'dist' tool from the toolchain to save space,
    			// since it is normally only used for building the toolchain in the first
    			// place. However, 'go tool dist list' is useful for listing all supported
    			// platforms.
    			//
    			// If the dist tool does not exist, impersonate this command.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 18:02:11 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. src/cmd/covdata/covdata.go

    			for _, f := range matchers {
    				if f(name) {
    					return true
    				}
    			}
    			return false
    		}
    	}
    	if *cpuprofileflag != "" {
    		f, err := os.Create(*cpuprofileflag)
    		if err != nil {
    			fatal("%v", err)
    		}
    		if err := pprof.StartCPUProfile(f); err != nil {
    			fatal("%v", err)
    		}
    		atExit(func() {
    			pprof.StopCPUProfile()
    			if err = f.Close(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/copyelim.go

    func phielimValue(v *Value) bool {
    	if v.Op != OpPhi {
    		return false
    	}
    
    	// If there are two distinct args of v which
    	// are not v itself, then the phi must remain.
    	// Otherwise, we can replace it with a copy.
    	var w *Value
    	for _, x := range v.Args {
    		if x == v {
    			continue
    		}
    		if x == w {
    			continue
    		}
    		if w != nil {
    			return false
    		}
    		w = x
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. src/cmd/go/internal/vcweb/script.go

    	logger.Printf("%s:", scriptName)
    	io.WriteString(logger.Writer(), scriptLog.String())
    	io.WriteString(logger.Writer(), "\n")
    	if err != nil {
    		return nil, err
    	}
    	if closeErr != nil {
    		return nil, err
    	}
    
    	sc, err := getScriptCtx(st)
    	if err != nil {
    		return nil, err
    	}
    	if sc.handler == nil {
    		return nil, errors.New("script completed without setting handler")
    	}
    	return sc.handler, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
Back to top