gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
484 stars 39 forks source link

'index' func overwrites default 'index' #73

Open Etomyutikos opened 7 years ago

Etomyutikos commented 7 years ago

The strings.Index func added to the func map in environ/funcs.go overwrites the text/template index func, making some operations impossible.

natefinch commented 7 years ago

Hugo uses namespaces for functions. I think this is the right fix. Implementation looks like this:

https://play.golang.org/p/TIV-2BEO1o