htmgo/starter-template/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-13 17:13:01 +00:00
"github.com/maddalax/mhtml/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)),
)
}