Skip to content

Instantly share code, notes, and snippets.

View StarpTech's full-sized avatar

Dustin Deus StarpTech

View GitHub Profile
@StarpTech
StarpTech / funcAnalyse.go
Last active December 15, 2015 12:19
Fun with the reflection package to analyse any function.
package main
import (
"fmt"
"reflect"
"strconv"
)
@StarpTech
StarpTech / Javascript-execution-context.md
Last active December 14, 2015 17:49
Javascript execution-context
@StarpTech
StarpTech / getJSONVal.go
Last active December 14, 2015 05:29
Get nested JSON value dynamically by tail-recursion and type-assertions
package main
import (
"fmt"
)
func GetStructField(f interface{},path []string) interface{} {
rangeOver := f.( map[string]interface{})
counter := 0
maxLen := len(path)-1