Skip to content

Commit

Permalink
fix: remove pointer receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellysonrp committed Sep 27, 2022
1 parent c8b1dd8 commit 90f2a39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gen/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ import (

messageTemplate = template.Must(template.New("message").Parse(`
// MarshalJSON implements json.Marshaler
func (msg *{{.GoIdent.GoName}}) MarshalJSON() ([]byte,error) {
func (msg {{.GoIdent.GoName}}) MarshalJSON() ([]byte,error) {
return protojson.MarshalOptions {
UseEnumNumbers: {{.EnumsAsInts}},
EmitUnpopulated: {{.EmitDefaults}},
UseProtoNames: {{.OrigName}},
}.Marshal(msg)
}.Marshal(&msg)
}
// UnmarshalJSON implements json.Unmarshaler
Expand Down

0 comments on commit 90f2a39

Please sign in to comment.