Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Read (0.32 sec)

  1. src/archive/zip/fuzz_test.go

    func FuzzReader(f *testing.F) {
    	testdata, err := os.ReadDir("testdata")
    	if err != nil {
    		f.Fatalf("failed to read testdata directory: %s", err)
    	}
    	for _, de := range testdata {
    		if de.IsDir() {
    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    		f.Add(b)
    	}
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  2. 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 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  3. 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 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. 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 30 11:13:12 GMT 2024
    - Last Modified: Sun Aug 15 02:18:46 GMT 2021
    - 390 bytes
    - Viewed (0)
  5. 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 30 11:13:12 GMT 2024
    - Last Modified: Wed Nov 02 20:14:56 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  6. misc/chrome/gophertool/popup.html

    <html>
    <!--
     Copyright 2011 The Go Authors. All rights reserved.
     Use of this source code is governed by a BSD-style
     license that can be found in the LICENSE file.
    -->
    <head>
    <script src="gopher.js"></script>
    <script src="popup.js"></script>
    </head>
    <body style='margin: 0.5em; font-family: sans;'>
    <small><a href="#" url="https://golang.org/issue">issue</a>,
    <a href="#" url="https://golang.org/cl">codereview</a>,
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 05 02:35:21 GMT 2021
    - 830 bytes
    - Viewed (0)
  7. misc/chrome/gophertool/background.html

    <html>
    <!--
     Copyright 2011 The Go Authors. All rights reserved.
     Use of this source code is governed by a BSD-style
     license that can be found in the LICENSE file.
    -->
    <head>
    <script src="gopher.js"></script>
    <script src="background.js"></script>
    </head>
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 08 00:56:10 GMT 2012
    - 265 bytes
    - Viewed (0)
  8. src/archive/zip/register.go

    	return &pooledFlateReader{fr: fr}
    }
    
    type pooledFlateReader struct {
    	mu sync.Mutex // guards Close and Read
    	fr io.ReadCloser
    }
    
    func (r *pooledFlateReader) Read(p []byte) (n int, err error) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	if r.fr == nil {
    		return 0, errors.New("Read after Close")
    	}
    	return r.fr.Read(p)
    }
    
    func (r *pooledFlateReader) Close() error {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	var err error
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  9. .github/CODE_OF_CONDUCT.md

    # Code of Conduct
    
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 13 16:48:04 GMT 2017
    - 95 bytes
    - Viewed (0)
  10. src/bytes/boundary_test.go

    import (
    	. "bytes"
    	"syscall"
    	"testing"
    )
    
    // This file tests the situation where byte operations are checking
    // data very near to a page boundary. We want to make sure those
    // operations do not read across the boundary and cause a page
    // fault where they shouldn't.
    
    // These tests run only on linux. The code being tested is
    // not OS-specific, so it does not need to be tested on all
    // operating systems.
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 30 20:05:58 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top