Show HN: gomponents, HTML components in pure Go
gomponents.com
I’ve built gomponents over the past couple of years because I wasn’t satisfied with using templating languages in Go.
In particular, it was really hard to pass data around when using stdlib html/template, and it just didn’t sit right with me.
Using just Go, you get so much for free from the language, and building HTML components becomes much easier, I think.
The way you use it basically looks like using a DSL, but it’s not! It’s using the often-disliked but occasionally useful dot import mechanism of the language. This way, there’s full autocompletion built right in if your editor supports Go.
Anyhoo, I hope you find some use in it. I know a lot of people already do. :) Enjoy!
PS: There's gomponents-htmx as well. The two work really well together.