From 8553523f41ce4417616a385d2b3189d8a8d506be Mon Sep 17 00:00:00 2001 From: Leonidas Vrachnis Date: Thu, 26 Sep 2024 21:17:08 +0200 Subject: [PATCH] linter fixes --- filemanager/digitaloceanmanager.go | 2 +- filemanager/s3manager.go | 2 +- testhelper/docker/resource/mysql/mysql.go | 2 +- testhelper/docker/resource/postgres/postgres.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filemanager/digitaloceanmanager.go b/filemanager/digitaloceanmanager.go index ec61eccd..3a6ddec1 100644 --- a/filemanager/digitaloceanmanager.go +++ b/filemanager/digitaloceanmanager.go @@ -102,7 +102,7 @@ func (manager *digitalOceanManager) Upload(ctx context.Context, file *os.File, p output, err := DOmanager.UploadWithContext(ctx, uploadInput) if err != nil { if awsError, ok := err.(awserr.Error); ok && awsError.Code() == "MissingRegion" { - err = fmt.Errorf(fmt.Sprintf(`Bucket '%s' not found.`, manager.Config.Bucket)) + err = fmt.Errorf(`Bucket '%s' not found.`, manager.Config.Bucket) } return UploadedFile{}, err } diff --git a/filemanager/s3manager.go b/filemanager/s3manager.go index b87315cf..d3609065 100644 --- a/filemanager/s3manager.go +++ b/filemanager/s3manager.go @@ -126,7 +126,7 @@ func (m *S3Manager) Upload(ctx context.Context, file *os.File, prefixes ...strin output, err := s3manager.UploadWithContext(ctx, uploadInput) if err != nil { if codeErr, ok := err.(codeError); ok && codeErr.Code() == "MissingRegion" { - err = fmt.Errorf(fmt.Sprintf(`Bucket '%s' not found.`, m.config.Bucket)) + err = fmt.Errorf(`Bucket '%s' not found.`, m.config.Bucket) } return UploadedFile{}, err } diff --git a/testhelper/docker/resource/mysql/mysql.go b/testhelper/docker/resource/mysql/mysql.go index c01ef24d..50e03de8 100644 --- a/testhelper/docker/resource/mysql/mysql.go +++ b/testhelper/docker/resource/mysql/mysql.go @@ -76,7 +76,7 @@ func Setup(pool *dockertest.Pool, d resource.Cleaner, opts ...func(*Config)) (*R return err } if code != 0 { - return fmt.Errorf("mysql not ready:\n%s" + w.String()) + return fmt.Errorf("mysql not ready:\n%s", w.String()) } return nil }) diff --git a/testhelper/docker/resource/postgres/postgres.go b/testhelper/docker/resource/postgres/postgres.go index 6f211b52..98777f77 100644 --- a/testhelper/docker/resource/postgres/postgres.go +++ b/testhelper/docker/resource/postgres/postgres.go @@ -116,7 +116,7 @@ func Setup(pool *dockertest.Pool, d resource.Cleaner, opts ...func(*Config)) (*R return err } if code != 0 { - return fmt.Errorf("postgres not ready:\n%s" + w.String()) + return fmt.Errorf("postgres not ready:\n%s", w.String()) } // 2. create a sql.DB and verify connection