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

use defer to clean up mutex lock in loki/source/file/tailer.go #3006

Closed
wants to merge 1 commit into from

Conversation

edv1n
Copy link
Contributor

@edv1n edv1n commented Mar 14, 2025

PR Description

A small refactor of a previous PR to follow Uber Go Style Guide by using defer to clean up mutex.

This enhance readability and prevent forget to unlock the mutex in the future.

Which issue(s) this PR fixes

N/A

Notes to the Reviewer

N/A

PR Checklist

N/A

@edv1n edv1n requested a review from a team as a code owner March 14, 2025 22:37
@edv1n
Copy link
Contributor Author

edv1n commented Mar 14, 2025

I am sorry, my bad. I thought I ran the test against my changes locally. Closing this PR as it doesn't work.

@edv1n edv1n closed this Mar 14, 2025
@dehaansa
Copy link
Contributor

Appreciate the desire to improve Alloy! I wanted this to work, too, golang really could use a nicer feature for scoping mutexes.

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