first mvp

This commit is contained in:
2026-05-16 01:39:45 +08:00
parent b3a2ae4681
commit 69afb0a53e
13 changed files with 205 additions and 272 deletions
+32
View File
@@ -0,0 +1,32 @@
package utils
import (
"os"
"path/filepath"
)
func ExpandGlob(patterns []string) ([]string, error) {
var result []string
for _, p := range patterns {
matches, err := filepath.Glob(p)
if err != nil {
return nil, err
}
for _, m := range matches {
info, err := os.Stat(m)
if err != nil {
continue
}
if info.IsDir() {
continue
}
result = append(result, m)
}
}
return result, nil
}