Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package config |
||
2 | |||
3 | type Config struct { |
||
4 | Language string |
||
5 | Location string |
||
6 | Translations []Translation |
||
7 | } |
||
8 | |||
9 | func New(lang, loc string, trans []Translation) Config { |
||
10 | return Config{ |
||
11 | Language: lang, |
||
12 | Location: loc, |
||
13 | Translations: trans, |
||
14 | } |
||
15 | } |
||
16 | |||
17 | func (c Config) LocationIsSet() bool { |
||
18 | return c.Location != "" |
||
19 | } |
||
20 | |||
21 | func (c Config) TranslationsAreSet() bool { |
||
22 | return len(c.Translations) > 0 |
||
23 | } |
||
24 |