Format the function receiver name

This commit is contained in:
pescox 2022-01-19 01:04:15 +00:00
parent 243b15d87e
commit ccbbb57a13

View File

@ -353,9 +353,9 @@ func (h *HTTPRuleRewriteDaoTmpl) CreateOrUpdateHTTPRuleRewriteInBatch(httpRuleRe
}
// ListByHTTPRuleID -
func (c *HTTPRuleRewriteDaoTmpl) ListByHTTPRuleID(httpRuleID string) ([]*model.HTTPRuleRewrite, error) {
func (h *HTTPRuleRewriteDaoTmpl) ListByHTTPRuleID(httpRuleID string) ([]*model.HTTPRuleRewrite, error) {
var rewrites []*model.HTTPRuleRewrite
if err := c.DB.Where("http_rule_id = ?", httpRuleID).Find(&rewrites).Error; err != nil {
if err := h.DB.Where("http_rule_id = ?", httpRuleID).Find(&rewrites).Error; err != nil {
if err == gorm.ErrRecordNotFound {
return rewrites, nil
}