Skip to content

chore(go): Use go fix to update golang usage, fixes #7963#8249

Merged
stasadev merged 2 commits into
ddev:mainfrom
rfay:20260323_rfay_go_fix
Mar 24, 2026
Merged

chore(go): Use go fix to update golang usage, fixes #7963#8249
stasadev merged 2 commits into
ddev:mainfrom
rfay:20260323_rfay_go_fix

Conversation

@rfay
Copy link
Copy Markdown
Member

@rfay rfay commented Mar 23, 2026

The Issue

Go 1.26 introduced an enhanced go fix tool that modernizes Go code idioms, notably replacing interface{} with any and other deprecated patterns throughout the codebase.

How This PR Solves The Issue

Ran go fix ./... against the entire codebase using Go 1.26, which automatically updated 77 files across cmd/ and pkg/. The primary change is replacing the older interface{} type alias with the modern any alias introduced in Go 1.18, which is now the idiomatic form. Additional minor modernizations were applied by go fix as well.

No functional changes — this is a purely mechanical transformation performed by the official Go toolchain.

Manual Testing Instructions

  1. Build: make
  2. Verify the binary works: .gotmp/bin/linux_amd64/ddev --version
  3. Run a subset of tests: go test -v ./pkg/ddevapp/ -run TestDdevStart

Automated Testing Overview

No new tests are needed. The existing test suite covers the changed code paths. CI will validate that all tests continue to pass after the mechanical refactor.

Release/Deployment Notes

No functional changes. This is a code modernization pass with no user-visible impact.

@rfay rfay requested a review from a team as a code owner March 23, 2026 20:37
@rfay rfay marked this pull request as draft March 23, 2026 20:37
@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to:

We can use modernize linter to basically do the same, I added it in 9083eb9 (this PR)

@stasadev stasadev marked this pull request as ready for review March 24, 2026 14:33
@stasadev stasadev merged commit 3bf054b into ddev:main Mar 24, 2026
9 checks passed
@stasadev stasadev deleted the 20260323_rfay_go_fix branch March 24, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up older go usage with go fix in go 1.26

2 participants