diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2023-06-25 13:11:10 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2023-06-25 13:11:10 -0700 |
| commit | c5731e6cd28dfc230631c52d9ce7af3b165d518f (patch) | |
| tree | 60067ac3ad5846aa512cce5ff14ddacfbe4423f7 | |
| parent | ba41d143209e9519b36536eafdc8292f0cc67047 (diff) | |
| download | tailscale-bradfitz/countrycode.tar.xz tailscale-bradfitz/countrycode.zip | |
tailcfg: redefine Location.CountryCode as upper casebradfitz/countrycode
Because other than TLDs, it's traditionally upper case:
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Updates #cleanup
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
| -rw-r--r-- | tailcfg/tailcfg.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index d344e2bd4..2c3a735dc 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -535,10 +535,10 @@ type Service struct { // Tailscale host. Location is optional and only set if // explicitly declared by a node. type Location struct { - Country string `json:",omitempty"` // User friendly country name, with proper capitalization, e.g "Canada" - CountryCode string `json:",omitempty"` // ISO 3166-1 alpha-2 in lower case, e.g "ca" - City string `json:",omitempty"` // User friendly city name, with proper capitalization, e.g. "Squamish" - CityCode string `json:",omitempty"` + Country string `json:",omitempty"` // User friendly country name, with proper capitalization ("Canada") + CountryCode string `json:",omitempty"` // ISO 3166-1 alpha-2 in upper case ("CA") + City string `json:",omitempty"` // User friendly city name, with proper capitalization ("Squamish") + CityCode string `json:",omitempty"` // TODO(charlotte): document // Priority determines the priority an exit node is given when the // location data between two or more nodes is tied. |
