func JoinTLVs(tlvs []TLV) ([]byte, error) {
	var raw []byte
	for _, tlv := range tlvs {
		if len(tlv.Value) > math.MaxUint16 {
			return nil, fmt.Errorf("proxyproto: cannot format TLV %v with length %d", tlv.Type, len(tlv.Value))
		}
		var length [2]byte
		binary.BigEndian.PutUint16(length[:], uint16(len(tlv.Value)))
		raw = append(raw, byte(tlv.Type))
		raw = append(raw, length[:]...)
		raw = append(raw, tlv.Value...)
	}
	return raw, nil
}
// JoinTLVs joins multiple Type-Length-Value records.
JoinTLVs joins multiple Type-Length-Value records.
// JoinTLVs joins multiple Type - Length - Value records .
func JoinTLVs(tlvs []TLV) ([]byte, error) {
	var raw []byte
	for _, tlv := range tlvs {
		if len(tlv.Value) > math.MaxUint16 {
			return nil, fmt.Errorf("proxyproto: cannot format TLV %v with length %d", tlv.Type, len(tlv.Value))
		}
		var length [2]byte
		binary.BigEndian.PutUint16(length[:], uint16(len(tlv.Value)))
		raw = append(raw, byte(tlv.Type))
		raw = append(raw, length[:]...)
		raw = append(raw, tlv.Value...)
	}
	return raw, nil
}
func JoinTLVs ( tlvs [ ] TLV ) ( [ ] byte , error ) { var raw [ ] byte for _ , tlv := range tlvs { if len ( tlv . Value ) > math . MaxUint16 { return nil , fmt . Errorf ( " " , tlv . Type , len ( tlv . Value ) ) } var length [ 2 ] byte binary . BigEndian . PutUint16 ( length [ : ] , uint16 ( len ( tlv . Value ) ) ) raw = append ( raw , byte ( tlv . Type ) ) raw = append ( raw , length [ : ] ... ) raw = append ( raw , tlv . Value ... ) } return raw , nil }
JoinTLVs joins multiple Type-Length-Value records.
JoinTLVs joins multiple Type - Length - Value records .