Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq committed Oct 28, 2022
1 parent 1f0bb92 commit c3b4000
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/xlog/rotate/lumberjack_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,7 @@ func (l *Logger) millRunOnce() error {
// Only count the uncompressed log file or the
// compressed log file, not both.
fn := f.Name()
if strings.HasSuffix(fn, compressSuffix) {
fn = fn[:len(fn)-len(compressSuffix)]
}
fn = strings.TrimSuffix(fn, compressSuffix)s
preserved[fn] = true

if len(preserved) > l.MaxBackups {
Expand Down

0 comments on commit c3b4000

Please sign in to comment.