diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 954fd74..bf59e4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: - uses: golangci/golangci-lint-action@v2 with: - version: v1.29 + version: v1.45.2 working-directory: src/github.com/containerd/go-runc args: --timeout=5m skip-go-installation: true diff --git a/.golangci.yml b/.golangci.yml index 4cef1ca..c2a64c2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,7 @@ linters: - unconvert - gofmt - goimports - - golint + - revive - ineffassign - vet - unused diff --git a/events.go b/events.go index ffc5436..0eca079 100644 --- a/events.go +++ b/events.go @@ -30,7 +30,7 @@ type Event struct { // Stats is statistical information from the runc process type Stats struct { - Cpu Cpu `json:"cpu"` //nolint:golint + Cpu Cpu `json:"cpu"` //revive:disable Memory Memory `json:"memory"` Pids Pids `json:"pids"` Blkio Blkio `json:"blkio"` @@ -78,7 +78,8 @@ type Throttling struct { } // CpuUsage represents the CPU usage statistics -type CpuUsage struct { //nolint:golint +//revive:disable-next-line +type CpuUsage struct { // Units: nanoseconds. Total uint64 `json:"total,omitempty"` Percpu []uint64 `json:"percpu,omitempty"` @@ -87,7 +88,8 @@ type CpuUsage struct { //nolint:golint } // Cpu represents the CPU usage and throttling statistics -type Cpu struct { //nolint:golint +//revive:disable-next-line +type Cpu struct { Usage CpuUsage `json:"usage,omitempty"` Throttling Throttling `json:"throttling,omitempty"` }