Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 46 for NewDecoder (0.13 sec)

  1. cmd/perf-tests.go

    		Transport: globalRemoteTargetTransport,
    	}
    	resp, err := client.Do(req)
    	if err != nil {
    		result.Error = err.Error()
    		return
    	}
    	defer xhttp.DrainBody(resp.Body)
    	err = gob.NewDecoder(resp.Body).Decode(&result)
    	// endpoint have been overwritten
    	result.Endpoint = rp.String()
    	if err != nil {
    		result.Error = err.Error()
    	}
    	return
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  2. cmd/server_test.go

    	response, err = s.client.Do(request)
    	c.Assert(err, nil)
    	c.Assert(response.StatusCode, http.StatusOK)
    
    	var results ListBucketsResponse
    	// parse the list bucket response.
    	decoder := xml.NewDecoder(response.Body)
    	err = decoder.Decode(&results)
    	// validating that the xml-decoding/parsing was successful.
    	c.Assert(err, nil)
    
    	// Fetch the bucket created above
    	var createdBucket Bucket
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 15 16:28:02 UTC 2024
    - 116.3K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    	b.WriteTo(os.Stdout)
    	// Output: Hello world!
    }
    
    func ExampleBuffer_reader() {
    	// A Buffer can turn a string or a []byte into an io.Reader.
    	buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==")
    	dec := base64.NewDecoder(base64.StdEncoding, buf)
    	io.Copy(os.Stdout, dec)
    	// Output: Gophers rule!
    }
    
    func ExampleBuffer_Bytes() {
    	buf := bytes.Buffer{}
    	buf.Write([]byte{'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'})
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 07 17:22:36 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  4. internal/s3select/select.go

    	}
    	return s3Select.recordReader.Close()
    }
    
    // NewS3Select - creates new S3Select by given request XML reader.
    func NewS3Select(r io.Reader) (*S3Select, error) {
    	s3Select := &S3Select{}
    	if err := xml.NewDecoder(r).Decode(s3Select); err != nil {
    		return nil, err
    	}
    
    	return s3Select, nil
    }
    
    //////////////////
    // Helpers
    /////////////////
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. cmd/admin-handlers.go

    		(hip.clientToken != "" && (hip.forceStart || hip.forceStop)) {
    		err = ErrInvalidRequest
    		return
    	}
    
    	// ignore body if clientToken is provided
    	if hip.clientToken == "" {
    		jerr := json.NewDecoder(r).Decode(&hip.hs)
    		if jerr != nil {
    			adminLogIf(GlobalContext, jerr, logger.ErrorKind)
    			err = ErrRequestBodyParse
    			return
    		}
    	}
    
    	err = ErrNone
    	return
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
  6. cmd/utils.go

    func xmlDecoder(body io.Reader, v interface{}, size int64) error {
    	var lbody io.Reader
    	if size > 0 {
    		lbody = io.LimitReader(body, size)
    	} else {
    		lbody = body
    	}
    	d := xml.NewDecoder(lbody)
    	// Ignore any encoding set in the XML body
    	d.CharsetReader = nopCharsetConverter
    	err := d.Decode(v)
    	if errors.Is(err, io.EOF) {
    		err = &xml.SyntaxError{
    			Line: 0,
    			Msg:  err.Error(),
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  7. api/go1.10.txt

    pkg encoding/asn1, const TagNumericString ideal-int
    pkg encoding/asn1, func MarshalWithParams(interface{}, string) ([]uint8, error)
    pkg encoding/csv, type ParseError struct, StartLine int
    pkg encoding/hex, func NewDecoder(io.Reader) io.Reader
    pkg encoding/hex, func NewEncoder(io.Writer) io.Writer
    pkg encoding/json, method (*Decoder) DisallowUnknownFields()
    pkg encoding/xml, func NewTokenDecoder(TokenReader) *Decoder
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Feb 06 05:00:01 UTC 2018
    - 30.1K bytes
    - Viewed (0)
  8. cmd/bucket-lifecycle.go

    // parseRestoreRequest parses RestoreObjectRequest from xml
    func parseRestoreRequest(reader io.Reader) (*RestoreObjectRequest, error) {
    	req := RestoreObjectRequest{}
    	if err := xml.NewDecoder(io.LimitReader(reader, maxRestoreObjectRequestSize)).Decode(&req); err != nil {
    		return nil, err
    	}
    	return &req, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 15:35:37 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  9. src/cmd/api/main_test.go

    		if err != nil {
    			log.Fatalf("loading imports: %v\n%s", err, out)
    		}
    
    		var stdPackages []string
    		importMap := make(map[string]map[string]string)
    		importDir := make(map[string]string)
    		dec := json.NewDecoder(bytes.NewReader(out))
    		for {
    			var pkg struct {
    				ImportPath, Dir string
    				ImportMap       map[string]string
    				Standard        bool
    			}
    			err := dec.Decode(&pkg)
    			if err == io.EOF {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 04 18:16:59 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  10. cmd/object-handlers_test.go

    	}
    	apiRouter.ServeHTTP(rec, req)
    	if rec.Code != http.StatusOK {
    		t.Fatalf("%s:  Expected the response status to be `%d`, but instead found `%d`", instanceType, http.StatusOK, rec.Code)
    	}
    	decoder := xml.NewDecoder(rec.Body)
    	multipartResponse := &InitiateMultipartUploadResponse{}
    	err = decoder.Decode(multipartResponse)
    	if err != nil {
    		t.Fatalf("Error decoding the recorded response Body")
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 20:10:44 UTC 2024
    - 163.2K bytes
    - Viewed (0)
Back to top