go-snaps icon indicating copy to clipboard operation
go-snaps copied to clipboard

[Feature Request]: MatchProto

Open tagptroll1 opened this issue 3 months ago • 1 comments

🚀 Feature Proposal

A matching function for protobuf models. There are plenty of ways to format any proto structs to string, or pass the type to the function as an option

Motivation

Proto is a very common data transport form in go. Having the ease of matching proto structs / binaries directly would significantly increase test writing productivity

Example

msg := kafkaMock.Next()
MatchProto(msg.Value)
// Or typed
MatchProto[ProtoStruct](msg.Value)

tagptroll1 avatar Nov 24 '24 11:11 tagptroll1