Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for Errorf (0.87 sec)

  1. src/bytes/bytes_test.go

    		a := Repeat(tin, tt.count)
    		if !Equal(a, tout) {
    			t.Errorf("Repeat(%q, %d) = %q; want %q", tin, tt.count, a, tout)
    			continue
    		}
    	}
    }
    
    func repeat(b []byte, count int) (err error) {
    	defer func() {
    		if r := recover(); r != nil {
    			switch v := r.(type) {
    			case error:
    				err = v
    			default:
    				err = fmt.Errorf("%s", v)
    			}
    		}
    	}()
    
    	Repeat(b, count)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. cmd/object-api-multipart_test.go

    			if testCase.expectedError.Error() != actualErr.Error() {
    				t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead.", i+1, instanceType, testCase.expectedError.Error(), actualErr.Error())
    			}
    		}
    		// Test passes as expected, but the output values are verified for correctness here.
    		if actualErr == nil && testCase.shouldPass {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    	if err != nil {
    		t.Errorf("AutoMigrate err:%v", err)
    	}
    	err = db.Table("objects").Create(&Object1{}).Error
    	if err != nil {
    		t.Errorf("create err:%v", err)
    	}
    
    	// AddColumn
    	err = db.Table("objects").AutoMigrate(&Object2{})
    	if err != nil {
    		t.Errorf("AutoMigrate err:%v", err)
    	}
    
    	err = db.Table("objects").Take(&Object2{}).Error
    	if err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. cmd/object-api-listobjects_test.go

    				if !strings.Contains(err.Error(), testCase.err.Error()) {
    					t.Errorf("Test %d: %s: Expected to fail with error \"%s\", but instead failed with error \"%s\" instead", i+1, instanceType, testCase.err.Error(), err.Error())
    				}
    			}
    			// Since there are cases for which ListObjects fails, this is
    			// necessary. Test passes as expected, but the output values
    			// are verified for correctness here.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
  5. cmd/iam.go

    		if err != nil {
    			iamLogIf(GlobalContext, fmt.Errorf("error parsing role ARN %s: %v", roleArn, err))
    			return false
    		}
    		policies = newMappedPolicy(sys.rolesMap[arn]).toSlice()
    
    	default:
    		// Otherwise, inherit parent user's policy
    		var err error
    		policies, err = sys.PolicyDBGet(parentUser, args.Groups...)
    		if err != nil {
    			iamLogIf(GlobalContext, fmt.Errorf("error fetching policies on %s: %v", parentUser, err))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  6. cmd/test-utils_test.go

    			t.Fatalf("MinIO %s: Failed parsing response body: <ERROR> %v", instanceType, err)
    		}
    
    		actualError := &APIErrorResponse{}
    		if err = xml.Unmarshal(actualContent, actualError); err != nil {
    			t.Errorf("MinIO %s: error response failed to parse error XML", instanceType)
    		}
    
    		if actualError.BucketName != bucketName {
    			t.Errorf("MinIO %s: error response bucket name differs from expected value", instanceType)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  7. cmd/erasure-server-pool.go

    }
    
    // GetRawData will return all files with a given raw path to the callback.
    // Errors are ignored, only errors from the callback are returned.
    // For now only direct file paths are supported.
    func (z *erasureServerPools) GetRawData(ctx context.Context, volume, file string, fn func(r io.Reader, host string, disk string, filename string, info StatInfo) error) error {
    	found := 0
    	for _, s := range z.serverPools {
    		for _, set := range s.sets {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 20:08:20 GMT 2024
    - 80.5K bytes
    - Viewed (0)
  8. cmd/peer-rest-server.go

    	for m := range re {
    		if err := enc.Encode(m); err != nil {
    			s.writeErrorResponse(w, errors.New("Encoding mrf failed: "+err.Error()))
    			return
    		}
    	}
    }
    
    // DevNull - everything goes to io.Discard
    func (s *peerRESTServer) DevNull(w http.ResponseWriter, r *http.Request) {
    	if !s.IsValid(w, r) {
    		s.writeErrorResponse(w, errors.New("invalid request"))
    		return
    	}
    
    	globalNetPerfRX.Connect()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
  9. internal/s3select/select_test.go

    					t.Fatal(err)
    				}
    				t.Logf("got expected error: %v", err)
    				return
    			}
    
    			if err = s3Select.Open(newBytesRSC(testCase.input)); err != nil {
    				if !testCase.wantErr {
    					t.Fatal(err)
    				}
    				t.Logf("got expected error: %v", err)
    				return
    			} else if testCase.wantErr {
    				t.Error("did not get expected error")
    				return
    			}
    
    			w := &testResponseWriter{}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 76.2K bytes
    - Viewed (0)
  10. cmd/iam-store.go

    	saveIAMConfig(ctx context.Context, item interface{}, path string, opts ...options) error
    	loadIAMConfig(ctx context.Context, item interface{}, path string) error
    	deleteIAMConfig(ctx context.Context, path string) error
    	savePolicyDoc(ctx context.Context, policyName string, p PolicyDoc) error
    	saveMappedPolicy(ctx context.Context, name string, userType IAMUserType, isGroup bool, mp MappedPolicy, opts ...options) error
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
Back to top