- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for ReadFull (0.07 sec)
-
cmd/streaming-signature-v4.go
// // The signature is 64 bytes long (hex-encoded SHA256 hash) and // starts with a 16 byte header: len("chunk-signature=") + 64 == 80. var signature [80]byte _, err = io.ReadFull(cr.reader, signature[:]) if err == io.EOF { err = io.ErrUnexpectedEOF } if err != nil { cr.err = err return n, cr.err } if !bytes.HasPrefix(signature[:], []byte("chunk-signature=")) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0) -
internal/auth/credentials.go
} if length <= 0 { length = accessKeyMaxLen } if length < accessKeyMinLen { return "", errors.New("auth: access key length is too short") } key := make([]byte, length) if _, err := io.ReadFull(random, key); err != nil { return "", err } for i := range key { key[i] = alphaNumericTable[key[i]%alphaNumericTableLen] } return string(key), nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
src/archive/zip/reader.go
// first read just those 4 bytes to see if it exists. if _, err := io.ReadFull(r, buf[:4]); err != nil { return err } off := 0 maybeSig := readBuf(buf[:4]) if maybeSig.uint32() != dataDescriptorSignature { // No data descriptor signature. Keep these four // bytes. off += 4 } if _, err := io.ReadFull(r, buf[off:12]); err != nil { return err } b := readBuf(buf[:12])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
src/archive/tar/reader_test.go
t.Fatalf("entry %d, Next(): got %v, want %v", i, err, nil) } buf := make([]byte, tc.cnt) if _, err := io.ReadFull(tr, buf); err != nil { t.Fatalf("entry %d, ReadFull(): got %v, want %v", i, err, nil) } if string(buf) != tc.output { t.Fatalf("entry %d, ReadFull(): got %q, want %q", i, string(buf), tc.output) } } if _, err := tr.Next(); err != io.EOF {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0) -
src/archive/tar/reader.go
func (tr *Reader) readHeader() (*Header, *block, error) { // Two blocks of zero bytes marks the end of the archive. if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 0 bytes read } if bytes.Equal(tr.blk[:], zeroBlock[:]) { if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 1 block of zeros read }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Mar 08 01:59:14 UTC 2024 - 26.8K bytes - Viewed (0) -
src/archive/zip/zip_test.go
if err != nil { t.Fatal("opening:", err) } rc.(*checksumReader).hash = fakeHash32{} 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 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
cmd/erasure-encode_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } buffer := make([]byte, test.blocksize, 2*test.blocksize) data := make([]byte, test.data) if _, err = io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Test %d: failed to generate random test data: %v", i, err) } writers := make([]io.Writer, len(disks)) for i, disk := range disks { if disk == OfflineDisk {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/storage-rest-server.go
if !s.IsValid(w, r) { return } volume := r.Form.Get(storageRESTVolume) filePath := r.Form.Get(storageRESTFilePath) buf := make([]byte, r.ContentLength) _, err := io.ReadFull(r.Body, buf) if err != nil { s.writeErrorResponse(w, err) return } err = s.getStorage().AppendFile(r.Context(), volume, filePath, buf) if err != nil { s.writeErrorResponse(w, err) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
cmd/metacache-stream.go
sz, err := r.mr.ReadStringHeader() if err != nil { r.err = err return err } if cap(tmp) < int(sz) { tmp = make([]byte, 0, sz+256) } tmp = tmp[:sz] _, err = r.mr.R.ReadFull(tmp) if err != nil { r.err = err return err } if string(tmp) >= s { r.current.name = string(tmp) r.current.metadata, r.err = r.mr.ReadBytes(nil) return r.err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 19.5K bytes - Viewed (0) -
internal/ioutil/ioutil.go
var written int64 for { buf := alignedBuf if totalSize > 0 { remaining := totalSize - written if remaining < int64(len(buf)) { buf = buf[:remaining] } } nr, err := io.ReadFull(r, buf) eof := errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) if err != nil && !eof { return written, err } buf = buf[:nr] var ( n int un int nw int64
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K bytes - Viewed (0)