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

15 lines
245 B
Go
Raw Normal View History

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