You would like to define a Golang function which accepts different types (or structs) and take different actions depending on your input. This is very similar to the "visitor design pattern"
Inserting, reading, and updating JSON data in postgres using Golang GORM
This is a "Frankenstein" approach which worked well using a combination of methods found online (see references). On their own, each approach had a limitation, but together they ticked all the boxes. Assuming you have the following table defined as a struct within you Go program: type User struct { Name string Email string Attributes … Continue reading Inserting, reading, and updating JSON data in postgres using Golang GORM
You must be logged in to post a comment.