revise from reflect.Equal to reflect.DeepEqual

Signed-off-by: sivchari <shibuuuu5@gmail.com>
This commit is contained in:
sivchari 2024-02-07 18:57:01 +09:00
parent c04227d209
commit 5c71e1f461
1 changed files with 1 additions and 1 deletions

View File

@ -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`.