mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-23 07:11:36 +01: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
|
||||
func (c *cfgStore) Read() (map[string]interface{}, error) {
|
||||
configEntries, error := dao.GetConfigEntries()
|
||||
if error != nil {
|
||||
return nil, error
|
||||
configEntries, err := dao.GetConfigEntries()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return WrapperConfig(configEntries)
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ func SaveConfigEntries(entries []models.ConfigEntry) error {
|
||||
tempEntry := models.ConfigEntry{}
|
||||
tempEntry.Key = entry.Key
|
||||
tempEntry.Value = entry.Value
|
||||
created, _, error := o.ReadOrCreate(&tempEntry, "k")
|
||||
if error != nil {
|
||||
return error
|
||||
created, _, err := o.ReadOrCreate(&tempEntry, "k")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !created {
|
||||
entry.ID = tempEntry.ID
|
||||
|
Loading…
Reference in New Issue
Block a user