@@ -347,7 +347,7 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro
347347 rule .Cond = a .Cond
348348 rule .CondTest = a .CondTest
349349 default :
350- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , a ))
350+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , a ))
351351 }
352352
353353 return rule , nil
@@ -522,7 +522,7 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro
522522 rule .Cond = a .Cond
523523 rule .CondTest = a .CondTest
524524 default :
525- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , a ))
525+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , a ))
526526 }
527527 case * tcp_types.Session :
528528 rule = & models.TCPRequestRule {
@@ -594,10 +594,10 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro
594594 rule .Cond = a .Cond
595595 rule .CondTest = a .CondTest
596596 default :
597- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , a ))
597+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , a ))
598598 }
599599 default :
600- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , v ))
600+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , v ))
601601 }
602602 return rule , nil
603603}
@@ -802,7 +802,7 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e
802802 },
803803 }, nil
804804 }
805- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , f .Action ))
805+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , f .Action ))
806806 case models .TCPRequestRuleTypeContent :
807807 switch f .Action {
808808 case models .TCPRequestRuleActionAccept :
@@ -1084,7 +1084,7 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e
10841084 },
10851085 }, nil
10861086 }
1087- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , f .Action ))
1087+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , f .Action ))
10881088 case models .TCPRequestRuleTypeSession :
10891089 switch f .Action {
10901090 case models .TCPRequestRuleActionAccept :
@@ -1229,14 +1229,14 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e
12291229 },
12301230 }, nil
12311231 }
1232- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , f .Action ))
1232+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , f .Action ))
12331233 case models .TCPRequestRuleTypeInspectDashDelay :
12341234 if f .Timeout == nil {
1235- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , f .Type ))
1235+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , f .Type ))
12361236 }
12371237 return & tcp_types.InspectDelay {
12381238 Timeout : strconv .FormatInt (* f .Timeout , 10 ),
12391239 }, nil
12401240 }
1241- return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%T ' in tcp_request_rule" , f .Type ))
1241+ return nil , NewConfError (ErrValidationError , fmt .Sprintf ("unsupported action '%s ' in tcp_request_rule" , f .Type ))
12421242}
0 commit comments