diff options
| author | nytpu <alex@nytpu.com> | 2021-05-11 11:16:36 -0600 |
|---|---|---|
| committer | nytpu <alex@nytpu.com> | 2021-05-11 11:22:17 -0600 |
| commit | 4d23da8c389d210c5d067fdbcb28d6875797e9e6 (patch) | |
| tree | c9a0363a10acea737ab35b223ca7d7a6e56d6f85 /core | |
| parent | cc5c8b2f23854c7c787d553242818d4aaea0da71 (diff) | |
add core.Localizer
Diffstat (limited to 'core')
| -rw-r--r-- | core/core.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/core.go b/core/core.go index 71738a8..d35f9bf 100644 --- a/core/core.go +++ b/core/core.go @@ -19,6 +19,8 @@ import ( "os" "path/filepath" "sync" + + "golang.nytpu.com/comitium/localizations" ) // Global instance of FullData @@ -35,9 +37,13 @@ var Header string // Timeout for requests var Timeout int +var Localizer *localizations.Localizer + // have to do this instead of the automatically called init() because // initialization stuff requires parsing of command line args first -func Init(dataPath string) error { +func Init(dataPath string, localizer *localizations.Localizer) error { + Localizer = localizer + // initialize comitium.json & data maps f, err := os.Open(filepath.Join(dataPath, "comitium.json")) if err == nil { |
