templatecheck
templatecheck copied to clipboard
handle reflect.Value
I was really excited to find this project. I gave it a test whirl and immediately ran into this:
template: REDACTED:10:49: checking "REDACTED" at <.Classes>: can't use field Classes in type reflect.Value
We make fairly extensive use of FuncMaps that return reflect.Values, generated by https://github.com/josharian/tstruct.
(And to be clear, the template in question works correctly at execution time. The reflect.Value in question holds a struct with a Classes field.)
https://github.com/josharian/tstruct/pull/5 mostly works around this problem.