Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: davidlion <[email protected]>
  • Loading branch information
davemarco and davidlion authored Aug 8, 2024
1 parent 6b823d5 commit c183b2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/out_clp_s3/internal/recovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ func readDirectory(dir string) (map[string]os.FileInfo, error) {
}
tagKey := strings.TrimSuffix(fileInfo.Name(), filepath.Ext(fileInfo.Name()))

if _, exists := files[tagKey]; !exists {
files[tagKey] = fileInfo
} else {
if _, exists := files[tagKey]; exists {
return nil, fmt.Errorf("error duplicate tag %s", tagKey)
}
files[tagKey] = fileInfo
}

return files, nil
Expand Down

0 comments on commit c183b2c

Please sign in to comment.