This commit is contained in:
Deluan
2016-03-02 13:18:39 -05:00
parent 9d41f5a39f
commit 4843ccb46c
42 changed files with 150 additions and 160 deletions
+1 -1
View File
@@ -3,9 +3,9 @@ package api_test
import ( import (
"fmt" "fmt"
"github.com/astaxie/beego" "github.com/astaxie/beego"
_ "github.com/deluan/gosonic/conf"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
_ "github.com/deluan/gosonic/conf"
"strings" "strings"
) )
+10 -7
View File
@@ -1,10 +1,10 @@
package api package api
import ( import (
"encoding/xml"
"fmt"
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"fmt"
"encoding/xml"
) )
type BaseAPIController struct{ beego.Controller } type BaseAPIController struct{ beego.Controller }
@@ -16,7 +16,7 @@ func (c *BaseAPIController) NewEmpty() responses.Subsonic {
func (c *BaseAPIController) SendError(errorCode int, message ...interface{}) { func (c *BaseAPIController) SendError(errorCode int, message ...interface{}) {
response := responses.Subsonic{Version: beego.AppConfig.String("apiVersion"), Status: "fail"} response := responses.Subsonic{Version: beego.AppConfig.String("apiVersion"), Status: "fail"}
var msg string var msg string
if (len(message) == 0) { if len(message) == 0 {
msg = responses.ErrorMsg(errorCode) msg = responses.ErrorMsg(errorCode)
} else { } else {
msg = fmt.Sprintf(message[0].(string), message[1:len(message)]...) msg = fmt.Sprintf(message[0].(string), message[1:len(message)]...)
@@ -24,13 +24,15 @@ func (c *BaseAPIController) SendError(errorCode int, message ...interface{}) {
response.Error = &responses.Error{Code: errorCode, Message: msg} response.Error = &responses.Error{Code: errorCode, Message: msg}
xmlBody, _ := xml.Marshal(&response) xmlBody, _ := xml.Marshal(&response)
c.CustomAbort(200, xml.Header + string(xmlBody)) c.CustomAbort(200, xml.Header+string(xmlBody))
} }
func (c *BaseAPIController) prepResponse(response responses.Subsonic) interface{} { func (c *BaseAPIController) prepResponse(response responses.Subsonic) interface{} {
f := c.GetString("f") f := c.GetString("f")
if f == "json" { if f == "json" {
type jsonWrapper struct{ Subsonic responses.Subsonic `json:"subsonic-response"` } type jsonWrapper struct {
Subsonic responses.Subsonic `json:"subsonic-response"`
}
return jsonWrapper{Subsonic: response} return jsonWrapper{Subsonic: response}
} }
return response return response
@@ -39,7 +41,9 @@ func (c *BaseAPIController) prepResponse(response responses.Subsonic) interface{
func (c *BaseAPIController) SendResponse(response responses.Subsonic) { func (c *BaseAPIController) SendResponse(response responses.Subsonic) {
f := c.GetString("f") f := c.GetString("f")
if f == "json" { if f == "json" {
type jsonWrapper struct{ Subsonic responses.Subsonic `json:"subsonic-response"` } type jsonWrapper struct {
Subsonic responses.Subsonic `json:"subsonic-response"`
}
w := &jsonWrapper{Subsonic: response} w := &jsonWrapper{Subsonic: response}
c.Data["json"] = &w c.Data["json"] = &w
c.ServeJSON() c.ServeJSON()
@@ -48,4 +52,3 @@ func (c *BaseAPIController) SendResponse(response responses.Subsonic) {
c.ServeXML() c.ServeXML()
} }
} }
+4 -4
View File
@@ -2,12 +2,12 @@ package api
import ( import (
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/deluan/gosonic/utils"
"github.com/karlkfi/inject"
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/consts" "github.com/deluan/gosonic/consts"
"strconv"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/utils"
"github.com/karlkfi/inject"
"strconv"
) )
type GetIndexesController struct { type GetIndexesController struct {
@@ -42,7 +42,7 @@ func (c *GetIndexesController) Get() {
i, _ := strconv.Atoi(ifModifiedSince) i, _ := strconv.Atoi(ifModifiedSince)
l, _ := strconv.Atoi(res.LastModified) l, _ := strconv.Atoi(res.LastModified)
if (l > i) { if l > i {
indexes, err := c.repo.GetAll() indexes, err := c.repo.GetAll()
if err != nil { if err != nil {
beego.Error("Error retrieving Indexes:", err) beego.Error("Error retrieving Indexes:", err)
+4 -4
View File
@@ -3,14 +3,14 @@ package api_test
import ( import (
"testing" "testing"
"github.com/deluan/gosonic/utils"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/tests"
"encoding/xml" "encoding/xml"
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/consts" "github.com/deluan/gosonic/consts"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/utils"
. "github.com/smartystreets/goconvey/convey"
) )
const ( const (
+1 -1
View File
@@ -2,9 +2,9 @@ package api_test
import ( import (
"encoding/xml" "encoding/xml"
"github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"testing" "testing"
"github.com/deluan/gosonic/tests"
) )
func TestGetLicense(t *testing.T) { func TestGetLicense(t *testing.T) {
+1 -1
View File
@@ -3,8 +3,8 @@ package api
import ( import (
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"github.com/karlkfi/inject"
"github.com/deluan/gosonic/utils" "github.com/deluan/gosonic/utils"
"github.com/karlkfi/inject"
) )
type GetMusicFoldersController struct { type GetMusicFoldersController struct {
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"testing" "testing"
"encoding/xml" "encoding/xml"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/tests" "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
) )
func TestGetMusicFolders(t *testing.T) { func TestGetMusicFolders(t *testing.T) {
+1 -1
View File
@@ -3,9 +3,9 @@ package api_test
import ( import (
"encoding/xml" "encoding/xml"
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"testing" "testing"
"github.com/deluan/gosonic/tests"
) )
func TestPing(t *testing.T) { func TestPing(t *testing.T) {
+1 -2
View File
@@ -19,7 +19,7 @@ type Error struct {
} }
type License struct { type License struct {
XMLName xml.Name `xml:"license" json:"-" json:"-"` XMLName xml.Name `xml:"license" json:"-"`
Valid bool `xml:"valid,attr" json:"valid"` Valid bool `xml:"valid,attr" json:"valid"`
} }
@@ -52,4 +52,3 @@ type Indexes struct {
LastModified string `xml:"lastModified,attr" json:"lastModified"` LastModified string `xml:"lastModified,attr" json:"lastModified"`
IgnoredArticles string `xml:"ignoredArticles,attr" json:"ignoredArticles"` IgnoredArticles string `xml:"ignoredArticles,attr" json:"ignoredArticles"`
} }
+1 -1
View File
@@ -3,9 +3,9 @@ package api_test
import ( import (
"encoding/xml" "encoding/xml"
"github.com/deluan/gosonic/api/responses" "github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"testing" "testing"
"github.com/deluan/gosonic/tests"
) )
func TestCheckParams(t *testing.T) { func TestCheckParams(t *testing.T) {
+3 -3
View File
@@ -1,12 +1,12 @@
package conf package conf
import ( import (
"github.com/deluan/gosonic/utils"
"github.com/deluan/gosonic/persistence"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/persistence"
"github.com/deluan/gosonic/utils"
) )
func init () { func init() {
utils.DefineSingleton(new(domain.ArtistIndexRepository), persistence.NewArtistIndexRepository) utils.DefineSingleton(new(domain.ArtistIndexRepository), persistence.NewArtistIndexRepository)
utils.DefineSingleton(new(domain.PropertyRepository), persistence.NewPropertyRepository) utils.DefineSingleton(new(domain.PropertyRepository), persistence.NewPropertyRepository)
utils.DefineSingleton(new(domain.MediaFolderRepository), persistence.NewMediaFolderRepository) utils.DefineSingleton(new(domain.MediaFolderRepository), persistence.NewMediaFolderRepository)
+4 -4
View File
@@ -1,14 +1,14 @@
package controllers_test package controllers_test
import ( import (
"fmt"
"github.com/astaxie/beego"
_ "github.com/deluan/gosonic/conf"
"github.com/deluan/gosonic/tests" "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"testing"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"github.com/astaxie/beego" "testing"
"fmt"
_ "github.com/deluan/gosonic/conf"
) )
func TestErrorHandler(t *testing.T) { func TestErrorHandler(t *testing.T) {
-2
View File
@@ -11,5 +11,3 @@ func (c *SyncController) Get() {
scanner.StartImport() scanner.StartImport()
c.Ctx.WriteString("Import started. Check logs") c.Ctx.WriteString("Import started. Check logs")
} }
-1
View File
@@ -11,4 +11,3 @@ type ArtistRepository interface {
Get(id string) (*Artist, error) Get(id string) (*Artist, error)
GetByName(name string) (*Artist, error) GetByName(name string) (*Artist, error)
} }
-2
View File
@@ -3,6 +3,4 @@ package domain
type BaseRepository interface { type BaseRepository interface {
NewId(fields ...string) string NewId(fields ...string) string
CountAll() (int, error) CountAll() (int, error)
} }
-1
View File
@@ -10,7 +10,6 @@ type ArtistIndex struct {
Artists []ArtistInfo Artists []ArtistInfo
} }
type ArtistIndexRepository interface { type ArtistIndexRepository interface {
BaseRepository BaseRepository
Put(m *ArtistIndex) error Put(m *ArtistIndex) error
-1
View File
@@ -9,4 +9,3 @@ type MediaFolder struct {
type MediaFolderRepository interface { type MediaFolderRepository interface {
GetAll() ([]MediaFolder, error) GetAll() ([]MediaFolder, error)
} }
-1
View File
@@ -10,4 +10,3 @@ type PropertyRepository interface {
Get(id string) (string, error) Get(id string) (string, error)
DefaultGet(id string, defaultValue string) (string, error) DefaultGet(id string, defaultValue string) (string, error)
} }
+1 -1
View File
@@ -1,8 +1,8 @@
package main package main
import ( import (
_ "github.com/deluan/gosonic/conf"
"github.com/astaxie/beego" "github.com/astaxie/beego"
_ "github.com/deluan/gosonic/conf"
) )
func main() { func main() {
-1
View File
@@ -31,4 +31,3 @@ func (r *artistRepository) GetByName(name string) (*domain.Artist, error) {
id := r.NewId(name) id := r.NewId(name)
return r.Get(id) return r.Get(id)
} }
+7 -7
View File
@@ -1,12 +1,12 @@
package persistence package persistence
import ( import (
"fmt"
"crypto/md5" "crypto/md5"
"strings"
"github.com/deluan/gosonic/utils"
"encoding/json" "encoding/json"
"fmt"
"github.com/deluan/gosonic/utils"
"reflect" "reflect"
"strings"
) )
type baseRepository struct { type baseRepository struct {
@@ -90,7 +90,7 @@ func (r *baseRepository) getFieldKeys(id string) [][]byte {
return fieldKeys return fieldKeys
} }
func (r*baseRepository) newInstance() interface{} { func (r *baseRepository) newInstance() interface{} {
return reflect.New(r.entityType).Interface() return reflect.New(r.entityType).Interface()
} }
@@ -123,7 +123,7 @@ func (r *baseRepository) toEntity(response [][]byte, entity interface{}) error {
// TODO Optimize it! Probably very slow (and confusing!) // TODO Optimize it! Probably very slow (and confusing!)
func (r *baseRepository) loadAll(entities interface{}, sortBy string) error { func (r *baseRepository) loadAll(entities interface{}, sortBy string) error {
total, err := r.CountAll() total, err := r.CountAll()
if (err != nil) { if err != nil {
return err return err
} }
@@ -134,7 +134,7 @@ func (r *baseRepository) loadAll(entities interface{}, sortBy string) error {
} }
setName := r.table + "s:all" setName := r.table + "s:all"
response, err := db().XSSort([]byte(setName), 0, 0, true, false, sortKey, r.getFieldKeys("*")) response, err := db().XSSort([]byte(setName), 0, 0, true, false, sortKey, r.getFieldKeys("*"))
if (err != nil) { if err != nil {
return err return err
} }
numFields := len(r.fieldNames) numFields := len(r.fieldNames)
@@ -142,7 +142,7 @@ func (r *baseRepository) loadAll(entities interface{}, sortBy string) error {
start := i * numFields start := i * numFields
entity := reflect.New(r.entityType).Interface() entity := reflect.New(r.entityType).Interface()
if err := r.toEntity(response[start:start + numFields], entity); err != nil { if err := r.toEntity(response[start:start+numFields], entity); err != nil {
return err return err
} }
reflected.Set(reflect.Append(reflected, reflect.ValueOf(entity).Elem())) reflected.Set(reflect.Append(reflected, reflect.ValueOf(entity).Elem()))
+3 -3
View File
@@ -1,11 +1,11 @@
package persistence package persistence
import ( import (
"testing"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/tests"
"fmt" "fmt"
"github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"strconv" "strconv"
"testing"
) )
type TestEntity struct { type TestEntity struct {
+2 -2
View File
@@ -1,10 +1,10 @@
package persistence package persistence
import ( import (
"github.com/deluan/gosonic/domain"
"errors" "errors"
"sort" "github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/utils" "github.com/deluan/gosonic/utils"
"sort"
) )
type artistIndex struct { type artistIndex struct {
+5 -5
View File
@@ -1,11 +1,11 @@
package persistence package persistence
import ( import (
"testing"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"strconv" "github.com/deluan/gosonic/tests"
. "github.com/smartystreets/goconvey/convey"
"strconv"
"testing"
) )
func TestIndexRepository(t *testing.T) { func TestIndexRepository(t *testing.T) {
@@ -19,7 +19,7 @@ func TestIndexRepository(t *testing.T) {
i := &domain.ArtistIndex{Id: "123"} i := &domain.ArtistIndex{Id: "123"}
repo.Put(i) repo.Put(i)
s,_ := repo.Get("123") s, _ := repo.Get("123")
So(s, shouldBeEqual, i) So(s, shouldBeEqual, i)
}) })
+2 -3
View File
@@ -1,10 +1,10 @@
package persistence package persistence
import ( import (
"sync"
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/siddontang/ledisdb/ledis"
"github.com/siddontang/ledisdb/config" "github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/ledis"
"sync"
) )
var ( var (
@@ -28,7 +28,6 @@ func db() *ledis.DB {
return _dbInstance return _dbInstance
} }
func dropDb() { func dropDb() {
db() db()
_ledisInstance.FlushAll() _ledisInstance.FlushAll()
+1 -2
View File
@@ -1,8 +1,8 @@
package persistence package persistence
import ( import (
"github.com/deluan/gosonic/domain"
"github.com/astaxie/beego" "github.com/astaxie/beego"
"github.com/deluan/gosonic/domain"
) )
type mediaFolderRepository struct { type mediaFolderRepository struct {
@@ -13,7 +13,6 @@ func NewMediaFolderRepository() domain.MediaFolderRepository {
return &mediaFolderRepository{} return &mediaFolderRepository{}
} }
func (*mediaFolderRepository) GetAll() ([]domain.MediaFolder, error) { func (*mediaFolderRepository) GetAll() ([]domain.MediaFolder, error) {
mediaFolder := domain.MediaFolder{Id: "0", Name: "iTunes Library", Path: beego.AppConfig.String("musicFolder")} mediaFolder := domain.MediaFolder{Id: "0", Name: "iTunes Library", Path: beego.AppConfig.String("musicFolder")}
result := make([]domain.MediaFolder, 1) result := make([]domain.MediaFolder, 1)
+2 -2
View File
@@ -1,8 +1,8 @@
package persistence package persistence
import ( import (
"errors"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"errors"
) )
type propertyRepository struct { type propertyRepository struct {
@@ -29,7 +29,7 @@ func (r *propertyRepository) Get(id string) (string, error) {
return rec.(*domain.Property).Value, err return rec.(*domain.Property).Value, err
} }
func (r*propertyRepository) DefaultGet(id string, defaultValue string) (string, error) { func (r *propertyRepository) DefaultGet(id string, defaultValue string) (string, error) {
v, err := r.Get(id) v, err := r.Get(id)
if v == "" { if v == "" {
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"strings" "strings"
) )
type ItunesScanner struct {} type ItunesScanner struct{}
func (s *ItunesScanner) LoadFolder(path string) []Track { func (s *ItunesScanner) LoadFolder(path string) []Track {
xml, _ := os.Open(path) xml, _ := os.Open(path)
@@ -35,7 +35,7 @@ func (s *ItunesScanner) LoadFolder(path string) []Track {
} }
func unescape(s string) string { func unescape(s string) string {
s,_ = url.QueryUnescape(s) s, _ = url.QueryUnescape(s)
return strings.Replace(s, "&", "&", -1) return strings.Replace(s, "&", "&", -1)
} }
+8 -8
View File
@@ -1,14 +1,14 @@
package scanner package scanner
import ( import (
"github.com/astaxie/beego"
"github.com/deluan/gosonic/persistence"
"github.com/deluan/gosonic/domain"
"strings"
"github.com/deluan/gosonic/utils"
"github.com/deluan/gosonic/consts"
"time"
"fmt" "fmt"
"github.com/astaxie/beego"
"github.com/deluan/gosonic/consts"
"github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/persistence"
"github.com/deluan/gosonic/utils"
"strings"
"time"
) )
type Scanner interface { type Scanner interface {
@@ -29,7 +29,7 @@ func doImport(mediaFolder string, scanner Scanner) {
beego.Info("Finished importing", len(files), "files") beego.Info("Finished importing", len(files), "files")
} }
func importLibrary(files []Track) (err error){ func importLibrary(files []Track) (err error) {
indexGroups := utils.ParseIndexGroups(beego.AppConfig.String("indexGroups")) indexGroups := utils.ParseIndexGroups(beego.AppConfig.String("indexGroups"))
mfRepo := persistence.NewMediaFileRepository() mfRepo := persistence.NewMediaFileRepository()
albumRepo := persistence.NewAlbumRepository() albumRepo := persistence.NewAlbumRepository()
+5 -5
View File
@@ -1,17 +1,17 @@
package scanner package scanner
import ( import (
"testing"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/utils"
"github.com/deluan/gosonic/domain" "github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/tests" "github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/utils"
. "github.com/smartystreets/goconvey/convey"
"testing"
) )
func TestCollectIndex(t *testing.T) { func TestCollectIndex(t *testing.T) {
tests.Init(t, false) tests.Init(t, false)
ig := utils.IndexGroups{"A":"A", "B":"B", "Tom":"Tom", "X":"X-Z"} ig := utils.IndexGroups{"A": "A", "B": "B", "Tom": "Tom", "X": "X-Z"}
Convey("Simple Name", t, func() { Convey("Simple Name", t, func() {
a := &domain.Artist{Name: "Björk"} a := &domain.Artist{Name: "Björk"}
+2 -2
View File
@@ -18,10 +18,10 @@ type Track struct {
} }
func (m *Track) RealArtist() string { func (m *Track) RealArtist() string {
if (m.Compilation) { if m.Compilation {
return "Various Artists" return "Various Artists"
} }
if (m.AlbumArtist != "") { if m.AlbumArtist != "" {
return m.AlbumArtist return m.AlbumArtist
} }
return m.Artist return m.Artist
-1
View File
@@ -22,4 +22,3 @@ func Init(t *testing.T, skipOnShort bool) {
beego.SetLevel(beego.LevelError) beego.SetLevel(beego.LevelError)
} }
} }
+2 -2
View File
@@ -1,10 +1,10 @@
package mocks package mocks
import ( import (
"github.com/deluan/gosonic/domain"
"fmt"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"github.com/deluan/gosonic/domain"
) )
func CreateMockArtistIndexRepo() *MockArtistIndex { func CreateMockArtistIndexRepo() *MockArtistIndex {
+1 -1
View File
@@ -13,8 +13,8 @@
package utils package utils
import ( import (
"strings"
"regexp" "regexp"
"strings"
) )
type IndexGroups map[string]string type IndexGroups map[string]string
+3 -3
View File
@@ -3,8 +3,8 @@
package utils package utils
import ( import (
"strconv"
"encoding/json" "encoding/json"
"strconv"
) )
const delimiter = "." const delimiter = "."
@@ -110,7 +110,7 @@ func FlattenMap(input map[string]interface{}) (map[string]interface{}, error) {
func ToMap(rec interface{}) (map[string]interface{}, error) { func ToMap(rec interface{}) (map[string]interface{}, error) {
// Convert to JSON... // Convert to JSON...
b, err := json.Marshal(rec); b, err := json.Marshal(rec)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -123,7 +123,7 @@ func ToMap(rec interface{}) (map[string]interface{}, error) {
func ToStruct(m map[string]interface{}, rec interface{}) error { func ToStruct(m map[string]interface{}, rec interface{}) error {
// Convert to JSON... // Convert to JSON...
b, err := json.Marshal(m); b, err := json.Marshal(m)
if err != nil { if err != nil {
return err return err
} }
+3 -3
View File
@@ -1,15 +1,15 @@
package utils package utils
import ( import (
"strings"
"github.com/astaxie/beego" "github.com/astaxie/beego"
"strings"
) )
func NoArticle(name string) string { func NoArticle(name string) string {
articles := strings.Split(beego.AppConfig.String("ignoredArticles"), " ") articles := strings.Split(beego.AppConfig.String("ignoredArticles"), " ")
for _, a := range articles { for _, a := range articles {
n := strings.TrimPrefix(name, a + " ") n := strings.TrimPrefix(name, a+" ")
if (n != name) { if n != name {
return n return n
} }
} }
+1 -1
View File
@@ -1,8 +1,8 @@
package utils package utils
import ( import (
"testing"
. "github.com/smartystreets/goconvey/convey" . "github.com/smartystreets/goconvey/convey"
"testing"
) )
func TestParseIndexGroup(t *testing.T) { func TestParseIndexGroup(t *testing.T) {