chore: apply go fix modernizers for Go 1.26#7098
Conversation
Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes #7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR applies Go 1.26 go fix/gofmt -s modernization in cli/azd, specifically adopting the iterator-based split pattern to reduce intermediate allocations when parsing command output on macOS.
Changes:
- Replace
bytes.Split+ slice iteration withbytes.SplitSeq+ iteratorrangein the Darwin agent detection process parsing logic.
You can also share your feedback on Copilot code review. Take the survey.
Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9d2b3b9 to
6e368f5
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: apply go fix modernizers for Go 1.26 Run `go fix ./...` and `gofmt -s -w .` to apply automated Go 1.26 modernizations across the cli/azd codebase. Fixes Azure#7082 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add Qwen to cspell dictionary Add "Qwen" (AI model family name) to the cspell word list to fix the pre-existing spell check failure in azure.ai.models extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: retrigger build --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Run
go fix ./...andgofmt -s -w .to apply automated Go 1.26 modernizations across thecli/azdcodebase.Changes
cli/azd/internal/runcontext/agentdetect/detect_process_darwin.gobytes.Split(output, sep)+for _, line := range lines→bytes.SplitSeq(output, sep)+for line := range lines[][]byteslice and is the standard Go 1.24+ iterator pattern[]bytevalues per split segmentValidation
go build ./...passesgo test ./cmd -run TestFigSpec|TestUsagepasses (no snapshot changes needed)Notes
interface{}→anyconversions in non-generated code were not auto-fixed bygo fix(they are in function signatures/comments that may need manual attention in a follow-up)Fixes #7082