review tests and fix AI found issues

This commit is contained in:
Quentin McGaw
2026-05-19 13:36:02 +00:00
parent 4a0e8afd3b
commit 5cd7bc7f74
5 changed files with 111 additions and 161 deletions
+2 -2
View File
@@ -91,14 +91,14 @@ func encodeBindData(addrType addrType, address string, port uint16) (
return data, nil
}
func bindDataLength(addrType addrType, address string) (maxLength int) {
func bindDataLength(addrType addrType, address string) (maxLength uint) {
maxLength++ // address type
switch addrType {
case ipv4:
maxLength += net.IPv4len
case domainName:
maxLength++ // domain name length
maxLength += len([]byte(address))
maxLength += uint(len([]byte(address)))
case ipv6:
maxLength += net.IPv6len
default: