• Marcel van Lohuizen's avatar
    exp/locale/collate: changed API to allow access to different locales through New(), · a4d08ed5
    Marcel van Lohuizen authored
    instead of variables. Several reasons:
    - Encourage users of the API to minimize the number of creations and reuse Collate objects.
    - Don't rule out the possibility of using initialization code for collators. For some locales
      it will be possible to have very compact representations that can be quickly expanded
      into a proper table on demand.
    Other changes:
    - Change name of root* vars to main*, as the tables are shared between locales.
    - Added Locales() method to get a list of supported locales.
    
    R=r
    CC=golang-dev
    https://golang.org/cl/6498107
    a4d08ed5
table.go 3.98 KB