func addTLVLen(cur []byte, tlvLen int) ([]byte, error) {
	if tlvLen == 0 {
		return cur, nil
	}
	curLen := binary.BigEndian.Uint16(cur)
	newLen := int(curLen) + tlvLen
	if newLen >= 1<<16 {
		return nil, errUint16Overflow
	}
	a := make([]byte, 2)
	binary.BigEndian.PutUint16(a, uint16(newLen))
	return a, nil
}
// addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow.
addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow.
// addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow .
func addTLVLen(cur []byte, tlvLen int) ([]byte, error) {
	if tlvLen == 0 {
		return cur, nil
	}
	curLen := binary.BigEndian.Uint16(cur)
	newLen := int(curLen) + tlvLen
	if newLen >= 1<<16 {
		return nil, errUint16Overflow
	}
	a := make([]byte, 2)
	binary.BigEndian.PutUint16(a, uint16(newLen))
	return a, nil
}
func addTLVLen ( cur [ ] byte , tlvLen int ) ( [ ] byte , error ) { if tlvLen == 0 { return cur , nil } curLen := binary . BigEndian . Uint16 ( cur ) newLen := int ( curLen ) + tlvLen if newLen >= 1 << 16 { return nil , errUint16Overflow } a := make ( [ ] byte , 2 ) binary . BigEndian . PutUint16 ( a , uint16 ( newLen ) ) return a , nil }
addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow.
addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow .