Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade min go 1.22 with tools #163

Merged
merged 3 commits into from
Mar 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove uint casting
Signed-off-by: Edward McFarlane <emcfarlane@buf.build>
emcfarlane committed Mar 14, 2025
commit 830cee851ddc8becca5c7cf1bac65ed107c802e5
6 changes: 2 additions & 4 deletions protocol_grpc.go
Original file line number Diff line number Diff line change
@@ -513,18 +513,16 @@ func grpcExtractErrorFromTrailer(trailers http.Header) *connect.Error {
return nil
}

code64, err := strconv.ParseUint(codeHeader, 10 /* base */, 32 /* bitsize */)
code, err := strconv.ParseUint(codeHeader, 10 /* base */, 32 /* bitsize */)
if err != nil {
return connect.NewError(
connect.CodeInternal,
protocolError("invalid error code %q: %w", codeHeader, err),
)
}
if code64 == 0 {
if code == 0 {
return nil
}
code := uint32(code64)

if len(grpcDetails) == 0 {
message, err := grpcPercentDecode(grpcMsg)
if err != nil {