gnormal / gnorm

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

'index' func overwrites default 'index' #73

Open Etomyutikos opened 6 years ago

Etomyutikos commented 6 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 6 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