mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Add some more corner tests for ReaderContains
This commit is contained in:
@@ -115,7 +115,7 @@ func BytesToReader(in []byte) io.Reader {
|
||||
// ReaderContains reports whether subslice is within r.
|
||||
func ReaderContains(r io.Reader, subslice []byte) bool {
|
||||
|
||||
if len(subslice) == 0 {
|
||||
if r == nil || len(subslice) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user