Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit d28fbb8

Browse files
authored
Merge pull request #2209 from thedadams/generic-map-marshal-pointer
Make the MarshalJSON method on GenericMap a pointer receiver
2 parents 7a139ed + 1824320 commit d28fbb8

File tree

1 file changed

+1
-1
lines changed
  • pkg/apis/internal.acorn.io/v1

1 file changed

+1
-1
lines changed

pkg/apis/internal.acorn.io/v1/map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (g *GenericMap) Merge(from *GenericMap) *GenericMap {
7878
}
7979

8080
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
81-
func (g GenericMap) MarshalJSON() ([]byte, error) {
81+
func (g *GenericMap) MarshalJSON() ([]byte, error) {
8282
return json.Marshal(g.GetData())
8383
}
8484

0 commit comments

Comments
 (0)