Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package timeago |
||
2 | |||
3 | import "github.com/SerhiiCho/timeago/v3/option" |
||
4 | |||
5 | func enableOption(opt option.Option) { |
||
6 | options = append(options, opt) |
||
7 | } |
||
8 | |||
9 | func enableOptions(opts []option.Option) { |
||
10 | for _, opt := range opts { |
||
11 | enableOption(opt) |
||
12 | } |
||
13 | } |
||
14 | |||
15 | func optionIsEnabled(opt option.Option) bool { |
||
16 | for _, option := range options { |
||
17 | if option == opt { |
||
18 | return true |
||
19 | } |
||
20 | } |
||
21 | |||
22 | return false |
||
23 | } |
||
24 |