net/socks5: use new Go 1.19 binary.AppendByteOrder.AppendUintX

Updates #4872

Change-Id: I43db63d2ba237324bc1cd87d4261197f14cb1088
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/5306/head
Brad Fitzpatrick 2 years ago committed by Brad Fitzpatrick
parent b1fff4499f
commit 18109c63b0

@ -363,9 +363,7 @@ func (res *response) marshal() ([]byte, error) {
} }
pkt = append(pkt, addr...) pkt = append(pkt, addr...)
port := make([]byte, 2) pkt = binary.BigEndian.AppendUint16(pkt, uint16(res.bindPort))
binary.BigEndian.PutUint16(port, uint16(res.bindPort))
pkt = append(pkt, port...)
return pkt, nil return pkt, nil
} }

Loading…
Cancel
Save