go fmt
This commit is contained in:
+3
-3
@@ -1,12 +1,12 @@
|
||||
package tests
|
||||
|
||||
import (
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/deluan/gosonic/api/responses"
|
||||
"bytes"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func ShouldMatchXML(actual interface{}, expected ...interface{}) string {
|
||||
@@ -48,4 +48,4 @@ func UnindentJSON(j []byte) string {
|
||||
json.Unmarshal(j, &m)
|
||||
s, _ := json.Marshal(m)
|
||||
return string(s)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ package mocks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/deluan/gosonic/domain"
|
||||
"errors"
|
||||
)
|
||||
|
||||
func CreateMockAlbumRepo() *MockAlbum {
|
||||
@@ -37,7 +37,7 @@ func (m *MockAlbum) Exists(id string) (bool, error) {
|
||||
if m.err {
|
||||
return false, errors.New("Error!")
|
||||
}
|
||||
_, found := m.data[id];
|
||||
_, found := m.data[id]
|
||||
return found, nil
|
||||
}
|
||||
|
||||
@@ -62,4 +62,4 @@ func (m *MockAlbum) FindByArtist(artistId string) ([]domain.Album, error) {
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ package mocks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/deluan/gosonic/domain"
|
||||
"errors"
|
||||
)
|
||||
|
||||
func CreateMockArtistRepo() *MockArtist {
|
||||
@@ -37,7 +37,7 @@ func (m *MockArtist) Exists(id string) (bool, error) {
|
||||
if m.err {
|
||||
return false, errors.New("Error!")
|
||||
}
|
||||
_, found := m.data[id];
|
||||
_, found := m.data[id]
|
||||
return found, nil
|
||||
}
|
||||
|
||||
@@ -46,4 +46,4 @@ func (m *MockArtist) Get(id string) (*domain.Artist, error) {
|
||||
return nil, errors.New("Error!")
|
||||
}
|
||||
return m.data[id], nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ package mocks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/deluan/gosonic/domain"
|
||||
"errors"
|
||||
)
|
||||
|
||||
func CreateMockMediaFileRepo() *MockMediaFile {
|
||||
@@ -37,7 +37,7 @@ func (m *MockMediaFile) Exists(id string) (bool, error) {
|
||||
if m.err {
|
||||
return false, errors.New("Error!")
|
||||
}
|
||||
_, found := m.data[id];
|
||||
_, found := m.data[id]
|
||||
return found, nil
|
||||
}
|
||||
|
||||
@@ -62,4 +62,4 @@ func (m *MockMediaFile) FindByAlbum(artistId string) ([]domain.MediaFile, error)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user