Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for read (0.18 sec)

  1. src/bytes/reader_test.go

    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 10)); err != nil || n != 10 {
    		t.Errorf("Read failed: read %d %v", n, err)
    	}
    	if got, want := r.Len(), 1; got != want {
    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 1)); err != nil || n != 1 {
    		t.Errorf("Read failed: read %d %v; want 1, nil", n, err)
    	}
    	if got, want := r.Len(), 0; got != want {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  2. src/bytes/reader.go

    // The result is unaffected by any method calls except [Reader.Reset].
    func (r *Reader) Size() int64 { return int64(len(r.s)) }
    
    // Read implements the [io.Reader] interface.
    func (r *Reader) Read(b []byte) (n int, err error) {
    	if r.i >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	r.prevRune = -1
    	n = copy(b, r.s[r.i:])
    	r.i += int64(n)
    	return
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  3. lib/time/README

    For more information, see
    https://www.iana.org/time-zones
    ftp://ftp.iana.org/tz/code/tz-link.html
    https://datatracker.ietf.org/doc/html/rfc6557
    
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Sun Aug 15 02:18:46 GMT 2021
    - 390 bytes
    - Viewed (0)
  4. README.md

    operating system and architecture, visit
    https://go.dev/doc/install/source
    for source installation instructions.
    
    ### Contributing
    
    Go is the work of thousands of contributors. We appreciate your help!
    
    To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
    
    Note that the Go project uses the issue tracker for bug reports and
    proposals only. See https://go.dev/wiki/Questions for a list of
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Nov 02 20:14:56 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  5. src/archive/zip/zip_test.go

    	for i := 0; i < chunks; i++ {
    		_, err := io.ReadFull(rc, chunk)
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	if frag := int(size % chunkSize); frag > 0 {
    		_, err := io.ReadFull(rc, chunk[:frag])
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	gotEnd, err := io.ReadAll(rc)
    	if err != nil {
    		t.Fatal("read end:", err)
    	}
    	if !bytes.Equal(gotEnd, end) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  6. src/archive/tar/writer.go

    // readFrom populates the content of the current file by reading from r.
    // The bytes read must match the number of remaining bytes in the current file.
    //
    // If the current file is sparse and r is an io.ReadSeeker,
    // then readFrom uses Seek to skip past holes defined in Header.SparseHoles,
    // assuming that skipped regions are all NULs.
    // This always reads the last byte to ensure r is the right size.
    //
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  7. src/cmd/asm/internal/lex/input.go

    	// Distinguish these cases using the column number, since we don't
    	// see the space itself. Note that text/scanner reports the position at the
    	// end of the token. It's where you are now, and you just read this token.
    	if tok == '(' && in.Stack.Col() == prevCol+1 {
    		// Macro has arguments. Scan list of formals.
    		acceptArg := true
    		args = []string{} // Zero length but not nil.
    	Loop:
    		for {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  8. api/go1.1.txt

    pkg syscall (darwin-386), const SYS_QUOTACTL = 165
    pkg syscall (darwin-386), const SYS_READ = 3
    pkg syscall (darwin-386), const SYS_READLINK = 58
    pkg syscall (darwin-386), const SYS_READV = 120
    pkg syscall (darwin-386), const SYS_READV_NOCANCEL = 411
    pkg syscall (darwin-386), const SYS_READ_NOCANCEL = 396
    pkg syscall (darwin-386), const SYS_REBOOT = 55
    pkg syscall (darwin-386), const SYS_RECVFROM = 29
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Mar 31 20:37:15 GMT 2022
    - 2.6M bytes
    - Viewed (0)
  9. src/archive/zip/reader.go

    }
    
    func (r *checksumReader) Read(b []byte) (n int, err error) {
    	if r.err != nil {
    		return 0, r.err
    	}
    	n, err = r.rc.Read(b)
    	r.hash.Write(b[:n])
    	r.nread += uint64(n)
    	if r.nread > r.f.UncompressedSize64 {
    		return 0, ErrFormat
    	}
    	if err == nil {
    		return
    	}
    	if err == io.EOF {
    		if r.nread != r.f.UncompressedSize64 {
    			return 0, io.ErrUnexpectedEOF
    		}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  10. src/bufio/bufio_test.go

    	buf := make([]byte, 1)
    	if _, err := b.Read(nil); err != nil {
    		t.Fatalf("1st nil Read = %v; want nil", err)
    	}
    	if _, err := b.Read(buf); err != errFake {
    		t.Fatalf("1st Read = %v; want errFake", err)
    	}
    	if _, err := b.Read(nil); err != nil {
    		t.Fatalf("2nd nil Read = %v; want nil", err)
    	}
    	if _, err := b.Read(buf); err != nil {
    		t.Fatalf("3rd Read with buffer = %v; want nil", err)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
Back to top