Skip to content

Commit 5c9d48e

Browse files
committed
Update syscall and error definitions for various architectures in golang.org/x/sys/unix
- Added new syscall definitions related to LSM (Linux Security Module) for multiple architectures including 386, amd64, arm, arm64, loong64, mips, mips64, mips64le, ppc, ppc64, ppc64le, riscv64, s390x, and sparc64. - Updated error constants and structures in zerrors_linux files for consistency across architectures. - Enhanced support for new features in the Linux kernel by updating the syscall numbers and attributes in zsysnum_linux files. - Adjusted types and constants in ztypes_linux to reflect recent changes in the Linux networking stack. - Updated module dependencies in vendor/modules.txt to reflect the latest versions of testify and golang.org/x/exp packages.
1 parent f3331c2 commit 5c9d48e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+543
-106
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ updates:
1515
directory: "/" # Location of package manifests
1616
schedule:
1717
interval: "monthly"
18-
18+
# Maintain dependencies for Docker Compose
19+
- package-ecosystem: "docker-compose" # See documentation for possible values
20+
directory: "/" # Location of package manifests
21+
schedule:
22+
interval: "monthly"

.golangci.yml

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,81 @@
1+
version: "2"
12
run:
2-
timeout: 5m
3-
issues-exit-code: 1
4-
tests: true
5-
6-
modules-download-mode: vendor
7-
8-
# list of build tags, all linters use it. Default is empty list
93
build-tags:
104
- integration
11-
12-
# output configuration options
13-
output:
14-
# print lines of code with issue, default is true
15-
print-issued-lines: true
16-
17-
# print linter name in the end of issue text, default is true
18-
print-linter-name: true
19-
20-
uniq-by-line: false
21-
5+
modules-download-mode: vendor
6+
issues-exit-code: 1
7+
tests: true
228
linters:
23-
disable-all: true
9+
default: none
2410
enable:
25-
- gofmt
26-
- gosimple
27-
- unparam
28-
- goconst
29-
- prealloc
30-
- stylecheck
31-
- unconvert
32-
- unused
33-
- staticcheck
34-
- ineffassign
35-
- gosec
36-
- tparallel
37-
- whitespace
38-
- revive
39-
- godot
11+
- bodyclose
12+
- dogsled
13+
- dupword
14+
- durationcheck
15+
- errcheck
16+
- errchkjson
17+
- errname
4018
- errorlint
19+
- exhaustive
20+
- forcetypeassert
21+
- goconst
4122
- gocritic
42-
- errname
23+
- godot
24+
- goprintffuncname
25+
- gosec
4326
- govet
44-
- predeclared
27+
- ineffassign
28+
- makezero
4529
- nestif
46-
- exhaustive
47-
- tenv
48-
- gofumpt
49-
- forcetypeassert
5030
- nilerr
51-
- errcheck
52-
- bodyclose
53-
- goimports
54-
- durationcheck
55-
- errchkjson
56-
- sloglint
57-
- dupword
58-
- noctx
59-
- makezero
6031
- nilnil
32+
- noctx
33+
- nonamedreturns
34+
- perfsprint
35+
- prealloc
36+
- predeclared
37+
- protogetter
6138
- reassign
39+
- revive
40+
- rowserrcheck
6241
- sloglint
6342
- spancheck
64-
- testifylint
65-
- wastedassign
66-
- rowserrcheck
6743
- sqlclosecheck
68-
- goprintffuncname
44+
- staticcheck
45+
# - tagalign
6946
- testableexamples
70-
- wastedassign
71-
- nonamedreturns
72-
- perfsprint
73-
- dogsled
74-
- protogetter
47+
- testifylint
48+
- tparallel
49+
- unconvert
50+
- unparam
51+
- unused
7552
- usestdlibvars
76-
- testableexamples
77-
fast: false
78-
53+
- wastedassign
54+
- whitespace
55+
exclusions:
56+
generated: lax
57+
presets:
58+
- comments
59+
- common-false-positives
60+
- legacy
61+
- std-error-handling
62+
paths:
63+
- vendor
64+
- third_party$
65+
- builtin$
66+
- examples$
7967
issues:
80-
exclude-dirs:
81-
- vendor
8268
max-same-issues: 10
69+
uniq-by-line: false
70+
formatters:
71+
enable:
72+
- gofmt
73+
- gofumpt
74+
- goimports
75+
exclusions:
76+
generated: lax
77+
paths:
78+
- vendor
79+
- third_party$
80+
- builtin$
81+
- examples$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ fmtcheck:
2727

2828
.PHONY: lint
2929
lint: fmtcheck
30-
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint -v run
30+
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v2.0.2 golangci-lint -v run
3131

3232
.PHONY: deeplint
3333
deeplint: fmtcheck
34-
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint run --exclude-use-default=false --enable-all -D dupl --build-tags integration
34+
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v2.0.2 golangci-lint run --exclude-use-default=false --enable-all -D dupl --build-tags integration
3535

