1 2 3 4 5 6 7 8
func decodeNodeContext(ctxJSON *C.char) {{ context_type }} { var ctx {{ context_type }} if ctxJSON == nil { return ctx } _ = json.Unmarshal([]byte(C.GoString(ctxJSON)), &ctx) return ctx }