plenc
plenc copied to clipboard
Go encoding based on protobuf, but hopefully easier to deal with
Using this code: ~~~go package main import ( "fmt" "github.com/philpearl/plenc" ) type UserField struct { Key string `plenc:"1"` } type header struct { UserFields []UserField `plenc:"6"` } func main() {...
Slices of slices of strings & slices of slices of structs don't work. Slices of slices of ints and floats are OK
https://github.com/philpearl/plenc/blob/9ec99c56f55e6831675d1d8abf392d89efcac4c9/plenccodec/unsafetricks.go#L20-L34 this is explicitly an anti pattern and discouraged by the Go team https://github.com/golang/go/issues/67401
We're expecting a change to Go maps in 1.24. This may cause us some issues. So here we've converted the map code to use reflection, which should work unchanged. This...