Skip to content

Commit

Permalink
PMM-13054 code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Jun 20, 2024
1 parent 4686351 commit 00511ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions managed/services/supervisord/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func readLog(name string, maxLines int) ([]byte, time.Time, error) {
if err != nil {
return nil, m, errors.WithStack(err)
}
defer f.Close() //nolint:gosec,errcheck,nolintlint
defer f.Close() //nolint:errcheck

fi, err := f.Stat()
if err != nil {
Expand Down Expand Up @@ -316,7 +316,7 @@ func readLog(name string, maxLines int) ([]byte, time.Time, error) {
}
}

res := []byte{}
res := make([]byte, 0, maxLines)
r.Do(func(v interface{}) {
if v != nil {
res = append(res, v.([]byte)...) //nolint:forcetypeassert
Expand Down

0 comments on commit 00511ec

Please sign in to comment.