mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-04 17:28:39 +01:00
Renamed error variable
This commit is contained in:
parent
42f3279aaf
commit
5fc3b3ff11
8 changed files with 8 additions and 8 deletions
|
|
@ -78,7 +78,7 @@ func (c browser) Directory(id string) (*DirectoryInfo, error) {
|
|||
dir = c.buildAlbumDir(al, tracks)
|
||||
default:
|
||||
beego.Debug("Id", id, "not found")
|
||||
return nil, DataNotFound
|
||||
return nil, ErrDataNotFound
|
||||
}
|
||||
|
||||
return dir, nil
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ type Child struct {
|
|||
}
|
||||
|
||||
var (
|
||||
DataNotFound = errors.New("Data Not Found")
|
||||
ErrDataNotFound = errors.New("Data Not Found")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func (c cover) Get(id string, size int, out io.Writer) error {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
return DataNotFound
|
||||
return ErrDataNotFound
|
||||
}
|
||||
|
||||
if size > 0 {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func TestCover(t *testing.T) {
|
|||
err := cover.Get("2", 0, out)
|
||||
|
||||
Convey("Then it should return DatNotFound error", func() {
|
||||
So(err, ShouldEqual, engine.DataNotFound)
|
||||
So(err, ShouldEqual, engine.ErrDataNotFound)
|
||||
})
|
||||
})
|
||||
Convey("When specifying a size", func() {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func (p playlists) Get(id string) (*PlaylistInfo, error) {
|
|||
}
|
||||
|
||||
if pl == nil {
|
||||
return nil, DataNotFound
|
||||
return nil, ErrDataNotFound
|
||||
}
|
||||
|
||||
pinfo := &PlaylistInfo{Id: pl.Id, Name: pl.Name}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue