Passed
Push — v3.0.0 ( 268334 )
by Serhii
01:47
created

langset.New   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
package langset
2
3
import "github.com/SerhiiCho/timeago/v3/ctx"
4
5
type CLDR struct {
6
	One   string
7
	Few   string
8
	Many  string
9
	Other string
10
}
11
12
type LangSet struct {
13
	Ago     string
14
	Online  string
15
	JustNow string
16
	Second  CLDR
17
	Minute  CLDR
18
	Hour    CLDR
19
	Day     CLDR
20
	Week    CLDR
21
	Month   CLDR
22
	Year    CLDR
23
}
24
25
func New(c *ctx.Ctx) LangSet {
26
	lang := c.Config().Language
27
	return parseJsonIntoTrans("langset/" + lang + ".json")
28
}
29