mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 16:46:52 +01:00
apply go fix for Go 1.26 (#1867)
* apply `go fix` for Go 1.26 This applies the `go fix` recommendations for go1.26 * for all of ./...
This commit is contained in:
1 parent
89178f45ba
commit
0dc8a28d1f
76 files changed
+80
-161
No files matched your search
+2
-5
@@ -294,10 +294,7 @@ func deliverSegments(r EncReader, from netip.AddrPort, payload []byte, segSize i
|
||||
return
|
||||
}
|
||||
for off := 0; off < len(payload); off += segSize {
|
||||
end := off + segSize
|
||||
if end > len(payload) {
|
||||
end = len(payload)
|
||||
}
|
||||
end := min(off+segSize, len(payload))
|
||||
r(from, payload[off:end:end])
|
||||
}
|
||||
}
|
||||
@@ -479,7 +476,7 @@ func NewUDPStatsEmitter(udpConns []Conn) func() {
|
||||
return func() {
|
||||
for i, gauges := range udpGauges {
|
||||
if err := udpConns[i].(*StdConn).getMemInfo(&meminfo); err == nil {
|
||||
for j := 0; j < unix.SK_MEMINFO_VARS; j++ {
|
||||
for j := range unix.SK_MEMINFO_VARS {
|
||||
gauges[j].Update(int64(meminfo[j]))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user