diff --git a/configuration/tcp_request_rule.go b/configuration/tcp_request_rule.go index 183fdb5e..ce326b09 100644 --- a/configuration/tcp_request_rule.go +++ b/configuration/tcp_request_rule.go @@ -362,7 +362,7 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro rule.Cond = a.Cond rule.CondTest = a.CondTest default: - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", a)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", a)) } return rule, nil @@ -545,7 +545,7 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro rule.Cond = a.Cond rule.CondTest = a.CondTest default: - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", a)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", a)) } case *tcp_types.Session: rule = &models.TCPRequestRule{ @@ -631,10 +631,10 @@ func ParseTCPRequestRule(f types.TCPType) (rule *models.TCPRequestRule, err erro rule.Cond = a.Cond rule.CondTest = a.CondTest default: - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", a)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", a)) } default: - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", v)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", v)) } return rule, nil } @@ -851,7 +851,7 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e }, }, nil } - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", f.Action)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", f.Action)) case models.TCPRequestRuleTypeContent: switch f.Action { case models.TCPRequestRuleActionAccept: @@ -1145,7 +1145,7 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e }, }, nil } - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", f.Action)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", f.Action)) case models.TCPRequestRuleTypeSession: switch f.Action { case models.TCPRequestRuleActionAccept: @@ -1311,14 +1311,14 @@ func SerializeTCPRequestRule(f models.TCPRequestRule) (rule types.TCPType, err e }, }, nil } - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", f.Action)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", f.Action)) case models.TCPRequestRuleTypeInspectDashDelay: if f.Timeout == nil { - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", f.Type)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", f.Type)) } return &tcp_types.InspectDelay{ Timeout: strconv.FormatInt(*f.Timeout, 10), }, nil } - return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%T' in tcp_request_rule", f.Type)) + return nil, NewConfError(ErrValidationError, fmt.Sprintf("unsupported action '%s' in tcp_request_rule", f.Type)) }