Skip to content

Instantly share code, notes, and snippets.

@nsf
nsf / gist:eabc9018a4662c3f3ffc1a9209eacb6b
Last active May 19, 2019 07:16 — forked from williballenthin/gist:ee0335a6826ce55ece2d
Methods for fetching structure fields in Go (golang)
package main
import "log"
import "time"
import "reflect"
import "unsafe"
// suggested via http://stackoverflow.com/a/8363629/87207
func trace(s string) (string, time.Time) {
log.Println("START:", s)