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

ctx/ctx.go   A

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 15
dl 0
loc 25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A ctx.New 0 4 1
A ctx.Ctx.Config 0 2 1
A ctx.Ctx.Options 0 2 1
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