Omit reject.method=default

This commit is contained in:
世界 2025-02-20 18:06:02 +08:00
parent 918bef80d3
commit af813c0d1a
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -256,6 +256,14 @@ type _RejectActionOptions struct {
type RejectActionOptions _RejectActionOptions
func (r RejectActionOptions) MarshalJSON() ([]byte, error) {
switch r.Method {
case C.RuleActionRejectMethodDefault:
r.Method = ""
}
return json.Marshal((_RejectActionOptions)(r))
}
func (r *RejectActionOptions) UnmarshalJSON(bytes []byte) error {
err := json.Unmarshal(bytes, (*_RejectActionOptions)(r))
if err != nil {