Merge pull request #99389 from tanjing2020/change-log

Use %w instead of %v to format errors
This commit is contained in:
Kubernetes Prow Robot
2021-03-08 12:07:12 -08:00
committed by GitHub
12 changed files with 23 additions and 22 deletions

View File

@@ -238,7 +238,7 @@ func getPodPreferredNodeAffinity(pod *v1.Pod) (*nodeaffinity.PreferredScheduling
func getPreScoreState(cycleState *framework.CycleState) (*preScoreState, error) {
c, err := cycleState.Read(preScoreStateKey)
if err != nil {
return nil, fmt.Errorf("reading %q from cycleState: %v", preScoreStateKey, err)
return nil, fmt.Errorf("reading %q from cycleState: %w", preScoreStateKey, err)
}
s, ok := c.(*preScoreState)