Skip to content

Commit

Permalink
fix: S1004: should use bytes.Equal(binaryCDT, buf) instead
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Oct 23, 2024
1 parent 539a92f commit 38d9801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger/log_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func checkOrCreateCacheDirTag(dir string) (e error) {
if e == nil {
var buf = make([]byte, len(cacheDirTagPrefix))
_, e = io.ReadFull(f, buf)
if e == nil && bytes.Compare(binaryCDT, buf) == 0 {
if e == nil && bytes.Equal(binaryCDT, buf) {
fileOk = true
}
e = f.Close()
Expand Down

0 comments on commit 38d9801

Please sign in to comment.