Re:Ten Years of “Go: The Good, the Bad, and the Meh
by rowanseymour on Tuesday July 18, 2023 @04:01PM
(#36778332)
My example was a bit simplified but basically the function takes a SQL statement and a slice of structs that use db:column field tags. It's no more doing "weird reflection stuff" than say json.Marshal
If you are inserting an object, you should insert it, rather than create complicated generic insert methods that morph themselves based on the object being inserted. That is idiomatic Go.