Skip to content

Instantly share code, notes, and snippets.

@tmaiaroto
Created November 7, 2014 20:25
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tmaiaroto/4ec7668ae986335b0a6d to your computer and use it in GitHub Desktop.
Save tmaiaroto/4ec7668ae986335b0a6d to your computer and use it in GitHub Desktop.
Golang map of US state codes : full name
// A handy map of US state codes to full names
var usc = map[string]string{
"AL": "Alabama",
"AK": "Alaska",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"FL": "Florida",
"GA": "Georgia",
"HI": "Hawaii",
"ID": "Idaho",
"IL": "Illinois",
"IN": "Indiana",
"IA": "Iowa",
"KS": "Kansas",
"KY": "Kentucky",
"LA": "Louisiana",
"ME": "Maine",
"MD": "Maryland",
"MA": "Massachusetts",
"MI": "Michigan",
"MN": "Minnesota",
"MS": "Mississippi",
"MO": "Missouri",
"MT": "Montana",
"NE": "Nebraska",
"NV": "Nevada",
"NH": "New Hampshire",
"NJ": "New Jersey",
"NM": "New Mexico",
"NY": "New York",
"NC": "North Carolina",
"ND": "North Dakota",
"OH": "Ohio",
"OK": "Oklahoma",
"OR": "Oregon",
"PA": "Pennsylvania",
"RI": "Rhode Island",
"SC": "South Carolina",
"SD": "South Dakota",
"TN": "Tennessee",
"TX": "Texas",
"UT": "Utah",
"VT": "Vermont",
"VA": "Virginia",
"WA": "Washington",
"WV": "West Virginia",
"WI": "Wisconsin",
"WY": "Wyoming",
// Territories
"AS": "American Samoa",
"DC": "District of Columbia",
"FM": "Federated States of Micronesia",
"GU": "Guam",
"MH": "Marshall Islands",
"MP": "Northern Mariana Islands",
"PW": "Palau",
"PR": "Puerto Rico",
"VI": "Virgin Islands",
// Armed Forces (AE includes Europe, Africa, Canada, and the Middle East)
"AA": "Armed Forces Americas",
"AE": "Armed Forces Europe",
"AP": "Armed Forces Pacific",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment