mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-22 06:40:43 +08:00
Use golint to normalize the code (#1)
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
package dns
|
||||
|
||||
type Config struct {
|
||||
Enable bool
|
||||
Enable bool
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ func newRecord(rule *Rule, flag, domain, remoteIp, ipArea string) (r *Record, er
|
||||
Rule: *rule,
|
||||
}
|
||||
err = database.DB.Create(r).Error
|
||||
return
|
||||
return r, err
|
||||
}
|
||||
|
||||
func List(c *gin.Context) {
|
||||
|
||||
+2
-3
@@ -59,7 +59,7 @@ func (r *Rule) CreateOrUpdate() (err error) {
|
||||
return
|
||||
}
|
||||
err = GetServer().updateRules()
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete the dns rule in database and ruleSet
|
||||
@@ -70,7 +70,7 @@ func (r *Rule) Delete() (err error) {
|
||||
return
|
||||
}
|
||||
err = GetServer().updateRules()
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
// List all dns rules those satisfy the filter
|
||||
@@ -194,5 +194,4 @@ func DeleteRules(c *gin.Context) {
|
||||
"error": nil,
|
||||
"data": nil,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user