cleanup: standardize error format in util.k8sGetNodeLabels()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 15:23:35 +01:00 committed by mergify[bot]
parent 752841d213
commit 6d5de7458d

View File

@ -35,7 +35,7 @@ func k8sGetNodeLabels(nodeName string) (map[string]string, error) {
client := NewK8sClient() client := NewK8sClient()
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get node (%s) information : %v", nodeName, err) return nil, fmt.Errorf("failed to get node %q information: %w", nodeName, err)
} }
return node.GetLabels(), nil return node.GetLabels(), nil