22 ms·
what did you use for view layer with Go? whatever I could gather looking at the Go ecosystem it seems you have to go with a JS framework for view layer and writ
by BilalBudhani 3y ago
what did you use for view layer with Go? whatever I could gather looking at the Go ecosystem it seems you have to go with a JS framework for view layer and write APIs in Go.
Rails' deep integration with view layer unlocks a great level of productivity.
- konart 3y ago> it seems you have to go with a JS framework for view layer and write APIs in Go Yes. Unless you are builing a static site.
- mortallywounded 3y agoI used Go's templates/html package. I simply converted Rails' ERB files into Go tmpl. It's not as pretty, but it works well.
- mozey 3y agoBesides the built-in templates/html, there's also this https://github.com/a-h/templ https://github.com/a-h/templ Haven't used it yet, but seems promising
- mozey 3y agoActually, just remembered why I haven't used it. Although it "Ships with IDE autocompletion", last time I checked that's only on the Go code, not the HTML. Usually I keep my templates as .html files, and find the IDE autocompletion and linter on the HTML more valuable