summaryrefslogtreecommitdiff
path: root/internal/oi
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-02 10:46:00 +0300
committerPaul Buetow <paul@buetow.org>2024-10-02 10:46:00 +0300
commita93d91223724b94480b7166970ede97d8d190bdb (patch)
tree14e3552c5713d4a7b3d2602d8567ab11785c2906 /internal/oi
parentbc6a3e478a7e0efc12c30be9f74ef5c3ff7a63fb (diff)
refactor
Diffstat (limited to 'internal/oi')
-rw-r--r--internal/oi/oi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/oi/oi.go b/internal/oi/oi.go
index c6b569f..967109d 100644
--- a/internal/oi/oi.go
+++ b/internal/oi/oi.go
@@ -59,7 +59,6 @@ func TraverseDir(dir string, cb func(file os.DirEntry) error) error {
}
var errs []error
-
for _, file := range files {
if err := cb(file); err != nil {
errs = append(errs, err)
@@ -85,6 +84,7 @@ func ReadDirSlurp[T any](dir string, cb func(file os.DirEntry) (T, bool)) ([]T,
return results, nil
}
+// Rename to ReadDirRandom
func ReadDirRandomEntry[T any](dir string, cb func(file os.DirEntry) (T, bool)) (T, error) {
results, err := ReadDirSlurp(dir, cb)