Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ concurrency:

permissions: read-all

env:
GOEXPERIMENT: loopvar

jobs:
test:
name: Test
Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ builds:
- -X main.commit={{.Commit}}
env:
- CGO_ENABLED=0
- GOEXPERIMENT=loopvar
goos:
- linux
- darwin
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
COVERAGE_DATA := coverage.out
COVERAGE_HTML := coverage.html

export GOEXPERIMENT := loopvar

help: ## Show the list of available tasks
@echo "Available Tasks:\n"
@grep -E '^[a-zA-Z_0-9%-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-10s %s\n", $$1, $$2}'
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/FollowTheProcess/gowc

go 1.21
go 1.22

require github.com/FollowTheProcess/test v0.9.0

Expand Down
2 changes: 1 addition & 1 deletion internal/count/count.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func All(files []string) (Results, error) {
// nWorkers is min of NumCPU and len(files) so we don't start more workers than
// is necessary (no point kicking off 8 workers to do 3 files for example)
nWorkers := min(runtime.NumCPU(), len(files))
for i := 0; i < nWorkers; i++ {
for range nWorkers {
wg.Add(1)
go worker(counts, jobs, &wg)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/count/count_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func BenchmarkCount(b *testing.B) {
r := bytes.NewReader(contents)

b.ResetTimer()
for i := 0; i < b.N; i++ {
for range b.N {
_, err := count.One(r, "bench")
if err != nil {
b.Fatalf("Count returned an error: %v", err)
Expand Down