diskmapper: fix zap.Error without err (#2012)

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-07-05 10:07:05 +02:00 committed by GitHub
parent 37288deacf
commit 149820fdce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ func main() {
}
metadataClient, err = azurecloud.New(context.Background())
if err != nil {
log.With(zap.Error).Fatalf("Failed to set up Azure metadata client")
log.With(zap.Error(err)).Fatalf("Failed to set up Azure metadata client")
}
case cloudprovider.GCP:
@ -98,7 +98,7 @@ func main() {
}
gcpMeta, err := gcpcloud.New(context.Background())
if err != nil {
log.With(zap.Error).Fatalf("Failed to create GCP metadata client")
log.With(zap.Error(err)).Fatalf("Failed to create GCP metadata client")
}
defer gcpMeta.Close()
metadataClient = gcpMeta
@ -107,7 +107,7 @@ func main() {
diskPath = openstackStateDiskPath
metadataClient, err = openstack.New(context.Background())
if err != nil {
log.With(zap.Error).Fatalf("Failed to create OpenStack metadata client")
log.With(zap.Error(err)).Fatalf("Failed to create OpenStack metadata client")
}
case cloudprovider.QEMU: