mirror of
https://github.com/goharbor/harbor
synced 2025-04-07 21:30:15 +00:00
var name should not be error (#5332)
Rename the variable names from "error" to "err"
This commit is contained in:
parent
e9d5913d63
commit
7745b79b2e
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user