fixed final issues

fixed format strings for slog
This commit is contained in:
miampf 2024-01-15 14:22:01 +01:00
parent 69556e84d9
commit 941889ade7
No known key found for this signature in database
GPG key ID: 376EAC0E5307A669
58 changed files with 191 additions and 2210 deletions

View file

@ -410,7 +410,7 @@ func (a *awsClient) deleteImage(ctx context.Context, ami string, region string,
snapshotID, err := a.getSnapshotID(ctx, ami, log)
if err != nil {
log.Warn("Failed to get AWS snapshot ID for image %s: %v", ami, err)
log.Warn(fmt.Sprintf("Failed to get AWS snapshot ID for image %s: %v", ami, err))
}
if err := a.deregisterImage(ctx, ami, dryrun, log); err != nil {
@ -686,10 +686,10 @@ type azImage struct {
func (a *azureClient) parseImage(ctx context.Context, image string, log *slog.Logger) (azImage, error) {
if m := azImageRegex.FindStringSubmatch(image); len(m) == 5 {
log.Debug(
log.Debug(fmt.Sprintf(
"Image matches local image format, resource group: %s, gallery: %s, image definition: %s, version: %s",
m[1], m[2], m[3], m[4],
)
))
return azImage{
resourceGroup: m[1],
gallery: m[2],