Skip to content

Commit f43aa35

Browse files
committed
go 1.26, collaborators-only, cleanup
- upgrade to go 1.26 - replace modernize with go fix in Makefile - use range-over-methods in finder.go - add collaborators-only workflow - update gitignore
1 parent 0734410 commit f43aa35

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
call-go-workflow:
77
uses: psyb0t/reusable-github-workflows/.github/workflows/go-workflow.yml@master
88
with:
9-
go_version: "1.24.6"
9+
go_version: "1.26"
1010
dep_command: "make dep"
1111
lint_command: "make lint"
1212
test_command: "make test-coverage"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
build
33
*.html
44
*.txt
5+
CLAUDE.md
6+
git-update.sh

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ dep: ## Get project dependencies
1111

1212
lint: ## Lint all Golang files
1313
@echo "Linting all Go files..."
14-
@go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...
14+
@go fix ./...
1515
@go tool golangci-lint run --timeout=30m0s ./...
1616

17-
1817
lint-fix: ## Lint all Golang files and fix
1918
@echo "Linting all Go files..."
20-
@go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...
19+
@go fix ./...
2120
@go tool golangci-lint run --fix --timeout=30m0s ./...
2221

2322
test: ## Run all tests

finder.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,13 @@ func (f *Finder) typeImplementsInterface(namedType *types.Named) bool {
291291
foundMethods := make(map[string]bool)
292292

293293
// Add methods from both sets
294-
for i := 0; i < valueMethodSet.Len(); i++ {
295-
method := valueMethodSet.At(i)
294+
for method := range valueMethodSet.Methods() {
295+
method := method
296296
foundMethods[method.Obj().Name()] = true
297297
}
298298

299-
for i := 0; i < pointerMethodSet.Len(); i++ {
300-
method := pointerMethodSet.At(i)
299+
for method := range pointerMethodSet.Methods() {
300+
method := method
301301
foundMethods[method.Obj().Name()] = true
302302
}
303303

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/psyb0t/gofindimpl
22

3-
go 1.24.6
3+
go 1.26
44

55
tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint
66

0 commit comments

Comments
 (0)