Skip to content

Commit

Permalink
Merge pull request #10 from javauser2012/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
leeqvip authored Dec 26, 2020
2 parents fa3d498 + 214903e commit a5a0b79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ func main() {
th.RegisterRoute(func(route *think.Route) {

route.Get("/", func(req *think.Req) *think.Res {
return thinkgo.Text("Hello ThinkGo !")
return think.Text("Hello ThinkGo !")
})

route.Get("/ping", func(req *think.Req) *think.Res {
return thinkgo.Json(map[string]string{
return think.Json(map[string]string{
"message": "pong",
})
})

// Dependency injection
route.Get("/user/{name}", func(req *think.Req, name string) *think.Res {
return thinkgo.Text(fmt.Sprintf("Hello %s !", name))
return think.Text(fmt.Sprintf("Hello %s !", name))
})
})
// listen and serve on 0.0.0.0:9011
Expand Down

0 comments on commit a5a0b79

Please sign in to comment.