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

encoding: fix typo #6966

Merged
merged 1 commit into from Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion encoding/proto/proto.go
Expand Up @@ -50,7 +50,7 @@
func (codec) Unmarshal(data []byte, v any) error {
vv := messageV2Of(v)
if vv == nil {
return fmt.Errorf("failed to marshal, message is %T, want proto.Message", v)
return fmt.Errorf("failed to unmarshal, message is %T, want proto.Message", v)
}

return proto.Unmarshal(data, vv)
Expand All @@ -60,11 +60,11 @@
switch v := v.(type) {
case protoadapt.MessageV1:
return protoadapt.MessageV2Of(v)
case protoadapt.MessageV2:
return v

Check warning on line 64 in encoding/proto/proto.go

View check run for this annotation

Codecov / codecov/patch

encoding/proto/proto.go#L63-L64

Added lines #L63 - L64 were not covered by tests
}

return nil

Check warning on line 67 in encoding/proto/proto.go

View check run for this annotation

Codecov / codecov/patch

encoding/proto/proto.go#L67

Added line #L67 was not covered by tests
}

func (codec) Name() string {
Expand Down