htmgo/sandbox/pages/news.$id.go

15 lines
243 B
Go
Raw Normal View History

2024-09-11 00:52:18 +00:00
package pages
import (
"fmt"
"github.com/gofiber/fiber/v2"
2024-09-14 00:05:55 +00:00
"github.com/maddalax/htmgo/framework/h"
2024-09-11 00:52:18 +00:00
)
func Test(ctx *fiber.Ctx) *h.Page {
text := fmt.Sprintf("News ID: %s", ctx.Params("id"))
return h.NewPage(
h.Div(h.Text(text)),
)
}