about summary refs log tree commit diff stats
path: root/components
diff options
context:
space:
mode:
authorMarkus Wüstenberg2024-06-26 10:32:46 +0200
committerGitHub2024-06-26 08:32:46 +0000
commit8b43a908820fb8c6b8a0f6d68d11bb2596a9e033 (patch)
treedfa2f4903ee64a225d35f5e7c7a3f0ba193a5bb7 /components
parenta79e6d9d10099c418846280ae4a4997e82f6efee (diff)
downloadgomponents-8b43a908820fb8c6b8a0f6d68d11bb2596a9e033.tar.lz
gomponents-8b43a908820fb8c6b8a0f6d68d11bb2596a9e033.tar.zst
gomponents-8b43a908820fb8c6b8a0f6d68d11bb2596a9e033.zip
Add links to godoc (#183)
Also add an example for `http.Adapt`.

Fixes #182
Diffstat (limited to 'components')
-rw-r--r--components/components.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/components.go b/components/components.go
index 379d18d..5e13684 100644
--- a/components/components.go
+++ b/components/components.go
@@ -10,7 +10,7 @@ import (
 	. "github.com/maragudk/gomponents/html"
 )
 
-// HTML5Props for HTML5.
+// HTML5Props for [HTML5].
 // Title is set no matter what, Description and Language elements only if the strings are non-empty.
 type HTML5Props struct {
 	Title       string
@@ -41,6 +41,7 @@ func HTML5(p HTML5Props) g.Node {
 // for which the corresponding map value is true.
 type Classes map[string]bool
 
+// Render satisfies [g.Node].
 func (c Classes) Render(w io.Writer) error {
 	var included []string
 	for c, include := range c {
@@ -56,7 +57,7 @@ func (c Classes) Type() g.NodeType {
 	return g.AttributeType
 }
 
-// String satisfies fmt.Stringer.
+// String satisfies [fmt.Stringer].
 func (c Classes) String() string {
 	var b strings.Builder
 	_ = c.Render(&b)