fix bug with empty string

This commit is contained in:
Dawid Wysokiński 2020-06-18 17:56:07 +02:00
parent 2c669bf778
commit 80baa079e2
3 changed files with 6 additions and 3 deletions

View File

@ -74,6 +74,9 @@ func (h *updateServerDataHandler) getOD(tribe bool) (map[int]*models.OpponentsDe
}
}
for _, url := range urls {
if url == "" {
continue
}
lines, err := getCSVData(url, false)
if err != nil {
return nil, errors.Wrapf(err, "unable to get data, url %s", url)

2
go.mod
View File

@ -8,6 +8,6 @@ require (
github.com/joho/godotenv v1.3.0
github.com/pkg/errors v0.9.1
github.com/robfig/cron/v3 v3.0.1
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6
github.com/tribalwarshelp/shared v0.0.0-20200618150949-896cd6c98d06
golang.org/x/net v0.0.0-20200528225125-3c3fba18258b // indirect
)

4
go.sum
View File

@ -88,8 +88,8 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6 h1:vrqEpEwkKg63/hV5cIGgmDvdcAdDm4pR0N14nC3eCjQ=
github.com/tribalwarshelp/shared v0.0.0-20200602122915-bb9a531672b6/go.mod h1:tf+2yTHasV6jAF3V2deZ9slNoCyBzC0fMdTjI7clf6Y=
github.com/tribalwarshelp/shared v0.0.0-20200618150949-896cd6c98d06 h1:T87o4fice0XTUdAG/tctFCDiuyUGb10bY1hdWvwlrro=
github.com/tribalwarshelp/shared v0.0.0-20200618150949-896cd6c98d06/go.mod h1:tf+2yTHasV6jAF3V2deZ9slNoCyBzC0fMdTjI7clf6Y=
github.com/vmihailenco/bufpool v0.1.5/go.mod h1:fL9i/PRTuS7AELqAHwSU1Zf1c70xhkhGe/cD5ud9pJk=
github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94=
github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ=