Skip to content

Commit 1b12abd

Browse files
authored
Merge pull request #61 from thaJeztah/update_ci
gha: update to go 1.17, update golangci-lint to v1.44, and gofmt
2 parents b5cb846 + 4b3f90d commit 1b12abd

17 files changed

+27
-15
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v2
1919
with:
20-
go-version: 1.16.x
20+
go-version: 1.17.x
2121
id: go
2222

2323
- name: Setup Go binary path
@@ -39,12 +39,10 @@ jobs:
3939
path: src/github.com/containerd/project
4040

4141
- name: Install dependencies
42-
env:
43-
GO111MODULE: off
4442
run: |
45-
go get -u github.com/vbatts/git-validation
46-
go get -u github.com/kunalkushwaha/ltag
47-
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.8
43+
go install github.com/vbatts/git-validation@latest
44+
go install github.com/kunalkushwaha/ltag@latest
45+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0
4846
4947
- name: Check DCO/whitespace/commit message
5048
env:

.golangci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
linters:
22
enable:
3-
- structcheck
4-
- varcheck
5-
- staticcheck
6-
- unconvert
73
- gofmt
84
- goimports
9-
- golint
105
- ineffassign
11-
- vet
12-
- unused
136
- misspell
7+
- revive
8+
- staticcheck
9+
- structcheck
10+
- unconvert
11+
- unused
12+
- varcheck
13+
- vet
1414
disable:
1515
- errcheck
1616

console.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func Current() (c Console) {
7878
}
7979

8080
// ConsoleFromFile returns a console using the provided file
81-
// nolint:golint
81+
// nolint:revive
8282
func ConsoleFromFile(f File) (Console, error) {
8383
if err := checkConsole(f); err != nil {
8484
return nil, err

console_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build linux
12
// +build linux
23

34
/*

console_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build linux || solaris || zos || freebsd
12
// +build linux solaris zos freebsd
23

34
/*

console_unix.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build darwin || freebsd || linux || netbsd || openbsd || solaris
12
// +build darwin freebsd linux netbsd openbsd solaris
23

34
/*

console_zos.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build zos
12
// +build zos
23

34
/*
@@ -32,7 +33,7 @@ func NewPty() (Console, string, error) {
3233
var f File
3334
var err error
3435
var slave string
35-
for i := 0;; i++ {
36+
for i := 0; ; i++ {
3637
ptyp := fmt.Sprintf("/dev/ptyp%04d", i)
3738
f, err = os.OpenFile(ptyp, os.O_RDWR, 0600)
3839
if err == nil {

pty_freebsd_cgo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build freebsd && cgo
12
// +build freebsd,cgo
23

34
/*

pty_freebsd_nocgo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build freebsd && !cgo
12
// +build freebsd,!cgo
23

34
/*

pty_unix.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build darwin || linux || netbsd || openbsd || solaris
12
// +build darwin linux netbsd openbsd solaris
23

34
/*

0 commit comments

Comments
 (0)