Skip to content

Commit 2e979ca

Browse files
authored
Merge pull request #84 from pigletfly/fix-linter
Use revive instead of golint
2 parents 5042296 + 0aca84a commit 2e979ca

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
6666
- uses: golangci/golangci-lint-action@v2
6767
with:
68-
version: v1.29
68+
version: v1.45.2
6969
working-directory: src/github.com/containerd/go-runc
7070
args: --timeout=5m
7171
skip-go-installation: true

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ linters:
66
- unconvert
77
- gofmt
88
- goimports
9-
- golint
9+
- revive
1010
- ineffassign
1111
- vet
1212
- unused

events.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Event struct {
3030

3131
// Stats is statistical information from the runc process
3232
type Stats struct {
33-
Cpu Cpu `json:"cpu"` //nolint:golint
33+
Cpu Cpu `json:"cpu"` //revive:disable
3434
Memory Memory `json:"memory"`
3535
Pids Pids `json:"pids"`
3636
Blkio Blkio `json:"blkio"`
@@ -78,7 +78,8 @@ type Throttling struct {
7878
}
7979

8080
// CpuUsage represents the CPU usage statistics
81-
type CpuUsage struct { //nolint:golint
81+
//revive:disable-next-line
82+
type CpuUsage struct {
8283
// Units: nanoseconds.
8384
Total uint64 `json:"total,omitempty"`
8485
Percpu []uint64 `json:"percpu,omitempty"`
@@ -87,7 +88,8 @@ type CpuUsage struct { //nolint:golint
8788
}
8889

8990
// Cpu represents the CPU usage and throttling statistics
90-
type Cpu struct { //nolint:golint
91+
//revive:disable-next-line
92+
type Cpu struct {
9193
Usage CpuUsage `json:"usage,omitempty"`
9294
Throttling Throttling `json:"throttling,omitempty"`
9395
}

0 commit comments

Comments
 (0)