Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The reader was being read only once in the first iteration, and afterwards it was always empty, thus `parseCodeowners` was parsing an empty file. These were the metrics before the change: $ go test -benchmem -bench=. goos: darwin goarch: arm64 pkg: github.com/hairyhenderson/go-codeowners BenchmarkParseCodeowners-10 2677503 465.3 ns/op 4096 B/op 1 allocs/op PASS ok github.com/hairyhenderson/go-codeowners 2.255s After the change it's not showing more realistic data: $ go test -benchmem -bench=. goos: darwin goarch: arm64 pkg: github.com/hairyhenderson/go-codeowners BenchmarkParseCodeowners-10 31054 38910 ns/op 61424 B/op 641 allocs/op PASS ok github.com/hairyhenderson/go-codeowners 3.529s
- Loading branch information