Passed
Push — master ( b486cf...8123a4 )
by Serhii
02:01 queued 28s
created

tests/utils.go   A

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
cc 2
eloc 6
dl 0
loc 10
ccs 2
cts 2
cp 1
crap 2
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tests.smallSubTime 0 2 1
A tests.bigSubTime 0 2 1
1
package tests
2
3
import "time"
4
5
func smallSubTime(d time.Duration) string {
6 1
	return time.Now().Add(d).Format("2006-01-02 15:04:05")
7
}
8
9
func bigSubTime(years int, months int, days int) string {
10 1
	return time.Now().AddDate(-years, -months, -days).Format("2006-01-02 15:04:05")
11
}
12