This commit is contained in:
june 2025-03-09 10:06:40 +13:00
parent db8e66666c
commit 074cb059eb
Signed by untrusted user who does not match committer: breadone
GPG Key ID: FDC19FE143200483
2 changed files with 70 additions and 60 deletions

View File

@ -2,6 +2,7 @@ package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
)
@ -84,7 +85,6 @@ func (m model) View() string {
s += "\n\n"
// Iterate over our choices
for i, choice := range currentList {

10
helper.go Normal file
View File

@ -0,0 +1,10 @@
package main
func filter[T any](ss []T, test func(T) bool) (ret []T) {
for _, s := range ss {
if test(s) {
ret = append(ret, s)
}
}
return
}