1
1
mirror of https://github.com/wader/fq.git synced 2024-11-21 13:33:22 +03:00

go,lint: Update to go 1.22 and fix some lint warnings

This commit is contained in:
Mattias Wadman 2024-09-12 11:40:23 +02:00
parent 8d55f92ca0
commit 7b6d8532fd
4 changed files with 8 additions and 7 deletions

View File

@ -6,7 +6,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- goimports
- gosec
@ -25,6 +24,7 @@ linters:
- wastedassign
- staticcheck
- govet
- copyloopvar
linters-settings:
revive:
@ -54,11 +54,13 @@ linters-settings:
staticcheck:
checks: ["all"]
run:
timeout: 5m
skip-dirs:
issues:
exclude-dirs:
# allow md5
- dev
- doc
# ignore warnings in code from crypto/tls and zmap/zcrypto
- format/tls/tlsdecrypt
run:
timeout: 5m

View File

@ -244,7 +244,7 @@ apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing fq
### Build from source
Make sure you have [go](https://go.dev) 1.21 or later installed.
Make sure you have [go](https://go.dev) 1.22 or later installed.
To install directly from git repository (no git clone needed):
```sh

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/wader/fq
go 1.21
go 1.22
// fork of github.com/itchyny/gojq, see github.com/wader/gojq fq branch
require github.com/wader/gojq v0.12.1-0.20240822064856-a7688e3344e7

View File

@ -136,7 +136,6 @@ func TestWrite64(t *testing.T) {
{0b1, 1, []byte{0b0000_0000}, 7, []byte{0b0000_0001}},
}
for _, tC := range testCases {
tC := tC
t.Run(fmt.Sprintf("%d %d %s", tC.v, tC.nBits, hex.EncodeToString(tC.buf)), func(t *testing.T) {
bitio.Write64(tC.v, tC.nBits, tC.buf, tC.firstBit)
if !bytes.Equal(tC.expectedBuf, tC.buf) {