Skip to content

Commit

Permalink
chore: cleanup useless io util code (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
adohe committed Dec 21, 2023
1 parent de583e7 commit e5d5f06
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 110 deletions.
20 changes: 0 additions & 20 deletions pkg/util/io/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,3 @@ func RenamePath(oldPath, newPath string) error {

return nil
}

// IsBinary returns true if a zero byte occurs within the first
// 8000 bytes (or the entire length if shorter). This is the
// same approach that git uses to determine if a file is binary.
func IsBinary(bytes []byte) bool {
const firstFewBytes = 8000

length := len(bytes)
if firstFewBytes < length {
length = firstFewBytes
}

for i := 0; i < length; i++ {
if bytes[i] == 0 {
return true
}
}

return false
}
36 changes: 0 additions & 36 deletions pkg/util/io/io.go

This file was deleted.

54 changes: 0 additions & 54 deletions pkg/util/io/io_test.go

This file was deleted.

0 comments on commit e5d5f06

Please sign in to comment.