fix some typos

Former-commit-id: 338c7421e2cd49f558cf09d194fe42c4db701be1
This commit is contained in:
kataras 2017-08-24 15:51:43 +03:00
parent 5ffc7911cd
commit 8f7b5752f8
4 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ func main() {
// same as app.Handle("GET", "/ping", [...]) // same as app.Handle("GET", "/ping", [...])
// Method: GET // Method: GET
// Resource: http://context:8080/ping // Resource: http://localhost:8080/ping
app.Get("/ping", func(ctx context.Context) { app.Get("/ping", func(ctx context.Context) {
ctx.WriteString("pong") ctx.WriteString("pong")
}) })

View File

@ -67,7 +67,7 @@ type PingController struct {
// Get serves // Get serves
// Method: GET // Method: GET
// Resource: http://context:8080/ping // Resource: http://localhost:8080/ping
func (c *PingController) Get() { func (c *PingController) Get() {
c.Ctx.WriteString("pong") c.Ctx.WriteString("pong")
} }

View File

@ -24,7 +24,7 @@ func main() {
// Reload the templates on each request (development mode). // Reload the templates on each request (development mode).
app.RegisterView(view.HTML("./views", ".html").Reload(true)) app.RegisterView(view.HTML("./views", ".html").Reload(true))
// Regster custom handler for specific http errors. // Register custom handler for specific http errors.
app.OnErrorCode(iris.StatusInternalServerError, func(ctx context.Context) { app.OnErrorCode(iris.StatusInternalServerError, func(ctx context.Context) {
// .Values are used to communicate between handlers, middleware. // .Values are used to communicate between handlers, middleware.
errMessage := ctx.Values().GetString("error") errMessage := ctx.Values().GetString("error")

4
doc.go
View File

@ -71,7 +71,7 @@ Example code:
// Reload the templates on each request (development mode). // Reload the templates on each request (development mode).
app.RegisterView(iris.HTML("./views", ".html").Reload(true)) app.RegisterView(iris.HTML("./views", ".html").Reload(true))
// Regster custom handler for specific http errors. // Register custom handler for specific http errors.
app.OnErrorCode(iris.StatusInternalServerError, func(ctx context.Context) { app.OnErrorCode(iris.StatusInternalServerError, func(ctx context.Context) {
// .Values are used to communicate between handlers, middleware. // .Values are used to communicate between handlers, middleware.
errMessage := ctx.Values().GetString("error") errMessage := ctx.Values().GetString("error")
@ -748,7 +748,7 @@ Example Code
// Get serves // Get serves
// Method: GET // Method: GET
// Resource: http://context:8080/ping // Resource: http://localhost:8080/ping
func (c *PingController) Get() { func (c *PingController) Get() {
c.Ctx.WriteString("pong") c.Ctx.WriteString("pong")
} }