3636
.PHONY: deps-start
3737
deps-start:

examples/main.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ func main() {
5050

5151
setEnvVarCacheRetention()
5252
seedConsulAccessToken("currentaccesstoken")
53-
setRedisOpeningBalance(ctx, "1000")
53+
err := setRedisOpeningBalance(ctx, "1000")
54+
if err != nil {
55+
log.Printf("failed to set redis opening balance: %v", err)
56+
return
57+
}
5458

5559
cfg := config{}
5660

@@ -74,18 +78,24 @@ func main() {
7478
harvester.WithRedisMonitor(redisClient, 200*time.Millisecond),
7579
)
7680
if err != nil {
77-
log.Fatalf("failed to create harvester: %v", err)
81+
log.Printf("failed to create harvester: %v", err)
82+
return
7883
}
7984

8085
err = h.Harvest(ctx)
8186
if err != nil {
82-
log.Fatalf("failed to harvest configuration: %v", err)
87+
log.Printf("failed to harvest configuration: %v", err)
88+
return
8389
}
8490

8591
log.Println(cfg.String())
8692

8793
seedConsulAccessToken("newtaccesstoken")
88-
setRedisOpeningBalance(ctx, "2000")
94+
err = setRedisOpeningBalance(ctx, "2000")
95+
if err != nil {
96+
log.Printf("failed to set redis opening balance: %v", err)
97+
return
98+
}
8999

90100
time.Sleep(1 * time.Second) // Wait for the data to be updated async...
91101

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/beatlabs/harvester
22

3-
go 1.22.12
4-
5-
toolchain go1.24.1
3+
go 1.24
64

75
require (
86
github.com/hashicorp/consul/api v1.32.0
@@ -32,8 +30,8 @@ require (
3230
github.com/mitchellh/mapstructure v1.5.0 // indirect
3331
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
3432
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
35-
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
36-
golang.org/x/sys v0.29.0 // indirect
33+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
34+
golang.org/x/sys v0.31.0 // indirect
3735
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
3836
gopkg.in/yaml.v3 v3.0.1 // indirect
3937
)

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri
181181
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
182182
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
183183
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
184-
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
185-
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
186-
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
187-
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
184+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
185+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
186+
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
187+
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
188188
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
189189
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
190190
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -198,8 +198,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
198198
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
199199
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
200200
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
201-
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
202-
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
201+
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
202+
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
203203
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
204204
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
205205
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -218,13 +218,13 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
218218
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
219219
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
220220
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
221-
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
222-
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
221+
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
222+
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
223223
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
224224
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
225225
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
226-
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
227-
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
226+
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
227+
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
228228
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
229229
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
230230
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=

monitor/consul/watcher_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestWatch(t *testing.T) {
7171
default:
7272
assert.Fail(t, "key invalid", cng.Key())
7373
}
74-
assert.Positive(t, cng.Version())
74+
assert.Positive(t, cng.Version()) //nolint:testifylint
7575
}
7676
}
7777
}

seed/consul/getter_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestGetter_Get(t *testing.T) {
7070
} else {
7171
require.NoError(t, err)
7272
assert.Equal(t, tt.want, got)
73-
assert.GreaterOrEqual(t, version, uint64(0))
73+
assert.GreaterOrEqual(t, version, uint64(0)) //nolint:testifylint
7474
}
7575
})
7676
}

sync/sync_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestString_UnmarshalJSON(t *testing.T) {
138138
var b String
139139
err := b.UnmarshalJSON([]byte(`foo`))
140140
require.Error(t, err)
141-
assert.Equal(t, "", b.Get())
141+
assert.Empty(t, b.Get())
142142

143143
err = b.UnmarshalJSON([]byte(`"foo"`))
144144
require.NoError(t, err)
@@ -270,13 +270,13 @@ func TestRegexp_SetString(t *testing.T) {
270270

271271
func TestRegexp_String(t *testing.T) {
272272
sr := Regexp{}
273-
assert.Equal(t, "", sr.String())
273+
assert.Empty(t, sr.String())
274274
}
275275

276276
func TestRegexp_MarshalJSON(t *testing.T) {
277277
sr := Regexp{}
278278
json, err := sr.MarshalJSON()
279-
assert.Equal(t, []byte(`""`), json)
279+
assert.JSONEq(t, `""`, string(json))
280280
require.NoError(t, err)
281281
}
282282

@@ -293,7 +293,7 @@ func TestStringMap(t *testing.T) {
293293

294294
d, err := sm.MarshalJSON()
295295
require.NoError(t, err)
296-
assert.Equal(t, `{"key":"value"}`, string(d))
296+
assert.JSONEq(t, `{"key":"value"}`, string(d))
297297
}
298298

299299
func TestStringMap_SetString(t *testing.T) {

0 commit comments

Comments
 (0)