Skip to content

Commit

Permalink
lint: bump golangci-lint to v1.59.1 and fix new warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Vasilev <[email protected]>
  • Loading branch information
Omrigan committed Jul 9, 2024
1 parent b5ba2a9 commit 3b19cc5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
# Required: the version of golangci-lint is required and
# should be specified with patch version.
version: v1.58.1
version: v1.59.1
args: --timeout 5m
github-token: ${{ secrets.github_token }}
# caching issues, see: https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052190775
Expand Down
2 changes: 2 additions & 0 deletions neonvm/apis/neonvm/v1/virtualmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,10 @@ func (m MilliCPU) MarshalJSON() ([]byte, error) {
func (m MilliCPU) Format(state fmt.State, verb rune) {
switch {
case verb == 'v' && state.Flag('#'):
//nolint:errcheck // can't do anything about the write error
state.Write([]byte(fmt.Sprintf("%v", uint32(m))))
default:
//nolint:errcheck // can't do anything about the write error
state.Write([]byte(fmt.Sprintf("%v", m.AsFloat64())))
}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ func (b Bytes) MarshalJSON() ([]byte, error) {
func (b Bytes) Format(state fmt.State, verb rune) {
switch {
case verb == 'v' && state.Flag('#'):
//nolint:errcheck // can't do anything about the write error
state.Write([]byte(fmt.Sprintf("%v", uint64(b))))
default:
//nolint:errcheck // can't do anything about the write error
state.Write([]byte(b.ToResourceQuantity().String()))
}
}
Expand Down

0 comments on commit 3b19cc5

Please sign in to comment.