Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ReaderFrom (0.09 sec)

  1. internal/http/response-recorder.go

    	rf, _ := w.(io.ReaderFrom)
    	return &ResponseRecorder{
    		ResponseWriter: w,
    		ReaderFrom:     rf,
    		StatusCode:     http.StatusOK,
    		StartTime:      time.Now().UTC(),
    	}
    }
    
    // ErrNotImplemented when a functionality is not implemented
    var ErrNotImplemented = errors.New("not implemented")
    
    // ReadFrom implements support for calling internal io.ReaderFrom implementations
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    	const bufSize = 16 << 10
    	buf := make([]byte, bufSize)
    	r := bytes.NewReader(buf)
    	srcReader := NewReaderSize(onlyReader{r}, 1<<10)
    	if _, ok := io.Discard.(io.ReaderFrom); !ok {
    		b.Fatal("io.Discard doesn't support ReaderFrom")
    	}
    	for i := 0; i < b.N; i++ {
    		r.Seek(0, io.SeekStart)
    		srcReader.Reset(onlyReader{r})
    		n, err := srcReader.WriteTo(io.Discard)
    		if err != nil {
    			b.Fatal(err)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top