Skip to content

Commit

Permalink
Implemented some staticcheck suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterclaerhout committed May 23, 2020
1 parent fd8d4e0 commit 0443592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions countries.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func init() {
// CountryCodeToName translates an ISO country to the English name
func CountryCodeToName(code string) (string, error) {
for countryCode, countryName := range countryCodes {
if strings.ToLower(code) == strings.ToLower(countryCode) {
if strings.EqualFold(code, countryCode) {
return countryName, nil
}
}
Expand All @@ -305,7 +305,7 @@ func CountryCodeToRegion(code string) string {
// CountryNameToCode translates the country name to it's ISO country code
func CountryNameToCode(name string) (string, error) {
for countryCode, countryName := range countryCodes {
if strings.ToLower(name) == strings.ToLower(countryName) {
if strings.EqualFold(name, countryName) {
return countryCode, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion database_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (downloader *DatabaseDownloader) Download() error {

foundFile := false

for true {
for {

header, err := tarReader.Next()

Expand Down

0 comments on commit 0443592

Please sign in to comment.