From 1b757d99d847f3ece8564fd19a099a6f727a34f0 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Sun, 10 May 2015 08:22:49 -0700 Subject: [PATCH] Changed default port in examples Signed-off-by: Vishal Rana --- README.md | 2 +- examples/crud/server.go | 2 +- examples/hello/server.go | 2 +- examples/web/server.go | 2 +- router.go | 6 +++--- website/docs/guide.md | 2 +- website/docs/index.md | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 30cb84f5..b87006b5 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ func main() { e.Get("/", hello) // Start server - e.Run(":4444") + e.Run(":1323) } ``` diff --git a/examples/crud/server.go b/examples/crud/server.go index 905188e4..7de1b275 100644 --- a/examples/crud/server.go +++ b/examples/crud/server.go @@ -70,5 +70,5 @@ func main() { e.Delete("/users/:id", deleteUser) // Start server - e.Run(":4444") + e.Run(":1323") } diff --git a/examples/hello/server.go b/examples/hello/server.go index 24af7076..b704bbf1 100644 --- a/examples/hello/server.go +++ b/examples/hello/server.go @@ -23,5 +23,5 @@ func main() { e.Get("/", hello) // Start server - e.Run(":4444") + e.Run(":1323") } diff --git a/examples/web/server.go b/examples/web/server.go index 68cf1037..7affe32a 100644 --- a/examples/web/server.go +++ b/examples/web/server.go @@ -125,7 +125,7 @@ func main() { }) // Start server - e.Run(":4444") + e.Run(":1323") } func init() { diff --git a/router.go b/router.go index 332f69a5..7e68c8f9 100644 --- a/router.go +++ b/router.go @@ -298,10 +298,10 @@ func (r *router) Find(method, path string, ctx *Context) (h HandlerFunc, echo *E cn = c ctx.pvalues[n] = search search = "" // End search - } else { - // Not found - return + continue } + // Not found + return } } diff --git a/website/docs/guide.md b/website/docs/guide.md index e01bec2a..37b3e888 100644 --- a/website/docs/guide.md +++ b/website/docs/guide.md @@ -252,7 +252,7 @@ func main() { return &echo.HTTPError{Code: http.StatusUnauthorized} }) e.Get("/welcome", welcome) - e.Run(":4444") + e.Run(":1323") } func welcome(c *echo.Context) *echo.HTTPError { diff --git a/website/docs/index.md b/website/docs/index.md index 203648ab..c1567b20 100644 --- a/website/docs/index.md +++ b/website/docs/index.md @@ -74,7 +74,7 @@ func main() { e.Get("/", hello) // Start server - e.Run(":4444") + e.Run(":1323") } ``` @@ -95,7 +95,7 @@ whenever server receives an HTTP request at `/`, hello handler is called. In hello handler `c.String(http.StatusOK, "Hello, World!\n")` sends a text/plain HTTP response to the client with 200 status code. -`e.Run(":4444")` Starts HTTP server at network address `:4444`. +`e.Run(":1323")` Starts HTTP server at network address `:1323`. Now start the server using command @@ -103,7 +103,7 @@ Now start the server using command $ go run server.go ``` -Browse to [http://localhost:4444](http://localhost:4444) and you should see +Browse to [http://localhost:1323](http://localhost:1323) and you should see Hello, World! on the page. ### Next?