revise from reflect.Equal to reflect.DeepEqual
Signed-off-by: sivchari <shibuuuu5@gmail.com>
This commit is contained in:
parent
c04227d209
commit
5c71e1f461
|
@ -104,7 +104,7 @@ Testing:
|
||||||
should be considered for critical and/or CPU intensive operations.
|
should be considered for critical and/or CPU intensive operations.
|
||||||
- General guidelines:
|
- General guidelines:
|
||||||
- Follow a [DAMP principle](https://stackoverflow.com/a/11837973).
|
- Follow a [DAMP principle](https://stackoverflow.com/a/11837973).
|
||||||
- Use `cmp.Diff` instead of `reflect.Equal`, to provide useful comparisons.
|
- Use `cmp.Diff` instead of `reflect.DeepEqual`, to provide useful comparisons.
|
||||||
- Compare errors using `errors.Is` (`cmpopts.EquateErrors` when using
|
- Compare errors using `errors.Is` (`cmpopts.EquateErrors` when using
|
||||||
`cmp.Diff`) instead of comparing the error strings.
|
`cmp.Diff`) instead of comparing the error strings.
|
||||||
- Leverage existing utility functions from `pkg/scheduler/testing`.
|
- Leverage existing utility functions from `pkg/scheduler/testing`.
|
||||||
|
|
Loading…
Reference in New Issue