Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions filepathx.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ func Glob(pattern string) ([]string, error) {
func (globs Globs) Expand() ([]string, error) {
var matches = []string{""} // accumulate here
for _, glob := range globs {
if glob == "" {
// If the glob is empty string that means it was **
// By setting this to . patterns like **/*.txt are supported
glob = "."
}
var hits []string
var hitMap = map[string]bool{}
for _, match := range matches {
Expand Down