←back to thread

113 points markusw | 1 comments | | HN request time: 0.244s | source

Hey everyone! I just released v1.0.0 of gomponents last week. It's an HTML component builder in pure Go, with a DSL-like HTML syntax. It's been 4 years in the making, and makes it really easy to build HTML in your web apps.
Show context
kubb ◴[] No.41878237[source]
I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand.

Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, but with gomponents.Ul, gomponents.Li, gomponents.Div everywhere.

replies(4): >>41878272 #>>41878351 #>>41880180 #>>41880321 #
1. js2 ◴[] No.41880321[source]
> (Some people don't like dot-imports, and luckily it's completely optional.)

You can rename imports to whatever you like, but the default name for the package that contains the HTML elements is `html`, not `gocomponents`.