Skip to content

Commit

Permalink
fix:typo (#2975)
Browse files Browse the repository at this point in the history
  • Loading branch information
jincheng9 authored Dec 3, 2021
1 parent 0be805a commit 504ec59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ type Engine struct {
var _ IRouter = &Engine{}

// New returns a new blank Engine instance without any middleware attached.
// By default the configuration is:
// By default, the configuration is:
// - RedirectTrailingSlash: true
// - RedirectFixedPath: false
// - HandleMethodNotAllowed: false
Expand Down
6 changes: 3 additions & 3 deletions ginS/gins.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func SetHTMLTemplate(templ *template.Template) {
engine().SetHTMLTemplate(templ)
}

// NoRoute adds handlers for NoRoute. It return a 404 code by default.
// NoRoute adds handlers for NoRoute. It returns a 404 code by default.
func NoRoute(handlers ...gin.HandlerFunc) {
engine().NoRoute(handlers...)
}
Expand Down Expand Up @@ -118,7 +118,7 @@ func StaticFS(relativePath string, fs http.FileSystem) gin.IRoutes {
return engine().StaticFS(relativePath, fs)
}

// Use attaches a global middleware to the router. ie. the middlewares attached though Use() will be
// Use attaches a global middleware to the router. i.e. the middlewares attached though Use() will be
// included in the handlers chain for every single request. Even 404, 405, static files...
// For example, this is the right place for a logger or error management middleware.
func Use(middlewares ...gin.HandlerFunc) gin.IRoutes {
Expand All @@ -145,7 +145,7 @@ func RunTLS(addr, certFile, keyFile string) (err error) {
}

// RunUnix attaches to a http.Server and starts listening and serving HTTP requests
// through the specified unix socket (ie. a file)
// through the specified unix socket (i.e. a file)
// Note: this method will block the calling goroutine indefinitely unless an error happens.
func RunUnix(file string) (err error) {
return engine().RunUnix(file)
Expand Down

0 comments on commit 504ec59

Please sign in to comment.