Skip to content

Commit

Permalink
minor api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekonan committed Oct 29, 2020
1 parent be16d67 commit 2e5a56d
Show file tree
Hide file tree
Showing 5 changed files with 1,755 additions and 1,755 deletions.
10 changes: 5 additions & 5 deletions country.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ func (c Alpha3Code) IsSet() bool {
}

type Country struct {
country Name
alpha2 Alpha2Code
alpha3 Alpha3Code
name Name
alpha2 Alpha2Code
alpha3 Alpha3Code
}

func (c Country) Country() Name { return c.country }
func (c Country) Name() Name { return c.name }
func (c Country) Alpha2Code() Alpha2Code { return c.alpha2 }
func (c Country) Alpha3Code() Alpha3Code { return c.alpha3 }

Expand Down Expand Up @@ -124,7 +124,7 @@ func ByAlpha2CodeStrErr(code string) (result Country, err error) {
}

func ByCountry(country Name) (result Country, ok bool) {
result, ok = countryByCountry[country]
result, ok = countryByName[country]
return
}

Expand Down
Loading

0 comments on commit 2e5a56d

Please sign in to comment.