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 vet #240

Merged
merged 1 commit into from
Aug 6, 2020
Merged

fix go vet #240

merged 1 commit into from
Aug 6, 2020

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Aug 6, 2020

$ go vet ./...
# github.com/tinkerbell/tink/db
db/workflow.go:206:36: call of append copies lock value: github.com/tinkerbell/tink/protos/workflow.WorkflowAction contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
db/workflow.go:679:12: call of fn copies lock value: github.com/tinkerbell/tink/protos/workflow.WorkflowActionStatus contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex
# github.com/tinkerbell/tink/grpc-server
grpc-server/workflow.go:244:52: func passes lock by value: github.com/tinkerbell/tink/protos/workflow.WorkflowActionStatus contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
@gianarb gianarb added the ready-to-merge Signal to Mergify to merge the PR. label Aug 6, 2020
Copy link
Contributor

@thebsdbox thebsdbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to pass by value will stop the locks being copied.

This should fix the vet issue.

/lgtm

Copy link
Contributor

@gauravgahlot gauravgahlot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self requested since @parauliya is not around today.

@gianarb gianarb removed the ready-to-merge Signal to Mergify to merge the PR. label Aug 6, 2020
@gianarb gianarb added the ready-to-merge Signal to Mergify to merge the PR. label Aug 6, 2020
@gauravgahlot gauravgahlot removed the request for review from parauliya August 6, 2020 12:11
@mergify mergify bot merged commit 898c352 into tinkerbell:master Aug 6, 2020
@mmlb mmlb removed the ready-to-merge Signal to Mergify to merge the PR. label Jan 25, 2021
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.

None yet

4 participants