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

go vet: loop variable command captured by func literal #63

Closed
sd1li opened this issue Dec 13, 2023 · 1 comment
Closed

go vet: loop variable command captured by func literal #63

sd1li opened this issue Dec 13, 2023 · 1 comment

Comments

@sd1li
Copy link
Contributor

sd1li commented Dec 13, 2023

Full error: ./main.go:103:11: loop variable command captured by func literal

It means that if new commands are added in the future, the go routines will all run the same (likely the last) command in the slice and crash.

sd1li added a commit to sd1li/ScratchDB that referenced this issue Dec 13, 2023
@sd1li
Copy link
Contributor Author

sd1li commented Dec 13, 2023

It might also help to set up Github actions for go test/vet and maybe even golangci-lint (but that might be annoying at this stage)

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

No branches or pull requests

1 participant