// User ... func User(c lars.Context) { ctx := c.(*MyContext) id := c.Param("id") var username string // username = ctx.AppContext.DB.find(user by id.....) ctx.AppContext.Log.Println("Found User") c.Response().Write([]byte("Welcome " + username + " with id " + id)) }
// UserProfile ... func UserProfile(c lars.Context) { ctx := c.(*MyContext) id := c.Param("id") var profile string // profile = ctx.AppContext.DB.find(user profile by .....) ctx.AppContext.Log.Println("Found User Profile") c.Response().Write([]byte("Here's your profile " + profile + " user " + id)) }
func route2a(ctx *lars.Context) { ctx.Response.Write([]byte("Route 2a " + ctx.Param("name"))) }