Skip to content

Commit

Permalink
Merge pull request #3884 from larvacea/go-lint
Browse files Browse the repository at this point in the history
Update linter, fix new warnings.
  • Loading branch information
larvacea authored Apr 10, 2024
2 parents 1e3c68e + 4a708f1 commit 507c21f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: actions/checkout@v4
- name: lint-host-ctr
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: latest
working-directory: sources/host-ctr
- name: lint-ecs-gpu-init
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: latest
working-directory: sources/ecs-gpu-init
3 changes: 2 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linters:

run:
timeout: 3m
skip-dirs:
issues:
exclude-dirs:
- vendor
- .gomodcache
6 changes: 3 additions & 3 deletions sources/host-ctr/cmd/host-ctr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func App() *cli.App {
Value: false,
},
},
Action: func(c *cli.Context) error {
Action: func(_ *cli.Context) error {
return runCtr(containerdSocket, namespace, containerID, source, superpowered, registryConfig, containerType(cType), useCachedImage)
},
},
Expand Down Expand Up @@ -191,7 +191,7 @@ func App() *cli.App {
Required: true,
},
},
Action: func(c *cli.Context) error {
Action: func(_ *cli.Context) error {
return cleanUp(containerdSocket, namespace, containerID)
},
},
Expand Down Expand Up @@ -980,7 +980,7 @@ func withSwapManagement(_ context.Context, _ oci.Client, _ *containers.Container

// withProxyEnv reads proxy environment variables and returns a spec option for passing said proxy environment variables
func withProxyEnv() oci.SpecOpts {
noOp := func(_ context.Context, _ oci.Client, _ *containers.Container, s *runtimespec.Spec) error { return nil }
noOp := func(_ context.Context, _ oci.Client, _ *containers.Container, _ *runtimespec.Spec) error { return nil }
httpsProxy, httpsProxySet := os.LookupEnv("HTTPS_PROXY")
noProxy, noProxySet := os.LookupEnv("NO_PROXY")
withHTTPSProxy := noOp
Expand Down

0 comments on commit 507c21f

Please sign in to comment.