lnd/tlv
Olaoluwa Osuntokun 78e0e5ac5d
tlv: add new Zero method on RecordT
In this commit, we add a new `Zero` method for the `RecordT` type. This
method allows a caller to create the zero record for a type without
needing to reference the actual TLV type.

With this we go from this:
```go
sig1 := tlv.ZeroRecordT[tlv.TlvType1, Sig]()
```

To this:
```
sig1 := c.CloserNoClosee.Zero()
```
2024-02-02 17:31:06 -08:00
..
internal/gen tlv: make TlvType method for TlvType interface public 2024-01-02 18:51:33 -08:00
fuzz_test.go tlv: Added bool to primitive 2023-10-16 14:21:25 +01:00
go.mod tlv: add new RecordT[T, V] utility type 2023-12-12 17:47:10 -08:00
go.sum tlv: add new RecordT[T, V] utility type 2023-12-12 17:47:10 -08:00
primitive_test.go tlv: Added bool to primitive 2023-10-16 14:21:25 +01:00
primitive.go tlv: simplify encoding functions 2023-11-13 11:30:17 -06:00
record_test.go tlv: remove unused error return value 2019-12-04 13:27:29 +01:00
record_type_test.go tlv: modify RecordT type to ensure type param takes precedence 2024-01-02 18:51:30 -08:00
record_type.go tlv: add new Zero method on RecordT 2024-02-02 17:31:06 -08:00
record.go tlv: Added bool to primitive 2023-10-16 14:21:25 +01:00
stream_test.go tlv: allow tlv streams to use large records in non-p2p setting 2022-09-14 15:48:13 -04:00
stream.go tlv: allow tlv streams to use large records in non-p2p setting 2022-09-14 15:48:13 -04:00
tlv_test.go tlv: allow tlv streams to use large records in non-p2p setting 2022-09-14 15:48:13 -04:00
tlv_type_param.go tlv: make TlvType method for TlvType interface public 2024-01-02 18:51:33 -08:00
tlv_types_generated.go tlv: make TlvType method for TlvType interface public 2024-01-02 18:51:33 -08:00
truncated_test.go tlv: simplify byte slice comparison as recommenteded by static analysis 2020-04-24 19:15:08 +02:00
truncated.go tlv: simplify encoding functions 2023-11-13 11:30:17 -06:00
varint_test.go tlv: simplify byte slice comparison as recommenteded by static analysis 2020-04-24 19:15:08 +02:00
varint.go tlv+record+routing: add payload size calculation 2019-12-20 11:00:01 +01:00