Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
)
func GetStructField(f interface{},path []string) interface{} {
rangeOver := f.( map[string]interface{})
counter := 0
maxLen := len(path)-1
@bom-d-van
bom-d-van / gist:2794506
Created May 26, 2012 16:24 — forked from chad/gist:76951
How to find out where a method comes from.
# How to find out where a method comes from.
# Learned this from Dave Thomas while teaching Advanced Ruby Studio
# Makes the case for separating method definitions into
# modules, especially when enhancing built-in classes.
module Perpetrator
def crime
end
end
class Fixnum