Skip to content
New issue

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

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

Already on GitHub? # to your account

refactor: use structural type for AnyResolver & Message #144

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion jsonpb/jsonpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type Marshaler struct {

// AnyResolver takes a type URL, present in an Any message, and resolves it into
// an instance of the associated message.
type AnyResolver interface {
type AnyResolver = interface {
Resolve(typeUrl string) (proto.Message, error)
}

Expand Down
2 changes: 1 addition & 1 deletion proto/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func (nf *nonFatal) Merge(err error) (ok bool) {
}

// Message is implemented by generated protocol buffer messages.
type Message interface {
type Message = interface {
Reset()
String() string
ProtoMessage()
Expand Down
Loading