push
github
1399 of 1832 new or added lines in 33 files covered. (76.36%)
203 existing lines in 20 files now uncovered.3004 of 3722 relevant lines covered (80.71%)
22.5 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 |
} |