Fix newly found linter issues (#3099)
Fixes the issues found in
9285342056 (step):5:22.
Only naked returns in longer functions.
This commit is contained in:
parent
ea6b368ad4
commit
d11da6ec7c
4 changed files with 10 additions and 9 deletions
|
|
@ -644,7 +644,7 @@ func (d *Database) CreateDevice(
|
|||
for i := 1; i <= 5; i++ {
|
||||
newDeviceID, returnErr = generateDeviceID()
|
||||
if returnErr != nil {
|
||||
return
|
||||
return nil, returnErr
|
||||
}
|
||||
|
||||
returnErr = d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
|
||||
|
|
@ -653,7 +653,7 @@ func (d *Database) CreateDevice(
|
|||
return err
|
||||
})
|
||||
if returnErr == nil {
|
||||
return
|
||||
return dev, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue