Rename GLob to glob
This commit is contained in:
@@ -82,7 +82,7 @@ func TestGlobExpansion(t *testing.T) {
|
|||||||
for _, pattern := range tc.patterns {
|
for _, pattern := range tc.patterns {
|
||||||
patternMap[pattern] = struct{}{}
|
patternMap[pattern] = struct{}{}
|
||||||
}
|
}
|
||||||
files, err := utils.ExpandGLobs(patternMap)
|
files, err := utils.ExpandGlobs(patternMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("ExpandGLobs failed: %v", err)
|
t.Fatalf("ExpandGLobs failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -243,7 +243,7 @@ func runModifier(args []string, cmd *cobra.Command) {
|
|||||||
// Resolve all the files for all the globs
|
// Resolve all the files for all the globs
|
||||||
mainLogger.Info("Found %d unique file patterns", len(globs))
|
mainLogger.Info("Found %d unique file patterns", len(globs))
|
||||||
mainLogger.Debug("Expanding glob patterns to files")
|
mainLogger.Debug("Expanding glob patterns to files")
|
||||||
files, err := utils.ExpandGLobs(globs)
|
files, err := utils.ExpandGlobs(globs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
mainLogger.Error("Failed to expand file patterns: %v", err)
|
mainLogger.Error("Failed to expand file patterns: %v", err)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
logger "git.site.quack-lab.dev/dave/cylogger"
|
logger "git.site.quack-lab.dev/dave/cylogger"
|
||||||
"github.com/bmatcuk/doublestar/v4"
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
|
"github.com/bmatcuk/doublestar/v4"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ func AggregateGlobs(commands []ModifyCommand) map[string]struct{} {
|
|||||||
return globs
|
return globs
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExpandGLobs(patterns map[string]struct{}) ([]string, error) {
|
func ExpandGlobs(patterns map[string]struct{}) ([]string, error) {
|
||||||
expandGlobsLogger := modifyCommandLogger.WithPrefix("ExpandGLobs")
|
expandGlobsLogger := modifyCommandLogger.WithPrefix("ExpandGLobs")
|
||||||
expandGlobsLogger.Debug("Expanding glob patterns to actual files")
|
expandGlobsLogger.Debug("Expanding glob patterns to actual files")
|
||||||
expandGlobsLogger.Trace("Input patterns for expansion: %v", patterns)
|
expandGlobsLogger.Trace("Input patterns for expansion: %v", patterns)
|
||||||
|
|||||||
Reference in New Issue
Block a user