openvenues / gopostal

Go (cgo) interface to libpostal for fast international address parsing/normalization
MIT License
160 stars 32 forks source link

Expose struct attributes. #1

Closed theory closed 8 years ago

theory commented 8 years ago

Go requires that attributes be uppercased in order to be exposed outside the package. When they are lowercase, they're private, which works okay inside the package (e.g., in your tests), but not outside. I ran into this when trying to display ParsedComponents as JSON: There was no way to get at the label or value!