Added basic music playback + tui

This commit is contained in:
2022-03-20 19:50:55 +01:00
parent f9124deba7
commit 8fff93464a
13 changed files with 527 additions and 1 deletions

17
pkg/utils.go Normal file
View File

@ -0,0 +1,17 @@
package gomus
import "log"
func mapList[T any, R any](l []T, f func(T) R) []R {
var c []R = []R{}
for _, item := range l {
c = append(c, f(item))
}
return c
}
func check(err error) {
if err != nil {
log.Fatal(err)
}
}