Skip to content

Commit 1671354

Browse files
committed
more lint fixes
1 parent a4ee11d commit 1671354

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/providers/v1/aws_sdk_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestComputeNoRetry(t *testing.T) {
5555
attemptCount := 0
5656
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
5757
fmt.Println("hit custom endpoint")
58-
attemptCount += 1
58+
attemptCount++
5959
// http code is a placeholder, error message is what's used by the retryer
6060
http.Error(w, nonRetryableError, http.StatusForbidden)
6161
}))
@@ -96,7 +96,7 @@ func TestComputeWithRetry(t *testing.T) {
9696
attemptCount := 0
9797
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
9898
fmt.Println("hit custom endpoint")
99-
attemptCount += 1
99+
attemptCount++
100100
// Request timeouts are generally retried (https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry)
101101
http.Error(w, "RequestTimeout", 500)
102102
}))

pkg/providers/v1/config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ func (cfg *CloudConfig) GetEC2EndpointOpts(region string) []func(*ec2.Options) {
229229
return opts
230230
}
231231

232+
// GetCustomEC2Resolver returns an endpoint resolver for EC2 Clients
232233
func (cfg *CloudConfig) GetCustomEC2Resolver() ec2.EndpointResolverV2 {
233234
return &EC2Resolver{
234235
Resolver: ec2.NewDefaultEndpointResolverV2(),
@@ -244,6 +245,7 @@ type EC2Resolver struct {
244245
Cfg *CloudConfig
245246
}
246247

248+
// ResolveEndpoint resolves the endpoint, overriding when custom configurations are set.
247249
func (r *EC2Resolver) ResolveEndpoint(
248250
ctx context.Context, params ec2.EndpointParameters,
249251
) (

0 commit comments

Comments
 (0)