Repository navigation
refactor(aws): finish pkg/aws split — EFS/pricing out of client.go (#325) - #357
Merged
Merged
Conversation
Finish the pkg/aws god-package split begun in #336. GetEFSDNSName moves to efs.go; LookupEC2OnDemandPrice and its regionToLocationName map move to pricing.go (the map is only used by that function). Same-package move — all callers and the exported API are unchanged. client.go drops from 1350 to 1251 LOC of cohesive client/launch/lifecycle code. Closes #325.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Finishes the
pkg/awsgod-package split started in #336.What
GetEFSDNSName→ newpkg/aws/efs.goLookupEC2OnDemandPrice+ itsregionToLocationNamemap → newpkg/aws/pricing.go(the map is used only by that function, so it moves with it)encoding/json,strconv,awspricing,pricingtypesimports fromclient.goWhy
The audit (#328) flagged
client.goas an oversized grab-bag. #336 already extracted iam/securitygroup/tags/cleanup; this moves the last EFS + pricing tail soclient.gois a cohesive client/launch/lifecycle core (1350 → 1251 LOC).Safety
Same-package move — every
package awsfile, so all callers and the exported API (aws.GetEFSDNSName,aws.LookupEC2OnDemandPrice) are byte-for-byte unchanged. No behavior change.go build ./...cleango test ./pkg/awsgreen (incl.TestBuildInlinePolicycount assertion, unaffected)gofmt/go vetcleanCloses #325.