Merge pull request #4609 from mxpv/linter
Enable linter checks on Windows
This commit is contained in:
commit
515133671b
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.go text eol=lf
|
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -20,13 +20,13 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, macos-10.15] # TODO: pass linters on 'windows-2019'
|
go-version: [1.15.2]
|
||||||
|
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- uses: actions/checkout@v2
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.2'
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
- name: Set env
|
- name: Set env
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -34,21 +34,9 @@ jobs:
|
|||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
- name: Checkout
|
- uses: golangci/golangci-lint-action@v2
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
with:
|
||||||
path: src/github.com/containerd/containerd
|
version: v1.29
|
||||||
|
|
||||||
- name: Install dev tools
|
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
shell: bash
|
|
||||||
run: script/setup/install-dev-tools
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
|
||||||
|
|
||||||
- name: Make check
|
|
||||||
shell: bash
|
|
||||||
run: make check
|
|
||||||
working-directory: src/github.com/containerd/containerd
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -106,11 +106,9 @@ func FetchTokenWithOAuth(ctx context.Context, client *http.Client, headers http.
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
|
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
|
||||||
if headers != nil {
|
|
||||||
for k, v := range headers {
|
for k, v := range headers {
|
||||||
req.Header[k] = append(req.Header[k], v...)
|
req.Header[k] = append(req.Header[k], v...)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
resp, err := ctxhttp.Do(ctx, client, req)
|
resp, err := ctxhttp.Do(ctx, client, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -152,11 +150,9 @@ func FetchToken(ctx context.Context, client *http.Client, headers http.Header, t
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if headers != nil {
|
|
||||||
for k, v := range headers {
|
for k, v := range headers {
|
||||||
req.Header[k] = append(req.Header[k], v...)
|
req.Header[k] = append(req.Header[k], v...)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
reqParams := req.URL.Query()
|
reqParams := req.URL.Query()
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ import (
|
|||||||
var (
|
var (
|
||||||
// check to make sure the *service implements the GRPC API
|
// check to make sure the *service implements the GRPC API
|
||||||
_ = (taskAPI.TaskService)(&service{})
|
_ = (taskAPI.TaskService)(&service{})
|
||||||
// common response type
|
|
||||||
empty = &ptypes.Empty{}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// New returns a new shim service
|
// New returns a new shim service
|
||||||
@ -121,7 +119,7 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (*task
|
|||||||
// Shutdown is called after the underlying resources of the shim are cleaned up and the service can be stopped
|
// Shutdown is called after the underlying resources of the shim are cleaned up and the service can be stopped
|
||||||
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
|
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
return empty, nil
|
return &ptypes.Empty{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stats returns container level system stats for a container and its processes
|
// Stats returns container level system stats for a container and its processes
|
||||||
|
Loading…
Reference in New Issue
Block a user