mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Use fmt.Errorf, error strings should start lowercase
This commit is contained in:
parent
a9e07915ce
commit
28ed1183e4
4 changed files with 10 additions and 15 deletions
|
@ -16,7 +16,6 @@ Scotty. If not, see <https://www.gnu.org/licenses/>.
|
|||
package lastfm
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"sort"
|
||||
|
@ -223,8 +222,8 @@ func (b *LastfmApiBackend) ImportListens(export models.ListensResult, importResu
|
|||
importResult.ImportErrors = append(importResult.ImportErrors, ignoreMsg)
|
||||
}
|
||||
}
|
||||
errMsg := fmt.Sprintf("Last.fm import ignored %v scrobbles", count-accepted)
|
||||
return importResult, errors.New(errMsg)
|
||||
err := fmt.Errorf("last.fm import ignored %v scrobbles", count-accepted)
|
||||
return importResult, err
|
||||
}
|
||||
|
||||
importResult.UpdateTimestamp(listens[count-1].ListenedAt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue