Created
February 21, 2017 08:16
-
-
Save simt2/4366d7db80ce7c40bce3badc7999582d to your computer and use it in GitHub Desktop.
mesh-go-example LoadChildren.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LoadChildren takes a nodes uuid and returns its children. | |
func LoadChildren(uuid string) *[]gjson.Result { | |
r := MeshGetRequest("demo/nodes/" + uuid + "/children?expandAll=true&resolveLinks=short") | |
defer r.Body.Close() | |
bytes, _ := ioutil.ReadAll(r.Body) | |
json := gjson.ParseBytes(bytes).Get("data").Array() | |
return &json | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment