Documentation
¶
Overview ¶
Package agdprotobuf contains protobuf utils.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteSlicesToIPs ¶
ByteSlicesToIPs converts a slice of byte slices into a slice of netip.Addrs.
func IPToBytes ¶
IPToBytes is a wrapper around netip.Addr.MarshalBinary that ignores the always-nil error.
func IPsToByteSlices ¶
IPsToByteSlices is a wrapper around netip.Addr.MarshalBinary that ignores the always-nil errors.
func UnsafelyConvertStrSlice ¶
func UnsafelyConvertStrSlice[T1, T2 ~string](s []T1) (res []T2)
UnsafelyConvertStrSlice checks if []T1 can be converted to []T2 at compile time and, if so, converts the slice using package unsafe.
Slices resulting from this conversion must not be mutated. TODO(f.setrakov): Generalize.
func UnsafelyConvertUint32Slice ¶
func UnsafelyConvertUint32Slice[T1, T2 ~uint32](s []T1) (res []T2)
UnsafelyConvertUint32Slice checks if []T1 can be converted to []T2 at compile time and, if so, converts the slice using package unsafe.
Slices resulting from this conversion must not be mutated.
Types ¶
This section is empty.