aboutsummaryrefslogtreecommitdiff
path: root/internal/scanner/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/scanner/filter.go')
-rw-r--r--internal/scanner/filter.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/scanner/filter.go b/internal/scanner/filter.go
new file mode 100644
index 0000000..c7e3c24
--- /dev/null
+++ b/internal/scanner/filter.go
@@ -0,0 +1,13 @@
+package scanner
+
+import "strings"
+
+// shouldSkipDir reports whether a directory should be skipped.
+func shouldSkipDir(name string) bool {
+ return strings.HasPrefix(name, ".") && name != "."
+}
+
+// shouldSkipFile reports whether a file should be skipped.
+func shouldSkipFile(name string) bool {
+ return strings.HasPrefix(name, ".")
+}