Remove unused GlobPatternList function am: 850d3886d4
am: 0bb9608b51
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1668806 Change-Id: I9d7435100757e0e8838cde9512ff25cda0a6976b
This commit is contained in:
commit
bc184384fe
1 changed files with 0 additions and 24 deletions
|
@ -298,30 +298,6 @@ func Match(pattern, name string) (bool, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func GlobPatternList(patterns []string, prefix string) (globedList []string, depDirs []string, err error) {
|
||||
var (
|
||||
matches []string
|
||||
deps []string
|
||||
)
|
||||
|
||||
globedList = make([]string, 0)
|
||||
depDirs = make([]string, 0)
|
||||
|
||||
for _, pattern := range patterns {
|
||||
if isWild(pattern) {
|
||||
matches, deps, err = Glob(filepath.Join(prefix, pattern), nil, FollowSymlinks)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
globedList = append(globedList, matches...)
|
||||
depDirs = append(depDirs, deps...)
|
||||
} else {
|
||||
globedList = append(globedList, filepath.Join(prefix, pattern))
|
||||
}
|
||||
}
|
||||
return globedList, depDirs, nil
|
||||
}
|
||||
|
||||
// IsGlob returns true if the pattern contains any glob characters (*, ?, or [).
|
||||
func IsGlob(pattern string) bool {
|
||||
return strings.IndexAny(pattern, "*?[") >= 0
|
||||
|
|
Loading…
Reference in a new issue