ServerDataLoader.LoadOD - replace fmt.Sprintf with string concatenation

This commit is contained in:
Dawid Wysokiński 2021-07-17 09:05:14 +02:00
parent 2875c56885
commit 5030d62000
1 changed files with 7 additions and 7 deletions

View File

@ -73,16 +73,16 @@ func (dl *ServerDataLoader) parseODLine(line []string) (*parsedODLine, error) {
func (dl *ServerDataLoader) LoadOD(tribe bool) (map[int]*twmodel.OpponentsDefeated, error) { func (dl *ServerDataLoader) LoadOD(tribe bool) (map[int]*twmodel.OpponentsDefeated, error) {
m := make(map[int]*twmodel.OpponentsDefeated) m := make(map[int]*twmodel.OpponentsDefeated)
formattedURLs := []string{ formattedURLs := []string{
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillAll), dl.baseURL + EndpointKillAll,
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillAtt), dl.baseURL + EndpointKillAtt,
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillDef), dl.baseURL + EndpointKillDef,
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillSup), dl.baseURL + EndpointKillSup,
} }
if tribe { if tribe {
formattedURLs = []string{ formattedURLs = []string{
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillAllTribe), dl.baseURL + EndpointKillAllTribe,
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillAttTribe), dl.baseURL + EndpointKillAttTribe,
fmt.Sprintf("%s%s", dl.baseURL, EndpointKillDefTribe), dl.baseURL + EndpointKillDefTribe,
"", "",
} }
} }