Added basic music playback + tui
This commit is contained in:
17
pkg/utils.go
Normal file
17
pkg/utils.go
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user