1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 12:50:19 +01:00
embd/utils.go

16 lines
315 B
Go

package embd
import "path/filepath"
// Inspiration: https://github.com/mrmorphic/hwio/blob/master/hwio.go#L451
func findFirstMatchingFile(glob string) (string, error) {
matches, err := filepath.Glob(glob)
if err != nil {
return "", err
}
if len(matches) >= 1 {
return matches[0], nil
}
return "", nil
}