package model type Slice struct { Name string StartTime float64 EndTime float64 } func (s Slice) Len() float64 { return s.EndTime - s.StartTime }