Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 154 for derrs (0.11 sec)

  1. src/errors/join.go

    	e := &joinError{
    		errs: make([]error, 0, n),
    	}
    	for _, err := range errs {
    		if err != nil {
    			e.errs = append(e.errs, err)
    		}
    	}
    	return e
    }
    
    type joinError struct {
    	errs []error
    }
    
    func (e *joinError) Error() string {
    	// Since Join returns nil if every value in errs is nil,
    	// e.errs cannot be empty.
    	if len(e.errs) == 1 {
    		return e.errs[0].Error()
    	}
    
    	b := []byte(e.errs[0].Error())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 18:37:32 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/errors/join_test.go

    	err2 := errors.New("err2")
    	for _, test := range []struct {
    		errs []error
    		want []error
    	}{{
    		errs: []error{err1},
    		want: []error{err1},
    	}, {
    		errs: []error{err1, err2},
    		want: []error{err1, err2},
    	}, {
    		errs: []error{err1, nil, err2},
    		want: []error{err1, err2},
    	}} {
    		got := errors.Join(test.errs...).(interface{ Unwrap() []error }).Unwrap()
    		if !reflect.DeepEqual(got, test.want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 17 21:48:12 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modcmd/verify.go

    		} else if hZ != h {
    			errs = append(errs, fmt.Errorf("%s %s: zip has been modified (%v)", mod.Path, mod.Version, zip))
    		}
    	}
    	if dirErr != nil && errors.Is(dirErr, fs.ErrNotExist) {
    		// ok
    	} else {
    		hD, err := dirhash.HashDir(dir, mod.Path+"@"+mod.Version, dirhash.DefaultHash)
    		if err != nil {
    
    			errs = append(errs, fmt.Errorf("%s %s: %v", mod.Path, mod.Version, err))
    			return errs
    		}
    		if hD != h {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 16:56:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. pkg/apis/authorization/validation/validation_test.go

    			t.Errorf("%s: expected failure for %q", c.name, c.msg)
    		} else if !strings.Contains(errs[0].Error(), c.msg) {
    			t.Errorf("%s: unexpected error: %q, expected: %q", c.name, errs[0], c.msg)
    		}
    		errs = ValidateLocalSubjectAccessReview(&authorizationapi.LocalSubjectAccessReview{Spec: c.obj})
    		if len(errs) == 0 {
    			t.Errorf("%s: expected failure for %q", c.name, c.msg)
    		} else if !strings.Contains(errs[0].Error(), c.msg) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  5. pkg/kubelet/runtime.go

    			errs = append(errs, fmt.Errorf("%s is not healthy: %v", hc.name, err))
    		}
    	}
    	if s.runtimeError != nil {
    		errs = append(errs, s.runtimeError)
    	}
    
    	return utilerrors.NewAggregate(errs)
    }
    
    func (s *runtimeState) networkErrors() error {
    	s.RLock()
    	defer s.RUnlock()
    	errs := []error{}
    	if s.networkError != nil {
    		errs = append(errs, s.networkError)
    	}
    	return utilerrors.NewAggregate(errs)
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. pkg/kubeapiserver/options/admission_test.go

    	options = NewAdmissionOptions()
    	options.PluginNames = []string{"ServiceAccount"}
    	if errs := options.Validate(); len(errs) > 0 {
    		t.Errorf("Unexpected err: %v", errs)
    	}
    
    	// nil pointer
    	options = nil
    	if errs := options.Validate(); errs != nil {
    		t.Errorf("expected no errors, error found %+v", errs)
    	}
    }
    
    func TestComputeEnabledAdmission(t *testing.T) {
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 15 01:51:35 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  7. operator/pkg/validate/validate.go

    					errs = util.AppendErrs(errs, validateLeaf(validations, newPath, newValue, checkRequired))
    				}
    			}
    		case reflect.Ptr:
    			if util.IsNilOrInvalidValue(fieldValue.Elem()) {
    				continue
    			}
    			newPath := append(path, fieldName)
    			if fieldValue.Elem().Kind() == reflect.Struct {
    				errs = util.AppendErrs(errs, Validate(validations, fieldValue.Interface(), newPath, checkRequired))
    			} else {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 12 16:04:15 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  8. operator/pkg/validate/validate_values_test.go

    			t.Fatalf("file %s failed validation with: %s", f, err)
    		}
    	}
    }
    
    func makeErrors(estr []string) util.Errors {
    	var errs util.Errors
    	for _, s := range estr {
    		errs = util.AppendErr(errs, fmt.Errorf("%s", s))
    	}
    	return errs
    }
    
    func yamlFileFilter(path string) bool {
    	return filepath.Base(path) == "values.yaml"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 13:43:12 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. pkg/apis/scheduling/validation/validation_test.go

    			T: field.ErrorTypeInvalid,
    		},
    	}
    
    	for k, v := range errorCases {
    		errs := ValidatePriorityClassUpdate(&v.P, &old)
    		if len(errs) == 0 {
    			t.Errorf("Expected error for %s, but it succeeded", k)
    			continue
    		}
    		for i := range errs {
    			if errs[i].Type != v.T {
    				t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i])
    			}
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 07:30:47 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  10. operator/pkg/patch/patch.go

    		if err != nil {
    			errs = util.AppendErr(errs, err)
    			metrics.ManifestPatchErrorTotal.Increment()
    			continue
    		}
    
    		err = tpath.WritePathContext(inc, v, false)
    		if err != nil {
    			errs = util.AppendErr(errs, err)
    			metrics.ManifestPatchErrorTotal.Increment()
    		}
    	}
    	oy, err := yaml2.Marshal(bo)
    	if err != nil {
    		return "", util.AppendErr(errs, err)
    	}
    	return string(oy), errs
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top