Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for if (0.2 sec)

  1. src/cmd/cgo/ast.go

    			for _, spec := range decl.Specs {
    				s, ok := spec.(*ast.ImportSpec)
    				if !ok || s.Path.Value != `"C"` {
    					continue
    				}
    				sawC = true
    				if s.Name != nil {
    					error_(s.Path.Pos(), `cannot rename import "C"`)
    				}
    				cg := s.Doc
    				if cg == nil && len(decl.Specs) == 1 {
    					cg = decl.Doc
    				}
    				if cg != nil {
    					if strings.ContainsAny(abspath, "\r\n") {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  2. src/bytes/buffer_test.go

    				// Check that if we start with a buffer
    				// of length j at offset i and ask for
    				// Next(k), we get the right bytes.
    				buf := NewBuffer(b[0:j])
    				n, _ := buf.Read(tmp[0:i])
    				if n != i {
    					t.Fatalf("Read %d returned %d", i, n)
    				}
    				bb := buf.Next(k)
    				want := k
    				if want > j-i {
    					want = j - i
    				}
    				if len(bb) != want {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. src/cmd/api/api_test.go

    )
    
    func TestGolden(t *testing.T) {
    	if *flagCheck {
    		// slow, not worth repeating in -check
    		t.Skip("skipping with -check set")
    	}
    
    	testenv.MustHaveGoBuild(t)
    
    	td, err := os.Open("testdata/src/pkg")
    	if err != nil {
    		t.Fatal(err)
    	}
    	fis, err := td.Readdir(0)
    	if err != nil {
    		t.Fatal(err)
    	}
    	for _, fi := range fis {
    		if !fi.IsDir() {
    			continue
    		}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 04 17:31:12 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue18146.go

    	case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd":
    		nproc = 7
    	}
    	if setNproc {
    		var rlim syscall.Rlimit
    		if syscall.Getrlimit(nproc, &rlim) == nil {
    			max := int(rlim.Cur) / (threads + 5)
    			if attempts > max {
    				t.Logf("lowering attempts from %d to %d for RLIMIT_NPROC", attempts, max)
    				attempts = max
    			}
    		}
    	}
    
    	if os.Getenv("test18146") == "exec" {
    		runtime.GOMAXPROCS(1)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Sep 05 23:35:32 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  5. src/archive/zip/reader_test.go

    		rc, err = OpenReader(path)
    		if err == nil {
    			defer rc.Close()
    			z = &rc.Reader
    		}
    		var err2 error
    		raw, err2 = os.ReadFile(path)
    		if err2 != nil {
    			t.Errorf("ReadFile(%s) error=%v", path, err2)
    			return
    		}
    	}
    	if err != zt.Error {
    		t.Errorf("error=%v, want %v", err, zt.Error)
    		return
    	}
    
    	// bail if file is not zip
    	if err == ErrFormat {
    		return
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  6. misc/wasm/wasm_exec.js

    				const f = this.mem.getFloat64(addr, true);
    				if (f === 0) {
    					return undefined;
    				}
    				if (!isNaN(f)) {
    					return f;
    				}
    
    				const id = this.mem.getUint32(addr, true);
    				return this._values[id];
    			}
    
    			const storeValue = (addr, v) => {
    				const nanHead = 0x7FF80000;
    
    				if (typeof v === "number" && v !== 0) {
    					if (isNaN(v)) {
    JavaScript
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon May 22 17:47:47 GMT 2023
    - 16.3K bytes
    - Viewed (1)
  7. doc/go1.17_spec.html

    </li>
    </ol>
    
    <h3 id="If_statements">If statements</h3>
    
    <p>
    "If" statements specify the conditional execution of two branches
    according to the value of a boolean expression.  If the expression
    evaluates to true, the "if" branch is executed, otherwise, if
    present, the "else" branch is executed.
    </p>
    
    <pre class="ebnf">
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  8. src/cmd/cgo/doc.go

    	y.cgo1.go       # for gc
    	_cgo_gotypes.go # for gc
    	_cgo_import.go  # for gc (if -dynout _cgo_import.go)
    	x.cgo2.c        # for gcc
    	y.cgo2.c        # for gcc
    	_cgo_defun.c    # for gcc (if -gccgo)
    	_cgo_export.c   # for gcc
    	_cgo_export.h   # for gcc
    	_cgo_main.c     # for gcc
    	_cgo_flags      # for build tool (if -gccgo)
    
    The file x.cgo1.go is a copy of x.go with the import "C" removed and
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/asm/pseudo_test.go

    		for _, test := range cat.tests {
    			parser.allowABI = cat.allowABI
    			parser.errorCount = 0
    			parser.lineNum++
    			if !parser.pseudo(test.pseudo, tokenize(test.operands)) {
    				t.Fatalf("Wrong pseudo-instruction: %s", test.pseudo)
    			}
    			errorLine := buf.String()
    			if test.expected != errorLine {
    				t.Errorf("Unexpected error %q; expected %q", errorLine, test.expected)
    			}
    			buf.Reset()
    		}
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  10. .github/ISSUE_TEMPLATE/01-pkgsite.yml

          description: "Please paste a screenshot of the page."
        validations:
          required: false
      - type: textarea
        id: what-did-you-do
        attributes:
          label: "What did you do?"
          description: "If possible, provide a recipe for reproducing the error. Starting with a Private/Incognito tab/window may help rule out problematic browser extensions."
        validations:
          required: true
      - type: textarea
        id: actual-behavior
    Others
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Jan 04 23:31:17 GMT 2024
    - 1.4K bytes
    - Viewed (0)
Back to top