Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go fmt issues #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kbespalov
Copy link

@kbespalov kbespalov commented Sep 4, 2022

The make fmtcheck fails with the following error:

1. fmtcheck output

kbespalov@home-pc:~/workspaces/terraform-provider-yandex$ make fmtcheck
==> Checking that code complies with gofmt requirements...
gofmt needs running on the following files:
./yandex/internal/mutexkv/mutexkv.go
./yandex/resource_yandex_storage_bucket_test.go
./yandex/resource_yandex_storage_bucket.go
You can use the command: `make fmt` to reformat code.
make: *** [GNUmakefile:42: fmtcheck] Error 1
kbespalov@home-pc:~/workspaces/terraform-provider-yand

2. go fmt output

 gofmt -d -l .
yandex/internal/mutexkv/mutexkv.go
diff yandex/internal/mutexkv/mutexkv.go.orig yandex/internal/mutexkv/mutexkv.go
--- yandex/internal/mutexkv/mutexkv.go.orig
+++ yandex/internal/mutexkv/mutexkv.go
@@ -8,7 +8,6 @@
 // MutexKV is a simple key/value store for arbitrary mutexes. It can be used to
 // serialize changes across arbitrary collaborators that share knowledge of the
 // keys they must serialize on.
-//
 type MutexKV struct {
        lock  sync.Mutex
        store map[string]*sync.Mutex
yandex/resource_yandex_storage_bucket.go
diff yandex/resource_yandex_storage_bucket.go.orig yandex/resource_yandex_storage_bucket.go
--- yandex/resource_yandex_storage_bucket.go.orig
+++ yandex/resource_yandex_storage_bucket.go
@@ -1904,9 +1904,9 @@
 }
 
 // Returns true if the error matches all these conditions:
-//  * err is of type awserr.Error
-//  * Error.Code() matches code
-//  * Error.Message() contains message
+//   - err is of type awserr.Error
+//   - Error.Code() matches code
+//   - Error.Message() contains message
 func isAWSErr(err error, code string, message string) bool {
        if err, ok := err.(awserr.Error); ok {
                return err.Code() == code && strings.Contains(err.Message(), message)
yandex/resource_yandex_storage_bucket_test.go
diff yandex/resource_yandex_storage_bucket_test.go.orig yandex/resource_yandex_storage_bucket_test.go
--- yandex/resource_yandex_storage_bucket_test.go.orig
+++ yandex/resource_yandex_storage_bucket_test.go
@@ -1199,7 +1199,7 @@
        }
 }

@apilikov
Copy link
Contributor

apilikov commented Feb 1, 2023

I've run this locally with latest master and don't see any issues. Do you still experience the same problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants