Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ReadFull (0.19 sec)

  1. cmd/dummy-data-generator_test.go

    // also returned.
    func cmpReaders(r1, r2 io.Reader) (bool, string) {
    	bufLen := 32 * 1024
    	b1, b2 := make([]byte, bufLen), make([]byte, bufLen)
    	for i := 0; true; i++ {
    		n1, e1 := io.ReadFull(r1, b1)
    		n2, e2 := io.ReadFull(r2, b2)
    		if n1 != n2 {
    			return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2)
    		}
    		if !bytes.Equal(b1[:n1], b2[:n2]) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 4.8K bytes
    - Viewed (0)
Back to top