Handlers

Handlers

Handlers in gofh are functions that take a *gofh.Context and return a gofh.Element:

func homeHandler(c *gofh.Context) gofh.Element {
    return gofh.Div(
        gofh.H1("Welcome"),
        gofh.P("This is the home page"),
    )
}

Last updated