mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #45875 from YuPengZTE/devGetForObject
Automatic merge from submit-queue fix missing argument for Errorf(%v): format reads arg 1, have only 0 args Signed-off-by: yupengzte <yu.peng36@zte.com.cn> **What this PR does / why we need it**: add the missing code of "len(res.Items)" **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
commit
b996c8b997
@ -216,7 +216,7 @@ func (m *namespacedMetrics) GetForObject(groupKind schema.GroupKind, name string
|
||||
}
|
||||
|
||||
if len(res.Items) != 1 {
|
||||
return nil, fmt.Errorf("the custom metrics API server returned %v results when we asked for exactly one")
|
||||
return nil, fmt.Errorf("the custom metrics API server returned %v results when we asked for exactly one", len(res.Items))
|
||||
}
|
||||
|
||||
return &res.Items[0], nil
|
||||
|
Loading…
Reference in New Issue
Block a user