From f83cdb357e985369231632e39ea6df8639a578e1 Mon Sep 17 00:00:00 2001 From: Barnabus Date: Mon, 5 Nov 2018 11:13:17 +1000 Subject: [PATCH] Fix typos (#1625) --- docs/how-to-build-an-effective-middleware.md | 4 ++-- .../realtime-advanced/resources/room_login.templ.html | 4 ++-- ginS/gins.go | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/how-to-build-an-effective-middleware.md b/docs/how-to-build-an-effective-middleware.md index db04428c..568d5720 100644 --- a/docs/how-to-build-an-effective-middleware.md +++ b/docs/how-to-build-an-effective-middleware.md @@ -4,9 +4,9 @@ The middleware has two parts: - - part one is what is executed once, when you initalize your middleware. That's where you set up all the global objects, logicals etc. Everything that happens one per application lifetime. + - part one is what is executed once, when you initialize your middleware. That's where you set up all the global objects, logicals etc. Everything that happens one per application lifetime. - - part two is what executes on every request. For example, a database middleware you simply inject your "global" database object into the context. Once it's inside the context, you can retrieve it from within other middlewares and your handler furnction. + - part two is what executes on every request. For example, a database middleware you simply inject your "global" database object into the context. Once it's inside the context, you can retrieve it from within other middlewares and your handler function. ```go func funcName(params string) gin.HandlerFunc { diff --git a/examples/realtime-advanced/resources/room_login.templ.html b/examples/realtime-advanced/resources/room_login.templ.html index d4991d8d..56153488 100644 --- a/examples/realtime-advanced/resources/room_login.templ.html +++ b/examples/realtime-advanced/resources/room_login.templ.html @@ -49,7 +49,7 @@
  • W3 Standard
  • Browser Support
  • Gin Framework
  • -
  • Github
  • +
  • GitHub
  • @@ -59,7 +59,7 @@

    Server-Sent Events in Go

    Server-sent events (SSE) is a technology where a browser receives automatic updates from a server via HTTP connection. It is not websockets. Learn more.

    -

    The chat and the charts data is provided in realtime using the SSE implemention of Gin Framework.

    +

    The chat and the charts data is provided in realtime using the SSE implementation of Gin Framework.

    diff --git a/ginS/gins.go b/ginS/gins.go index 04cf131c..0f08645a 100644 --- a/ginS/gins.go +++ b/ginS/gins.go @@ -47,8 +47,8 @@ func NoMethod(handlers ...gin.HandlerFunc) { engine().NoMethod(handlers...) } -// Group creates a new router group. You should add all the routes that have common middlwares or the same path prefix. -// For example, all the routes that use a common middlware for authorization could be grouped. +// Group creates a new router group. You should add all the routes that have common middlewares or the same path prefix. +// For example, all the routes that use a common middleware for authorization could be grouped. func Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup { return engine().Group(relativePath, handlers...) } @@ -127,21 +127,21 @@ func Use(middlewares ...gin.HandlerFunc) gin.IRoutes { // Run : The router is attached to a http.Server and starts listening and serving HTTP requests. // It is a shortcut for http.ListenAndServe(addr, router) -// Note: this method will block the calling goroutine undefinitelly unless an error happens. +// Note: this method will block the calling goroutine indefinitely unless an error happens. func Run(addr ...string) (err error) { return engine().Run(addr...) } // RunTLS : The router is attached to a http.Server and starts listening and serving HTTPS requests. // It is a shortcut for http.ListenAndServeTLS(addr, certFile, keyFile, router) -// Note: this method will block the calling goroutine undefinitelly unless an error happens. +// Note: this method will block the calling goroutine indefinitely unless an error happens. func RunTLS(addr, certFile, keyFile string) (err error) { return engine().RunTLS(addr, certFile, keyFile) } // RunUnix : The router is attached to a http.Server and starts listening and serving HTTP requests // through the specified unix socket (ie. a file) -// Note: this method will block the calling goroutine undefinitelly unless an error happens. +// Note: this method will block the calling goroutine indefinitely unless an error happens. func RunUnix(file string) (err error) { return engine().RunUnix(file) }