I mean, vue have this file extension '.vue' where you can write raw HTML in it and it will be auto-compiled to javascript syntax with the help of webpack or browserify. So, why not make one too in GO? It will be much easier to see, than seeing the HTML wrapped with the single quote. Maybe like '.gox' or something?
Thanks.
Oh, yes. Actually a project that does JSX style Go exists (and uses .gox), but the reason I don't like this is that it's more complex and will pollute your files with .go and .gox files. This might be acceptable for JavaScript project, but I don't find it acceptable. What's more common in Go is to have separate template files, and that's easy to do here.
With Vecty if the HTML for a component is simple enough to not warrant a separate file then you can use the functional builder API that it currently comes with.
I mean, vue have this file extension '.vue' where you can write raw HTML in it and it will be auto-compiled to javascript syntax with the help of webpack or browserify. So, why not make one too in GO? It will be much easier to see, than seeing the HTML wrapped with the single quote. Maybe like '.gox' or something?
Thanks.
Oh, yes. Actually a project that does JSX style Go exists (and uses .gox), but the reason I don't like this is that it's more complex and will pollute your files with .go and .gox files. This might be acceptable for JavaScript project, but I don't find it acceptable. What's more common in Go is to have separate template files, and that's easy to do here.
With Vecty if the HTML for a component is simple enough to not warrant a separate file then you can use the functional builder API that it currently comes with.
Check out
vueg
which usesgo generate
to achieve this.github.com/norunners/vueg
I developed somethings like Jsx for go with Gox name :
github.com/pejman-hkh/gdp/tree/mai...