Skip to content

Commit

Permalink
Use revive instead of golint
Browse files Browse the repository at this point in the history
Signed-off-by: Wang Bing <wangbing.adam@gmail.com>
  • Loading branch information
pigletfly committed Apr 21, 2022
1 parent 5042296 commit 0aca84a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linters:
- unconvert
- gofmt
- goimports
- golint
- revive
- ineffassign
- vet
- unused
Expand Down
8 changes: 5 additions & 3 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand All @@ -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"`
}
Expand Down

0 comments on commit 0aca84a

Please sign in to comment.