Skip to content
Snippets Groups Projects
Commit bac7e75b authored by Aksel Baardsen's avatar Aksel Baardsen
Browse files

added check for correct country

parent 73999f62
No related branches found
No related tags found
No related merge requests found
......@@ -104,9 +104,11 @@ func GetCountryByCode(code, limit string) Country {
//adds specieskeys&specienames to the country struct
// NEEDS CHECK IF SPECIES COUNTRY IS CORRECT !!
for i := 0; i < len(y.Results); i++ {
if x.Code == y.Results[i].CountryCode {
x.Species = append(x.Species, y.Results[i].Species)
x.SpeciesKey = append(x.SpeciesKey, y.Results[i].SpeciesKey)
}
}
return x
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment