diff --git a/src/encoding/json/fold.go b/src/encoding/json/fold.go index ab249b2bbed..0f9b09d712d 100644 --- a/src/encoding/json/fold.go +++ b/src/encoding/json/fold.go @@ -97,10 +97,7 @@ func equalFoldRight(s, t []byte) bool { t = t[size:] } - if len(t) > 0 { - return false - } - return true + return len(t) == 0 } // asciiEqualFold is a specialization of bytes.EqualFold for use when