Suppose that I have a struct d of some type Data. In Golang, I can easily marshall it to a string it using:
marshalled := fmt.Sprintf("%v", d)
but if I try to unmarshall it like this:
fmt.Sscanf(marshalled, "%v", &d)
I get an error:
can't scan type: *Data
Question: How can I parse a string to my struct without writing a custom Lexer/Parser? I'd prefer not to use encoding/json too.