Introduction to htmgo
masterhtmgo is a lightweight, pure Go framework designed to build interactive websites and web applications using Go and htmx. It allows developers to create fast, interactive sites using hypermedia attributes wrapped in Go code, minimizing the need for manual JavaScript. A key benefit is that the entire application compiles into a single deployable binary.
func IndexPage(ctx *h.RequestContext) *h.Page {
now := time.Now()
return h.NewPage(
h.Div(
h.Class("flex gap-2"),
h.TextF("the current time is %s", now.String())
)
)
}