push
github
758 of 1009 new or added lines in 21 files covered. (75.12%)
17 existing lines in 6 files now uncovered.2871 of 3525 relevant lines covered (81.45%)
22.36 hits per line
1 |
package event
|
|
2 |
|
|
3 |
import "time" |
|
4 |
|
|
NEW
|
func VersionRange(vers []Version) (from, to Version) {
|
× |
NEW
|
if l := len(vers); l > 1 { |
× |
NEW
|
from, to = vers[0], vers[1] |
× |
NEW
|
} else if l == 1 { |
× |
NEW
|
from, to = vers[0], VersionMax
|
× |
NEW
|
} else {
|
× |
NEW
|
from, to = VersionMin, VersionMax |
× |
NEW
|
} |
× |
NEW
|
return
|
× |
14 |
} |
|
15 |
|
|
NEW
|
func TimeRange(times []time.Time) (since, until time.Time) {
|
× |
NEW
|
if l := len(times); l > 1 { |
× |
NEW
|
since, until = times[0], times[1] |
× |
NEW
|
} else if l == 1 { |
× |
NEW
|
since, until = times[0], time.Now()
|
× |
NEW
|
} else {
|
× |
NEW
|
since, until = time.Unix(0, 0), time.Now() |
× |
NEW
|
} |
× |
NEW
|
return
|
× |
25 |
} |