mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-25 08:01:54 +08:00
Use golint to normalize the code (#1)
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ type Record struct {
|
||||
Path string `form:"path" json:"path"`
|
||||
record.BaseRecord
|
||||
RawRequest string `json:"raw_request" notice:"-"`
|
||||
Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"`
|
||||
Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"`
|
||||
}
|
||||
|
||||
func (Record) TableName() string {
|
||||
@@ -42,7 +42,7 @@ func NewRecord(rule *Rule, flag, method, url, ip, area, raw string) (r *Record,
|
||||
Rule: *rule,
|
||||
}
|
||||
err = database.DB.Create(r).Error
|
||||
return
|
||||
return r, err
|
||||
}
|
||||
|
||||
func ListRecords(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user