Merge pull request #75577 from mars1024/bugfix/use_add_in_enqueue

replace AddRateLimited with Add in enqueue func

Kubernetes-commit: ab35bd06689744ee275fbec4d43cc7a30f5cca4d
This commit is contained in:
Kubernetes Publisher
2019-03-22 00:04:57 -07:00
parent 7047ee6cec
commit 0e5b089d85
4 changed files with 248 additions and 229 deletions
+13
View File
@@ -78,7 +78,20 @@ func ObjectGoPrintDiff(a, b interface{}) string {
)
}
// ObjectReflectDiff returns a multi-line formatted diff between two objects
// of equal type. If an object with private fields is passed you will
// only see string comparison for those fields. Otherwise this presents the
// most human friendly diff of two structs of equal type in this package.
func ObjectReflectDiff(a, b interface{}) string {
if a == nil && b == nil {
return "<no diffs>"
}
if a == nil {
return fmt.Sprintf("a is nil and b is not-nil")
}
if b == nil {
return fmt.Sprintf("a is not-nil and b is nil")
}
vA, vB := reflect.ValueOf(a), reflect.ValueOf(b)
if vA.Type() != vB.Type() {
return fmt.Sprintf("type A %T and type B %T do not match", a, b)