Refactor string splitting in check.go and fsurls.go to use strings.SplitSeq for improved performance. Enhance debug output for .gitignore and .slinkignore file handling, providing clearer logging during file checks and reads.

This commit is contained in:
Luke Hagar
2025-09-13 01:49:22 +00:00
parent 2df17e8247
commit 211fafe931
2 changed files with 56 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ func init() {
// Parse targets: allow comma-separated chunks
var raw []string
for _, a := range args {
for _, part := range strings.Split(a, ",") {
for part := range strings.SplitSeq(a, ",") {
p := strings.TrimSpace(part)
if p != "" {
raw = append(raw, toSlash(p))
@@ -115,6 +115,7 @@ func init() {
}
merge(res, "", true)
}
// 2) Collect for each concrete root
for _, r := range roots {
clean := toSlash(filepath.Clean(r.path))