File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 15
15
before_install :
16
16
# install goreturns for linting
17
17
- go get -u github.com/sqs/goreturns
18
+ - go get -u golang.org/x/lint/golint
18
19
19
20
script :
20
21
- make lint
Original file line number Diff line number Diff line change 2
2
3
3
# Use Goreturns as a linter to pick up spacing formatting. Return exit code 1 if there are any errors
4
4
# Runs gofmt + goimports
5
-
5
+ # go returns
6
6
OUTPUT=" $( goreturns -d -e cmd/ pkg/) "
7
7
test -z " $OUTPUT " || (( >& 2 echo - e "$OUTPUT " "\ntry running 'make fmt'") && exit 1 )
8
+
9
+ # golint
10
+ golint -set_exit_status ./...
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ func (n *NodeGroup) setASGDesiredSizeOneShot(addCount int64) error {
349
349
DefaultTargetCapacityType : awsapi .String ("on-demand" ),
350
350
},
351
351
LaunchTemplateConfigs : []* ec2.FleetLaunchTemplateConfigRequest {
352
- & ec2. FleetLaunchTemplateConfigRequest {
352
+ {
353
353
LaunchTemplateSpecification : & ec2.FleetLaunchTemplateSpecificationRequest {
354
354
LaunchTemplateId : awsapi .String (n .config .AWSConfig .LaunchTemplateID ),
355
355
Version : awsapi .String (n .config .AWSConfig .LaunchTemplateVersion ),
@@ -378,7 +378,7 @@ func (n *NodeGroup) setASGDesiredSizeOneShot(addCount int64) error {
378
378
defer ticker .Stop ()
379
379
defer deadline .Stop ()
380
380
381
- // Escalator will block waiting for all nodes to become avaiable in this
381
+ // Escalator will block waiting for all nodes to become available in this
382
382
// node group for the maximum time specified in FleetInstanceReadyTimeout.
383
383
// This should typically be quite fast as it's just the time for the
384
384
// instance to boot and transition to ready state. The instance must be in
@@ -397,7 +397,7 @@ InstanceReadyLoop:
397
397
398
398
// The AttachInstances API only supports adding 20 instances at a time
399
399
batchSize := 20
400
- batch := make ( []* string , batchSize )
400
+ var batch []* string
401
401
for batchSize < len (instances ) {
402
402
instances , batch = instances [batchSize :], instances [0 :batchSize :batchSize ]
403
403
Original file line number Diff line number Diff line change 8
8
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
9
9
)
10
10
11
- // MockAutoscalingService is a mock implentation of a cloud provider interface
11
+ // MockAutoscalingService is a mock implementation of a cloud provider interface
12
12
type MockAutoscalingService struct {
13
13
autoscalingiface.AutoScalingAPI
14
14
* client.Client
You can’t perform that action at this time.
0 commit comments