refactor: remove directive errors comparison (#20344)

This commit is contained in:
Kien Trinh
2024-05-10 19:09:21 +00:00
committed by GitHub
parent 946c62410f
commit 0c91044220
13 changed files with 27 additions and 18 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package ormfield
import (
"errors"
"fmt"
"io"
"strings"
@@ -69,7 +70,7 @@ func (s NonTerminalStringCodec) Decode(r Reader) (protoreflect.Value, error) {
var bz []byte
for {
b, err := r.ReadByte()
if b == 0 || err == io.EOF {
if b == 0 || errors.Is(err, io.EOF) {
return protoreflect.ValueOfString(string(bz)), err
}
bz = append(bz, b)