Skip to content

Commit

Permalink
two small changes from upgrading proto import
Browse files Browse the repository at this point in the history
  • Loading branch information
lologarithm committed Sep 29, 2023
1 parent 4e6431d commit abcf342
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/wowsimcli/cmd/decode_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ func decodeLink(link string) error {
return fmt.Errorf("cannot unmarshal raw proto: %w", err)
}

fmt.Println(protojson.Format(goproto.MessageV2(settings)))
fmt.Println(protojson.Format(goproto.Message(settings)))
return nil
}
10 changes: 9 additions & 1 deletion sim/core/bulksim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ func TestBulkSim(t *testing.T) {

want := &proto.BulkSimResult{}
if diff := cmp.Diff(want, got, cmp.Comparer(func(a, b *proto.BulkSimResult) bool {
return goproto.MarshalTextString(a) == goproto.MarshalTextString(b)
am, err := goproto.Marshal(a)
if err != nil {
return false
}
bm, err := goproto.Marshal(b)
if err != nil {
return false
}
return string(am) == string(bm)
})); diff != "" {
t.Fatalf("BulkSim() returned diff (-want +got):\n%s", diff)
}
Expand Down

0 comments on commit abcf342

Please sign in to comment.