// Get implements the GET handler with optional name parameter func (h *HelloV2) Get(c *yarf.Context) error { name := c.Param("name") salute := "(v2) Hello" if name != "" { salute += ", " + name } salute += "!" c.Render(salute) return nil }
func (y *YarfParam) Get(c *yarf.Context) error { c.Render("Hello, " + c.Param("name")) return nil }
func (y *YarfMulti) Get(c *yarf.Context) error { c.Render("Hello " + c.Param("name1") + "," + c.Param("name2") + "," + c.Param("name3") + "," + c.Param("name4")) return nil }