- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 83 for newDecoder (0.18 sec)
-
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) -
docs/debugging/xl-meta/main.go
} }) if err != nil { return nil, err } } if ndjson { return buf.Bytes(), nil } var msi map[string]interface{} dec := json.NewDecoder(buf) // Use number to preserve integers. dec.UseNumber() err = dec.Decode(&msi) if err != nil { return nil, err } b, err = json.MarshalIndent(msi, "", " ") if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 05 11:57:44 UTC 2024 - 40.3K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle_test.go
NoncurrentDays: 2, NewerNoncurrentVersions: 4, set: true, }, }, } for i, tc := range testCases { var got NoncurrentVersionExpiration dec := xml.NewDecoder(strings.NewReader(tc.xml)) if err := dec.Decode(&got); err != nil || got != tc.expected { if err != nil { t.Fatalf("%d: Failed to unmarshal xml %v", i+1, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 55.1K bytes - Viewed (0) -
cmd/bucket-handlers.go
return } headerLen += int64(len(name)) + int64(len(fileName)) if name != "file" { if http.CanonicalHeaderKey(name) == http.CanonicalHeaderKey("x-minio-fanout-list") { dec := json.NewDecoder(part) // while the array contains values for dec.More() { var m minio.PutObjectFanOutEntry if err := dec.Decode(&m); err != nil { part.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 12:24:04 UTC 2024 - 63.4K bytes - Viewed (0) -
cmd/test-utils_test.go
0, nil, creds.AccessKey, creds.SecretKey, metadata) if err != nil { t.Fatalf("Unexpected err: %#v", err) } rec := httptest.NewRecorder() apiRouter.ServeHTTP(rec, reqI) checkRespErr(rec, http.StatusOK) decoder := xml.NewDecoder(rec.Body) multipartResponse := &InitiateMultipartUploadResponse{} err = decoder.Decode(multipartResponse) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/bucket-policy-handlers_test.go
for i, testCase := range testCases { // obtain the put bucket policy request body. // initialize HTTP NewRecorder, this records any mutations to response writer inside the handler. recV4 := httptest.NewRecorder() // construct HTTP request for PUT bucket policy endpoint. reqV4, err := newTestSignedRequestV4(http.MethodPut, getPutPolicyURL("", testCase.bucketName),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 32.9K bytes - Viewed (0) -
cmd/bucket-handlers_test.go
t.Fatalf("Test %v: expected failure, but succeeded with %v", instanceType, rec.Code) } // Verify response of the V2 signed HTTP request. // initialize HTTP NewRecorder, this records any mutations to response writer inside the handler. recV2 := httptest.NewRecorder() // construct HTTP request for DELETE bucket.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 39.8K bytes - Viewed (0) -
docs/iam/identity-manager-plugin.go
package main import ( "encoding/json" "errors" "fmt" "log" "net/http" ) func writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusBadRequest) json.NewEncoder(w).Encode(map[string]string{ "reason": fmt.Sprintf("%v", err), }) } type Resp struct { User string `json:"user"`
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 2.1K bytes - Viewed (0) -
cmd/post-policy_test.go
if !globalBrowserEnabled { globalBrowserEnabled = true defer func() { globalBrowserEnabled = false }() } // initialize HTTP NewRecorder, this records any mutations to response writer inside the handler. rec := httptest.NewRecorder() req, perr := newPostRequestV4("", bucketName, objectName, []byte("pwned"), credentials.AccessKey, credentials.SecretKey) if perr != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 30.2K bytes - Viewed (0) -
docs/iam/access-manager-plugin.go
flag.StringVar(&certFile, "cert-file", "", "Path to TLS cert file") } func writeErrorResponse(w http.ResponseWriter, err error) { w.WriteHeader(http.StatusBadRequest) json.NewEncoder(w).Encode(map[string]string{ "error": fmt.Sprintf("%v", err), }) } type Result struct { Result bool `json:"result"` } func mainHandler(w http.ResponseWriter, r *http.Request) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 08 17:15:20 UTC 2024 - 2.7K bytes - Viewed (0)