- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for copyLen (0.07 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. }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Jan 27 00:22:03 UTC 2016 - 2K 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) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8K bytes - Viewed (0)