var name should not be error (#5332)

Rename the variable names from "error" to "err"
This commit is contained in:
silenceshell 2018-07-24 11:33:21 +08:00 committed by Daniel Jiang
parent e9d5913d63
commit 7745b79b2e
2 changed files with 6 additions and 6 deletions

View File

@ -74,9 +74,9 @@ func NewCfgStore() (store.Driver, error) {
// Read configuration from database // Read configuration from database
func (c *cfgStore) Read() (map[string]interface{}, error) { func (c *cfgStore) Read() (map[string]interface{}, error) {
configEntries, error := dao.GetConfigEntries() configEntries, err := dao.GetConfigEntries()
if error != nil { if err != nil {
return nil, error return nil, err
} }
return WrapperConfig(configEntries) return WrapperConfig(configEntries)
} }

View File

@ -54,9 +54,9 @@ func SaveConfigEntries(entries []models.ConfigEntry) error {
tempEntry := models.ConfigEntry{} tempEntry := models.ConfigEntry{}
tempEntry.Key = entry.Key tempEntry.Key = entry.Key
tempEntry.Value = entry.Value tempEntry.Value = entry.Value
created, _, error := o.ReadOrCreate(&tempEntry, "k") created, _, err := o.ReadOrCreate(&tempEntry, "k")
if error != nil { if err != nil {
return error return err
} }
if !created { if !created {
entry.ID = tempEntry.ID entry.ID = tempEntry.ID