Skip to content

Commit

Permalink
omitempty for rules weight
Browse files Browse the repository at this point in the history
  • Loading branch information
freenoth committed Mar 21, 2023
1 parent b63f8de commit 503ee70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CreateRequest struct {
Rule string `json:"rule,omitempty"`
RuleType int `json:"ruleType"`
OriginGroup *int `json:"originGroup"`
Weight int `json:"weight"`
Weight int `json:"weight,omitempty"`
OverrideOriginProtocol *string `json:"overrideOriginProtocol"`
Options *gcore.Options `json:"options,omitempty"`
}
Expand All @@ -27,7 +27,7 @@ type UpdateRequest struct {
Name string `json:"name,omitempty"`
Rule string `json:"rule,omitempty"`
RuleType int `json:"ruleType"`
Weight int `json:"weight"`
Weight int `json:"weight,omitempty"`
OriginGroup *int `json:"originGroup"`
OverrideOriginProtocol *string `json:"overrideOriginProtocol"`
Options *gcore.Options `json:"options,omitempty"`
Expand Down

0 comments on commit 503ee70

Please sign in to comment.