This repository is being archived. Point readers at the standard-library or community package that replaces it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
630 B
Markdown
26 lines
630 B
Markdown
> [!IMPORTANT]
|
|
> **This repository is archived and no longer maintained.**
|
|
>
|
|
> It re-implements directory walking that the standard library now provides,
|
|
> and handles fewer edge cases.
|
|
>
|
|
> **Use instead:**
|
|
> - Standard library [`io/fs.WalkDir`](https://pkg.go.dev/io/fs#WalkDir).
|
|
> - [`github.com/bmatcuk/doublestar/v4`](https://github.com/bmatcuk/doublestar) for `**` glob and ignore-pattern matching.
|
|
|
|
---
|
|
|
|
# Sqan
|
|
|
|
A simple package to help scan files in a directory.
|
|
|
|
```go
|
|
s := NewScanner("my/dir").
|
|
WithExtensions("md", "txt").
|
|
WithIgnorePatterns("**/.private/**")
|
|
|
|
for file := range s.Scan() {
|
|
fmt.Println(file)
|
|
}
|
|
```
|