♻️ Simplify logic

This commit is contained in:
Liang Ding 2019-08-09 23:48:38 +08:00
parent 0c44174564
commit 008c258471
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -79,10 +79,9 @@ func ReadWhile(source []byte, index [2]int, pred func(byte) bool) (int, bool) {
// IsBlank returns true if the given string is all space characters.
func IsBlank(bs []byte) bool {
for _, b := range bs {
if IsSpace(b) {
continue
if !IsSpace(b) {
return false
}
return false
}
return true
}