mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
test: Add variable interpolation test
This commit is contained in:
@@ -50,18 +50,3 @@ func ContainsGlob(pattern string) bool {
|
||||
strings.Contains(pattern, "?") ||
|
||||
strings.Contains(pattern, "[")
|
||||
}
|
||||
|
||||
// ExpandPathList expands variables in a list of paths/patterns.
|
||||
func ExpandPathList(patterns []string) ([]string, error) {
|
||||
result := make([]string, 0, len(patterns))
|
||||
|
||||
for _, pattern := range patterns {
|
||||
expanded, err := ExpandVariables(pattern)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result = append(result, expanded)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user