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
+3 -2
View File
@@ -2,6 +2,7 @@ package internal
import (
"context"
"errors"
"fmt"
"io"
"strings"
@@ -47,7 +48,7 @@ func loadFileDescriptorsGRPCReflection(ctx context.Context, client *grpc.ClientC
go func() {
for {
in, err := reflectClient.Recv()
if err == io.EOF {
if errors.Is(err, io.EOF) {
// read done.
close(waitc)
return
@@ -172,7 +173,7 @@ func addMissingFileDescriptors(ctx context.Context, client *grpc.ClientConn, fdM
go func() {
for {
in, err := reflectClient.Recv()
if err == io.EOF {
if errors.Is(err, io.EOF) {
// read done.
close(waitc)
return