Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for correctly (0.35 sec)

  1. src/archive/zip/reader_test.go

    		// the file header and TOC. (0x7e -> 0x7f)
    		b[0x11]++
    		b[0x9d]++
    
    		// TODO(bradfitz): add a new test that only corrupts
    		// one of these values, and verify that that's also an
    		// error. Currently, the reader code doesn't verify the
    		// fileheader and TOC's crc32 match if they're both
    		// non-zero and only the second line above, the TOC,
    		// is what matters.
    	})
    }
    
    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)
  2. misc/wasm/wasm_exec.js

    				throw new Error("Go.run: WebAssembly.Instance expected");
    			}
    			this._inst = instance;
    			this.mem = new DataView(this._inst.exports.mem.buffer);
    			this._values = [ // JS values that Go currently has references to, indexed by reference id
    				NaN,
    				0,
    				null,
    				true,
    				false,
    				globalThis,
    				this,
    			];
    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)
  3. src/bytes/buffer_test.go

    				buf.Write(yBytes)
    			})
    			// Check no allocation occurs in write, as long as we're single-threaded.
    			if allocs != 0 {
    				t.Errorf("allocation occurred during write")
    			}
    			// Check that buffer has correct data.
    			if !Equal(buf.Bytes()[0:startLen-readBytes], xBytes[readBytes:]) {
    				t.Errorf("bad initial data at %d %d", startLen, growLen)
    			}
    			if !Equal(buf.Bytes()[startLen-readBytes:startLen-readBytes+growLen], yBytes) {
    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)
  4. src/cmd/cgo/doc.go

    C errno variable as an error (use _ to skip the result value if the
    function returns void). For example:
    
    	n, err = C.sqrt(-1)
    	_, err := C.voidFunc()
    	var n, err = C.sqrt(1)
    
    Calling C function pointers is currently not supported, however you can
    declare Go variables which hold C function pointers and pass them
    back and forth between Go and C. C code may call function pointers
    received from Go. For example:
    
    	package main
    
    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)
  5. src/bufio/bufio_test.go

    		for j := 0; j < len(bufsizes); j++ {
    			nwrite := bufsizes[i]
    			bs := bufsizes[j]
    
    			// Write nwrite bytes using buffer size bs.
    			// Check that the right amount makes it out
    			// and that the data is correct.
    
    			w.Reset()
    			buf := NewWriterSize(w, bs)
    			context := fmt.Sprintf("nwrite=%d bufsize=%d", nwrite, bs)
    			n, e1 := buf.Write(data[0:nwrite])
    			if e1 != nil || n != nwrite {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  6. doc/go1.17_spec.html

    a <a href="#Run_time_panics">run-time panic</a> occurs.
    In other words, even though the dynamic type of <code>x</code>
    is known only at run time, the type of <code>x.(T)</code> is
    known to be <code>T</code> in a correct program.
    </p>
    
    <pre>
    var x interface{} = 7          // x has dynamic type int and value 7
    i := x.(int)                   // i has type int and value 7
    
    type I interface { m() }
    
    func f(y I) {
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  7. doc/next/6-stdlib/1-time.md

    prepared before that call will be sent or received after the call.
    Earlier versions of Go used channels with a one-element buffer,
    making it difficult to use `Reset` and `Stop` correctly.
    A visible effect of this change is that `len` and `cap` of timer channels
    now returns 0 instead of 1, which may affect programs that
    poll the length to decide whether a receive on the timer channel
    will succeed.
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  8. src/bufio/scan.go

    	if width > 1 {
    		// It's a valid encoding. Width cannot be one for a correctly encoded
    		// non-ASCII rune.
    		return width, data[0:width], nil
    	}
    
    	// We know it's an error: we have width==1 and implicitly r==utf8.RuneError.
    	// Is the error because there wasn't a full rune to be decoded?
    	// FullRune distinguishes correctly between erroneous and incomplete encodings.
    	if !atEOF && !utf8.FullRune(data) {
    		// Incomplete; get more bytes.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/asm/testdata/arm64error.s

    	MOVK	$0, R10                                          // ERROR "zero shifts cannot be handled correctly"
    	MOVK	$(0<<32), R10                                    // ERROR "zero shifts cannot be handled correctly"
    	TLBI	PLDL1KEEP                                        // ERROR "illegal argument"
    Others
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Dec 08 03:28:17 GMT 2023
    - 37.8K bytes
    - Viewed (0)
  10. src/bytes/buffer.go

    type Buffer struct {
    	buf      []byte // contents are the bytes buf[off : len(buf)]
    	off      int    // read at &buf[off], write at &buf[len(buf)]
    	lastRead readOp // last read operation, so that Unread* can work correctly.
    }
    
    // The readOp constants describe the last action performed on
    // the buffer, so that UnreadRune and UnreadByte can check for
    // invalid usage. opReadRuneX constants are chosen such that
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
Back to top