Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit d27bda5

Browse files
committed
build: Update golangci-lint
* Replace goling with revive as the former is deprecated Signed-off-by: Chris Crone <[email protected]>
1 parent d543ef3 commit d27bda5

File tree

13 files changed

+14
-20
lines changed

13 files changed

+14
-20
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ linters:
1111
- gocyclo
1212
- gofmt
1313
- goimports
14-
- golint
14+
- revive
1515
- gosimple
1616
- govet
1717
- ineffassign

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# limitations under the License.
1717

1818
ARG GO_VERSION=1.16-alpine
19-
ARG GOLANGCI_LINT_VERSION=v1.39.0-alpine
19+
ARG GOLANGCI_LINT_VERSION=v1.40.1-alpine
2020
ARG PROTOC_GEN_GO_VERSION=v1.4.3
2121

2222
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS base

aci/convert/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func ContainerGroupToContainer(containerID string, cg containerinstance.Containe
347347
status := GetStatus(cc, cg)
348348
platform := string(cg.OsType)
349349

350-
var envVars map[string]string = nil
350+
var envVars map[string]string
351351
if cc.EnvironmentVariables != nil && len(*cc.EnvironmentVariables) != 0 {
352352
envVars = map[string]string{}
353353
for _, envVar := range *cc.EnvironmentVariables {

aci/convert/convert_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ func TestConvertContainerGroupStatus(t *testing.T) {
570570
}
571571

572572
func container(status *string) containerinstance.Container {
573-
var state *containerinstance.ContainerState = nil
573+
var state *containerinstance.ContainerState
574574
if status != nil {
575575
state = &containerinstance.ContainerState{
576576
State: status,
@@ -586,7 +586,7 @@ func container(status *string) containerinstance.Container {
586586
}
587587

588588
func group(status *string) containerinstance.ContainerGroup {
589-
var view *containerinstance.ContainerGroupPropertiesInstanceView = nil
589+
var view *containerinstance.ContainerGroupPropertiesInstanceView
590590
if status != nil {
591591
view = &containerinstance.ContainerGroupPropertiesInstanceView{
592592
State: status,

aci/convert/ports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func convertPortsToAci(service serviceConfigAciHelper) ([]containerinstance.Cont
5858
Protocol: groupProtocol,
5959
})
6060
}
61-
var dnsLabelName *string = nil
61+
var dnsLabelName *string
6262
if service.DomainName != "" {
6363
dnsLabelName = &service.DomainName
6464
}

aci/convert/registry_credentials.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func getRegistryCredentials(project compose.Project, helper registryHelper) ([]c
7070
return nil, err
7171
}
7272

73-
var cloudEnvironment *login.CloudEnvironment = nil
73+
var cloudEnvironment *login.CloudEnvironment
7474
if ce, err := loginService.GetCloudEnvironment(); err != nil {
7575
cloudEnvironment = &ce
7676
}

aci/e2e/aci_secrets_resources/web/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func main() {
4242
}
4343
}
4444

45-
var healthy bool = true
45+
var healthy = true
4646

4747
func fail(w http.ResponseWriter, req *http.Request) {
4848
healthy = false

aci/e2e/e2e-aci_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func TestContainerRunAttached(t *testing.T) {
385385

386386
// Used in subtests
387387
var (
388-
container string = "test-container"
388+
container = "test-container"
389389
endpoint string
390390
followLogsProcess *icmd.Result
391391
)

aci/login/login_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func TestNonstandardCloudEnvironment(t *testing.T) {
459459
},
460460
"resourceManager": "https://management.docker.com/"
461461
}]`)
462-
var metadataReqCount int32 = 0
462+
var metadataReqCount int32
463463
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
464464
_, err := w.Write(dockerCloudMetadata)
465465
assert.NilError(t, err)

cli/cmd/compose/run.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,5 @@ func startDependencies(ctx context.Context, backend compose.Service, project typ
220220
if err := backend.Create(ctx, &project, compose.CreateOptions{}); err != nil {
221221
return err
222222
}
223-
if err := backend.Start(ctx, &project, compose.StartOptions{}); err != nil {
224-
return err
225-
}
226-
return nil
223+
return backend.Start(ctx, &project, compose.StartOptions{})
227224
}

0 commit comments

Comments
 (0)