Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for newFileFunc (0.12 sec)

  1. src/net/http/transfer_test.go

    	fileType := reflect.TypeFor[*os.File]()
    	bufferType := reflect.TypeFor[*bytes.Buffer]()
    
    	nBytes := int64(1 << 10)
    	newFileFunc := func() (r io.Reader, done func(), err error) {
    		f, err := os.CreateTemp("", "net-http-newfilefunc")
    		if err != nil {
    			return nil, nil, err
    		}
    
    		// Write some bytes to the file to enable reading.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:16:28 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  2. src/net/http/transport_test.go

    	}{
    		{
    			name:             "file, length",
    			readerFunc:       newFileFunc,
    			contentLength:    nBytes,
    			expectedReadFrom: true,
    		},
    		{
    			name:       "file, no length",
    			readerFunc: newFileFunc,
    		},
    		{
    			name:          "file, negative length",
    			readerFunc:    newFileFunc,
    			contentLength: -1,
    		},
    		{
    			name:          "buffer",
    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