mirror of
https://git.um-react.app/um/cli.git
synced 2026-10-20 05:28:34 +00:00
22 lines
359 B
Go
22 lines
359 B
Go
package main
|
|
|
|
import (
|
|
"path/filepath"
|
|
"slices"
|
|
"strings"
|
|
)
|
|
|
|
// knownNonMusicExts are common non-audio suffixes to skip when walking dirs.
|
|
var knownNonMusicExts = []string{
|
|
"",
|
|
".txt",
|
|
".mmkv",
|
|
".exe",
|
|
".dll",
|
|
}
|
|
|
|
func isKnownNonMusicExt(path string) bool {
|
|
ext := strings.ToLower(filepath.Ext(path))
|
|
return slices.Contains(knownNonMusicExts, ext)
|
|
}
|