🧹 Modernize arista and network providers with Go idioms#6891
Merged
Conversation
Contributor
Test Results5 481 tests 5 477 ✅ 2m 4s ⏱️ Results for commit d26bb1a. ♻️ This comment has been updated with latest results. |
Use strings.Builder for string concatenation, errgroup.Go() instead of manual Add/Done, maps.Copy for map merging, and remove redundant +build tag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use separate WriteByte/WriteString calls instead of concatenating strings inside WriteString, per review feedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sync.WaitGroup has no Go() method. Switch to errgroup.Group which provides the Go(func() error) API the code expects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
03b10e7 to
2d7eb52
Compare
errgroup doesn't fit here: closures collect multiple errors via multierr.Errors, not fail-fast. Keep sync.WaitGroup with proper Add(1)/go func()/defer Done() pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
strings.Builderinstead of string concatenation in aristaGetSectionand networkhttpHeaderContentType.id()errgroup.Go()instead of manualAdd(1)/go func()/defer Done()in dnsshake and tlsshakemaps.Copyinstead of manual for-range loops in tlsshake cipher init// +build debugtesttag (Go 1.17+ only needs//go:build)Test plan
make test/lintpassesgo test ./providers/arista/...passesgo test ./providers/network/...passes🤖 Generated with Claude Code