コード例 #1
0
func helloHandler(ctx *weavebox.Context) error {
	return ctx.Text(http.StatusOK, "Hellos you v25")
}
コード例 #2
0
func adminGreetingHandler(ctx *weavebox.Context) error {
	name := ctx.Param("name")
	db := datastoreFromContext(ctx.Context)
	greeting := fmt.Sprintf("Greetings powerfull admin, %s\nYour database %s is ready", name, db.name)
	return ctx.Text(http.StatusOK, greeting)
}