Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for lengthOf (0.15 sec)

  1. src/archive/zip/reader_test.go

    		var f File
    		err := readDirectoryHeader(&f, strings.NewReader(s))
    		if err != nil {
    			t.Errorf("error reading #%d: %v", i, err)
    		}
    	}
    }
    
    // Verify we return ErrUnexpectedEOF when length is short.
    func TestIssue10957(t *testing.T) {
    	data := []byte("PK\x03\x040000000PK\x01\x0200000" +
    		"0000000000000000000\x00" +
    		"\x00\x00\x00\x00\x00000000000000PK\x01" +
    		"\x020000000000000000000" +
    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. src/bufio/bufio_test.go

    var testInputrn = []byte("012\r\n345\r\n678\r\n9ab\r\ncde\r\nfgh\r\nijk\r\nlmn\r\nopq\r\nrst\r\nuvw\r\nxy\r\n\n\r\n")
    
    // TestReader wraps a []byte and returns reads of a specific length.
    type testReader struct {
    	data   []byte
    	stride int
    }
    
    func (t *testReader) Read(buf []byte) (n int, err error) {
    	n = t.stride
    	if n > len(t.data) {
    		n = len(t.data)
    	}
    	if n > len(buf) {
    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)
  3. src/cmd/cgo/gcc.go

    			// Knows string layout used by compilers: pointer plus length,
    			// which rounds up to 2 pointers after alignment.
    			t.Go = c.string
    			t.Size = c.ptrSize * 2
    			t.Align = c.ptrSize
    			break
    		}
    		if dt.Name == "_GoBytes_" {
    			// Special C name for Go []byte type.
    			// Knows slice layout used by compilers: pointer, length, cap.
    			t.Go = c.Ident("[]byte")
    			t.Size = c.ptrSize + 4 + 4
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
Back to top