OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-playground / locales / cmd / locale_map.tmpl
1 {{ define "localeslist" }}
2 package localeslist
3
4 import (
5         "sync"
6 )
7
8 // LocaleFunc is the function to run in order to create
9 // a new instance of a given locale
10 type LocaleFunc func() locales.Translator
11
12 // LocaleMap is map of locale string to instance function
13 type LocaleMap map[string]LocaleFunc
14
15
16 var (
17         once      sync.Once
18         localeMap LocaleMap
19 )
20
21 func init() {
22         once.Do(func(){
23                 localeMap = map[string]LocaleFunc{
24                         {{ . }}
25                 }
26         })
27 }
28
29 // Map returns the map of locales to instance New function
30 func Map() LocaleMap {
31         return localeMap
32 }
33
34 {{ end }}