Conditions | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | package timeago |
||
15 | if err != nil { |
||
16 | 1 | return nil, fmt.Errorf("could not read language file: %w", err) |
|
17 | 1 | } |
|
18 | |||
19 | langSet := &LangSet{} |
||
20 | 1 | ||
21 | 1 | if err := json.Unmarshal(content, &langSet); err != nil { |
|
22 | return nil, fmt.Errorf("could not unmarshal language file: %w", err) |
||
23 | } |
||
24 | |||
25 | return langSet, nil |
||
26 | } |
||
42 |