about summary refs log tree commit diff stats
path: root/examples/simple/simple.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple/simple.go')
-rw-r--r--examples/simple/simple.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/simple/simple.go b/examples/simple/simple.go
index 93aa28f..0a7138a 100644
--- a/examples/simple/simple.go
+++ b/examples/simple/simple.go
@@ -1,3 +1,6 @@
+//go:build go1.18
+// +build go1.18
+
 package main
 
 import (
@@ -58,8 +61,8 @@ func Navbar(currentPath string, links []PageLink) g.Node {
 		Ul(
 			NavbarLink("/", "Home", currentPath),
 
-			g.Group(g.Map(len(links), func(i int) g.Node {
-				return NavbarLink(links[i].Path, links[i].Name, currentPath)
+			g.Group(g.Map(links, func(pl PageLink) g.Node {
+				return NavbarLink(pl.Path, pl.Name, currentPath)
 			})),
 		),