Skip to content

Commit 0247d9b

Browse files
Armin BecherArmin Becher
Armin Becher
authored and
Armin Becher
committed
refactor: use existing slices contains function instead of own
1 parent 1674803 commit 0247d9b

File tree

3 files changed

+2
-31
lines changed

3 files changed

+2
-31
lines changed

internal/collection/collection.go

-13
This file was deleted.

internal/collection/collection_test.go

-16
This file was deleted.

internal/ui/ui.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package ui
33
import (
44
"fmt"
55
"log"
6+
"slices"
67
"sort"
78
"strings"
89

9-
"github.com/becheran/roumon/internal/collection"
1010
"github.com/becheran/roumon/internal/model"
1111
"github.com/gizak/termui/v3/widgets"
1212

@@ -186,7 +186,7 @@ func (ui *UI) updateStatus() {
186186
for idx, t := range types {
187187
data[idx] = typeCount[t]
188188
newLabel := t[:3]
189-
if collection.SliceContains(labels, newLabel) {
189+
if slices.Contains(labels, newLabel) {
190190
newLabel = fmt.Sprintf("%s%d", t[:2], uniqueID)
191191
uniqueID++
192192
}

0 commit comments

Comments
 (0)