Commit 8655171
fix(loki.source.file): Close file if we cannot find encoding (#5528)
### Pull Request Details
Noticed that we do not close file if we cannot get encoding. Review all
other paths and we close file properly.
I really wish go had something like [errdefer like zig
does](https://ziglang.org/documentation/master/#errdefer).
### Issue(s) fixed by this Pull Request
<!--
Uncomment the following line and fill in an issue number if you want a
GitHub
issue to be closed automatically when this PR gets merged.
-->
<!-- Fixes #issue_id -->
### Notes to the Reviewer
<!-- Add any relevant notes for the reviewers and testers of this PR.
-->
### PR Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to
[x]. -->
- [ ] Documentation added
- [ ] Tests updated
- [ ] Config converters updated
(cherry picked from commit 56bcb26)1 parent 2f43c91 commit 8655171
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments