Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readerFunc (3.04 sec)

  1. src/io/multi_test.go

    	}
    	if buf.String() != "hello world" {
    		t.Errorf("buf.String() = %q, want %q", buf.String(), "hello world")
    	}
    }
    
    // readerFunc is a Reader implemented by the underlying func.
    type readerFunc func(p []byte) (int, error)
    
    func (f readerFunc) Read(p []byte) (int, error) {
    	return f(p)
    }
    
    // callDepth returns the logical call depth for the given PCs.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:32 UTC 2022
    - 10K bytes
    - Viewed (0)
  2. src/crypto/tls/tls_test.go

    	}
    	if !isTimeoutError(err) {
    		t.Error("Write timed out but did not classify the error as a Timeout")
    	}
    }
    
    type readerFunc func([]byte) (int, error)
    
    func (f readerFunc) Read(b []byte) (int, error) { return f(b) }
    
    // TestDialer tests that tls.Dialer.DialContext can abort in the middle of a handshake.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 60.5K bytes
    - Viewed (0)
  3. src/net/http/transport_test.go

    			readerFunc:    newFileFunc,
    			contentLength: -1,
    		},
    		{
    			name:          "buffer",
    			contentLength: nBytes,
    			readerFunc:    newBufferFunc,
    		},
    		{
    			name:       "buffer, no length",
    			readerFunc: newBufferFunc,
    		},
    		{
    			name:          "buffer, length -1",
    			contentLength: -1,
    			readerFunc:    newBufferFunc,
    		},
    	}
    
    	for _, tc := range cases {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top