Skip to content

Commit

Permalink
Call MarshalJSON explictly to be on the safe side
Browse files Browse the repository at this point in the history
Since the method won't be called implicitly unless I make the filter
into a pointer. This ensures we'll always call our override.
  • Loading branch information
okokes-akamai committed Feb 23, 2023
1 parent 98e9d8e commit 59ac07a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud/linode/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@ func (l *loadbalancers) getNodeBalancerByHostname(ctx context.Context, service *
}

func (l *loadbalancers) getNodeBalancerByIPv4(ctx context.Context, service *v1.Service, ipv4 string) (*linodego.NodeBalancer, error) {
f := linodego.Filter{}
f := &linodego.Filter{}
f.AddField(linodego.Eq, "ipv4", ipv4)
filter, err := json.Marshal(f)
filter, err := f.MarshalJSON()
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 59ac07a

Please sign in to comment.