After struggling, I finally solved it; playground <https://go.dev/play/p/w0OSFCX10Rx>
On Monday, November 21, 2022 at 10:55:06 AM UTC Mark wrote: > I have a two level general-purpose data structure: a struct containing one > or more slices of structs. > I want to be able to use reflection to populate this, but as a first step > I want to extract the > "table names" (i.e., the names of the fields of the outer struct), and the > "field names" (the names of each field in each of the inner structs). > Below is as far as I've got: it correctly finds the table names (including > their tag alternatives), but I can't work out how to access the field > names... > > playground <https://go.dev/play/p/lAxfwwD9x83> -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e2a46498-7f57-418f-a258-0868fa93f7a5n%40googlegroups.com.