#1714·go-tools

Check append forms of binary.ByteOrder

Author: ainar-gCreated Apr 21, 2026Updated Apr 21, 2026
Labelsneeds-decisionfalse-negative
go
var b []byte
u := uint16(0x1234)
binary.BigEndian.AppendUint16(b, u)

staticcheck 2026.1 (v0.7.0) doesn't complain about the missed result from AppendUint16. It should be:

go
b = binary.BigEndian.AppendUint16(b, u)