Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/archive: DetectCompression(): use bytes.HasPrefix()
The existing code was the exact equivalent of bytes.HasPrefix(); // HasPrefix tests whether the byte slice s begins with prefix. func HasPrefix(s, prefix []byte) bool { return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) } Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information