Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package ctx |
||
2 | |||
3 | import ( |
||
4 | "github.com/SerhiiCho/timeago/v3/config" |
||
5 | "github.com/SerhiiCho/timeago/v3/option" |
||
6 | ) |
||
7 | |||
8 | type Ctx struct { |
||
9 | conf *config.Config |
||
10 | options []option.Option |
||
11 | } |
||
12 | |||
13 | func New(conf *config.Config, options []option.Option) *Ctx { |
||
14 | return &Ctx{ |
||
15 | conf: conf, |
||
16 | options: options, |
||
17 | } |
||
18 | } |
||
19 | |||
20 | func (c Ctx) Config() *config.Config { |
||
21 | return c.conf |
||
22 | } |
||
23 | |||
24 | func (c Ctx) Options() []option.Option { |
||
25 | return c.options |
||
26 | } |
||
27 |