neugram / ng

scripting language integrated with Go
https://neugram.io
BSD 2-Clause "Simplified" License
916 stars 43 forks source link

ng/eval: properly wire through reflect.StructTag #211

Closed sbinet closed 6 years ago

sbinet commented 6 years ago

this fails in ng:

ng> type T struct { N string `json:"name"` }
ng> import "reflect"
ng> reflect.TypeOf(T{}).Field(0).Tag
""

whereas it should display:

ng> import "reflect"
ng> type T struct { N string `json:"name"` }
ng> reflect.TypeOf(T{}).Field(0).Tag
"json:\"name\""