On Fri, May 21, 2021 at 2:38 PM Jay Adams <[email protected]> wrote: > > Is it possible to assign to struct fields where the field name is in a > variable? Any suggestions on how I get that to work? Thank you.
In Go this is done using type reflection. https://play.golang.org/p/7Wt8eczIeXO Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVSxH83OEhyQj4qxWCBs_X_4cTM-X5aqhXX7EtycoEM3A%40mail.gmail.com.
