Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 173 for readVal (0.12 sec)

  1. src/math/rand/rand.go

    	switch src := r.src.(type) {
    	case *lockedSource:
    		return src.read(p, &r.readVal, &r.readPos)
    	case *runtimeSource:
    		return src.read(p, &r.readVal, &r.readPos)
    	}
    	return read(p, r.src, &r.readVal, &r.readPos)
    }
    
    func read(p []byte, src Source, readVal *int64, readPos *int8) (n int, err error) {
    	pos := *readPos
    	val := *readVal
    	rng, _ := src.(*rngSource)
    	for n = 0; n < len(p); n++ {
    		if pos == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  2. src/internal/trace/internal/oldtrace/parser.go

    			if _, err := p.readVal(); err != nil {
    				return errMalformedVarint
    			}
    			ln, err := p.readVal()
    			if err != nil {
    				return err
    			}
    			if !p.discard(ln) {
    				return fmt.Errorf("failed to read trace: %w", io.EOF)
    			}
    		} else {
    			// String dictionary entry [ID, length, string].
    			id, err := p.readVal()
    			if err != nil {
    				return err
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  3. cmd/storage-rest-common.go

    	storageRESTMethodCreateFile     = "/createfile"
    	storageRESTMethodWriteAll       = "/writeall"
    	storageRESTMethodReadVersion    = "/readversion"
    	storageRESTMethodReadXL         = "/readxl"
    	storageRESTMethodReadAll        = "/readall"
    	storageRESTMethodReadFile       = "/readfile"
    	storageRESTMethodReadFileStream = "/readfilestream"
    	storageRESTMethodListDir        = "/listdir"
    	storageRESTMethodDeleteVersions = "/deleteverions"
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. src/io/io.go

    // ReadAt blocks until either all the data is available or an error occurs.
    // In this respect ReadAt is different from Read.
    //
    // If the n = len(p) bytes returned by ReadAt are at the end of the
    // input source, ReadAt may return either err == EOF or err == nil.
    //
    // If ReadAt is reading from an input source with a seek offset,
    // ReadAt should not affect nor be affected by the underlying
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:34:10 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  5. cmd/naughty-disk_test.go

    		return err
    	}
    	return d.disk.WriteAll(ctx, volume, path, b)
    }
    
    func (d *naughtyDisk) ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error) {
    	if err := d.calcError(); err != nil {
    		return nil, err
    	}
    	return d.disk.ReadAll(ctx, volume, path)
    }
    
    func (d *naughtyDisk) ReadXL(ctx context.Context, volume string, path string, readData bool) (rf RawFileInfo, err error) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  6. cmd/storage-interface.go

    	// Write all data, syncs the data to disk.
    	// Should be used for smaller payloads.
    	WriteAll(ctx context.Context, volume string, path string, b []byte) (err error)
    
    	// Read all.
    	ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error)
    	GetDiskLoc() (poolIdx, setIdx, diskIdx int) // Retrieve location indexes.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. src/crypto/rand/rand.go

    }
    
    // batched returns a function that calls f to populate a []byte by chunking it
    // into subslices of, at most, readMax bytes.
    func batched(f func([]byte) error, readMax int) func([]byte) error {
    	return func(out []byte) error {
    		for len(out) > 0 {
    			read := len(out)
    			if read > readMax {
    				read = readMax
    			}
    			if err := f(out[:read]); err != nil {
    				return err
    			}
    			out = out[read:]
    		}
    		return nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:02:21 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  8. src/testing/fstest/testfs.go

    	// Read entire file.
    	f, err := t.fsys.Open(file)
    	if err != nil {
    		t.errorf("%s: Open: %w", file, err)
    		return
    	}
    
    	data, err := io.ReadAll(f)
    	if err != nil {
    		f.Close()
    		t.errorf("%s: Open+ReadAll: %w", file, err)
    		return
    	}
    
    	if err := f.Close(); err != nil {
    		t.errorf("%s: Close: %w", file, err)
    	}
    
    	// Check that closing twice doesn't crash.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  9. src/compress/gzip/gzip_test.go

    		t.Fatalf("NewReader: %v", err)
    	}
    	if want := (Header{OS: 255}); !reflect.DeepEqual(r.Header, want) {
    		t.Errorf("Header mismatch:\ngot  %#v\nwant %#v", r.Header, want)
    	}
    	b, err := io.ReadAll(r)
    	if err != nil {
    		t.Fatalf("ReadAll: %v", err)
    	}
    	if len(b) != 0 {
    		t.Fatalf("got %d bytes, want 0", len(b))
    	}
    	if err := r.Close(); err != nil {
    		t.Fatalf("Reader.Close: %v", err)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:10:06 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. src/io/ioutil/ioutil.go

    	"io/fs"
    	"os"
    	"slices"
    	"strings"
    )
    
    // ReadAll reads from r until an error or EOF and returns the data it read.
    // A successful call returns err == nil, not err == EOF. Because ReadAll is
    // defined to read from src until EOF, it does not treat an EOF from Read
    // as an error to be reported.
    //
    // Deprecated: As of Go 1.16, this function simply calls [io.ReadAll].
    func ReadAll(r io.Reader) ([]byte, error) {
    	return io.ReadAll(r)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top