Passed
Push — v3.0.0 ( beea69...5114d0 )
by Serhii
01:21
created

timeago.NewLangSet   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
nop 0
1
package timeago
2
3
type LangForms map[string]string
4
5
type LangSet struct {
6
	Format  string    `json:"format"`
7
	Ago     string    `json:"ago"`
8
	Online  string    `json:"online"`
9
	JustNow string    `json:"justnow"`
10
	Second  LangForms `json:"second"`
11
	Minute  LangForms `json:"minute"`
12
	Hour    LangForms `json:"hour"`
13
	Day     LangForms `json:"day"`
14
	Week    LangForms `json:"week"`
15
	Month   LangForms `json:"month"`
16
	Year    LangForms `json:"year"`
17
}
18
19
func NewLangSet() *LangSet {
20
	return parseLangSet("langs/" + conf.Language + ".json")
21
}
22