- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for CopyN (0.23 sec)
-
src/archive/zip/example_test.go
// printing some of their contents. for _, f := range r.File { fmt.Printf("Contents of %s:\n", f.Name) rc, err := f.Open() if err != nil { log.Fatal(err) } _, err = io.CopyN(os.Stdout, rc, 68) if err != nil { log.Fatal(err) } rc.Close() fmt.Println() } // Output: // Contents of README: // This is the source code repository for the Go programming language. }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Jan 27 00:22:03 GMT 2016 - 2K bytes - Viewed (0) -
src/archive/tar/reader.go
var nf int64 // Size of fragment holeStart, holeEnd := sr.sp[0].Offset, sr.sp[0].endOffset() if sr.pos < holeStart { // In a data fragment nf = holeStart - sr.pos nf, err = io.CopyN(ws, sr.fr, nf) } else { // In a hole fragment nf = holeEnd - sr.pos if sr.physicalRemaining() == 0 { writeLastByte = true nf-- } _, err = ws.Seek(nf, io.SeekCurrent) }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/bytes/reader_test.go
t.Errorf("behavior differs: with = %#v; without: %#v", with, withOut) } } // tests that Len is affected by reads, but Size is not. func TestReaderLenSize(t *testing.T) { r := NewReader([]byte("abc")) io.CopyN(io.Discard, r, 1) if r.Len() != 2 { t.Errorf("Len = %d; want 2", r.Len()) } if r.Size() != 3 { t.Errorf("Size = %d; want 3", r.Size()) } } func TestReaderReset(t *testing.T) {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0) -
cmd/admin-handlers-site-replication.go
ctx := r.Context() globalSiteNetPerfRX.Connect() defer globalSiteNetPerfRX.Disconnect() connectTime := time.Now() for { n, err := io.CopyN(xioutil.Discard, r.Body, 128*humanize.KiByte) atomic.AddUint64(&globalSiteNetPerfRX.RX, uint64(n)) if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Apr 15 09:40:39 GMT 2024 - 19.4K bytes - Viewed (0) -
src/archive/tar/writer.go
if sw.physicalRemaining() == 0 { readLastByte = true nf-- } _, err = rs.Seek(nf, io.SeekCurrent) } else { // In a data fragment nf = dataEnd - sw.pos nf, err = io.CopyN(sw.fw, rs, nf) } sw.pos += nf if sw.pos >= dataEnd && len(sw.sp) > 1 { sw.sp = sw.sp[1:] // Ensure last fragment always remains } }
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) -
src/archive/zip/zip_test.go
Method: Store, }) if err != nil { t.Fatal(err) } f.(*fileWriter).crc32 = fakeHash32{} size := wantOff - fileHeaderLen - uint64(len(filename)) - dataDescriptorLen if _, err := io.CopyN(f, zeros{}, int64(size)); err != nil { t.Fatal(err) } if err := w.Close(); err != nil { t.Fatal(err) } } } t.Run("uint32max-2_NoZip64", func(t *testing.T) { t.Parallel()
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) -
cmd/peer-rest-server.go
return } globalNetPerfRX.Connect() defer globalNetPerfRX.Disconnect() connectTime := time.Now() ctx := newContext(r, w, "DevNull") for { n, err := io.CopyN(xioutil.Discard, r.Body, 128*humanize.KiByte) atomic.AddUint64(&globalNetPerfRX.RX, uint64(n)) if err != nil && err != io.EOF {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 51.8K bytes - Viewed (0) -
cmd/bucket-handlers.go
return } fanOutEntries = append(fanOutEntries, m) } part.Close() continue } // value, store as string in memory n, err := io.CopyN(&b, part, maxMemoryBytes+1) part.Close() if err != nil && err != io.EOF { apiErr := errorCodes.ToAPIErr(ErrMalformedPOSTRequest) apiErr.Description = fmt.Sprintf("%s (%v)", apiErr.Description, err)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 25 16:27:27 GMT 2024 - 61.6K bytes - Viewed (0) -
cmd/admin-handlers.go
ctx, cancel := context.WithTimeout(ctx, madmin.MaxClientPerfTimeout) defer cancel() totalRx := int64(0) connectTime := time.Now() for { n, err := io.CopyN(xioutil.Discard, r.Body, 128*humanize.KiByte) if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { // would mean the network is not stable. Logging here will help in debugging network issues.
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Apr 21 11:43:18 GMT 2024 - 97.3K bytes - Viewed (2) -
api/go1.txt
pkg index/suffixarray, method (*Index) Read(io.Reader) error pkg index/suffixarray, method (*Index) Write(io.Writer) error pkg index/suffixarray, type Index struct pkg io, func Copy(Writer, Reader) (int64, error) pkg io, func CopyN(Writer, Reader, int64) (int64, error) pkg io, func LimitReader(Reader, int64) Reader pkg io, func MultiReader(...Reader) Reader pkg io, func MultiWriter(...Writer) Writer
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Aug 14 18:58:28 GMT 2013 - 1.7M bytes - Viewed (1)