Content-Length: 85393 | pFad | http://gist.github.com/robertgro

3B robertgro’s gists · GitHub
Skip to content

Instantly share code, notes, and snippets.

@robertgro
robertgro / main.go
Last active February 16, 2021 14:29
Golang reflection to use in conjunction with sql package's rows.Scan() for any (nested) struct passed in as interface{}, please refer to the disclaimer within this file
package main
import (
"fmt"
"reflect"
)
// to be used in association with the golang sql package, rows.Scan()
// pass in any struct object/object slice you like and get appropriate results using reflection
// restriction: the sql query result's columns length must match the struct object fields length (len(rows.Columns(), fix your query)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://gist.github.com/robertgro

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy