Skip to content

Fixed lint warning #46

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

Merged
merged 1 commit into from
Jun 8, 2021
Merged

Fixed lint warning #46

merged 1 commit into from
Jun 8, 2021

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jun 7, 2021

I did not test this PR, but it should write the DB without extra copying.

This solves the warning:

# arduino.cc/repository/internal/libraries/db
internal/libraries/db/db.go:237:34: call of json.MarshalIndent copies lock value: arduino.cc/repository/internal/libraries/db.DB contains sync.Mutex

@per1234
Copy link
Contributor

per1234 commented Jun 8, 2021

@cmaglie would you mind rebasing the PR so we can get the DB integration test on it? That test will do everything I would normally do manually for reviewing this change, and likely do a better job than I would.

@cmaglie
Copy link
Member Author

cmaglie commented Jun 8, 2021

there you go! :-)

@cmaglie cmaglie merged commit a86d4fb into main Jun 8, 2021
@cmaglie cmaglie deleted the fix_lint_warn branch June 8, 2021 15:52
@per1234 per1234 assigned per1234 and unassigned per1234 Nov 12, 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.

2 participants