Skip to content

Commit

Permalink
Use http.NoBody to replace nil
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Nov 24, 2023
1 parent 4d92799 commit 33ea03a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func (c *client) GetAllPlacementRuleGroups(ctx context.Context) ([]*RuleGroup, e
var ruleGroups []*RuleGroup
err := c.requestWithRetry(ctx,
"GetAllPlacementRuleGroups", placementRuleGroups,
http.MethodGet, nil, &ruleGroups)
http.MethodGet, http.NoBody, &ruleGroups)
if err != nil {
return nil, err
}
Expand All @@ -484,7 +484,7 @@ func (c *client) GetPlacementRuleGroupByID(ctx context.Context, id string) (*Rul
var ruleGroup RuleGroup
err := c.requestWithRetry(ctx,
"GetPlacementRuleGroupByID", PlacementRuleGroupByID(id),
http.MethodGet, nil, &ruleGroup)
http.MethodGet, http.NoBody, &ruleGroup)
if err != nil {
return nil, err
}
Expand All @@ -506,7 +506,7 @@ func (c *client) SetPlacementRuleGroup(ctx context.Context, ruleGroup *RuleGroup
func (c *client) DeletePlacementRuleGroupByID(ctx context.Context, id string) error {
return c.requestWithRetry(ctx,
"DeletePlacementRuleGroupByID", PlacementRuleGroupByID(id),
http.MethodDelete, nil, nil)
http.MethodDelete, http.NoBody, nil)
}

// GetAllRegionLabelRules gets all region label rules.
Expand Down

0 comments on commit 33ea03a

Please sign in to comment.