Use fmt.Errorf, error strings should start lowercase

This commit is contained in:
Philipp Wolfer 2023-12-05 08:17:46 +01:00
parent a9e07915ce
commit 28ed1183e4
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
4 changed files with 10 additions and 15 deletions

View file

@ -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)