Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use revive instead of golint #84

Merged
merged 1 commit into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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