Apply go fix modernizations

This commit is contained in:
Ian Gulliver
2026-03-05 11:39:13 -08:00
parent 165b9d1c6c
commit fc3bbf894f
6 changed files with 32 additions and 36 deletions

View File

@@ -49,12 +49,7 @@ func (t *TimelineTrack) cellTypeAt(index int, types ...CellType) bool {
if index < 0 || index >= len(t.Cells) {
return false
}
for _, typ := range types {
if t.Cells[index].Type == typ {
return true
}
}
return false
return slices.Contains(types, t.Cells[index].Type)
}
func (c *TimelineCell) String() string {
@@ -98,14 +93,15 @@ func (g exclusiveGroup) satisfied(tracks []*TimelineTrack) bool {
}
func (g exclusiveGroup) String() string {
s := "exclusive("
var s strings.Builder
s.WriteString("exclusive(")
for i, m := range g.members {
if i > 0 {
s += ", "
s.WriteString(", ")
}
s += m.String()
s.WriteString(m.String())
}
return s + ")"
return s.String() + ")"
}
func (tl *Timeline) debugf(format string, args ...any) {