Feature: Move and test unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})
#106
Labels
unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})
#106
Is your feature request related to a problem?
A lot of the deserialisation is happening via JSON, even for code that is already deserialised.
There is a non-json marshaller,
unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})
, in gorilla.go.It should be moved to a separate package (not protocol implementation related, not API related) and tested.
Describe the solution
Move the function
unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})
into a separate package.Test the funciton independently of protocol implementations.
Alternative methods
There could already be code that does this. It's important that we don't rely on translating
map[string]interface{}
into json and back into a golang struct though.SurrealDB version
1.0.0
Contact Details
[email protected] [email protected]
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: