diff --git a/container.go b/container.go index dd56246d..6cd59919 100644 --- a/container.go +++ b/container.go @@ -216,7 +216,7 @@ func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.R } }() - // Instal panic recovery unless told otherwise + // Install panic recovery unless told otherwise if !c.doNotRecover { // catch all for 500 response defer func() { if r := recover(); r != nil { diff --git a/curly.go b/curly.go index 6fd2bcd5..0f8badf9 100644 --- a/curly.go +++ b/curly.go @@ -119,7 +119,7 @@ func (c CurlyRouter) regularMatchesPathToken(routeToken string, colon int, reque var jsr311Router = RouterJSR311{} -// detectRoute selectes from a list of Route the first match by inspecting both the Accept and Content-Type +// detectRoute selects from a list of Route the first match by inspecting both the Accept and Content-Type // headers of the Request. See also RouterJSR311 in jsr311.go func (c CurlyRouter) detectRoute(candidateRoutes sortableCurlyRoutes, httpRequest *http.Request) (*Route, error) { // tracing is done inside detectRoute diff --git a/curly_route.go b/curly_route.go index 403dd3be..c3a9b373 100644 --- a/curly_route.go +++ b/curly_route.go @@ -43,7 +43,7 @@ func (s sortableCurlyRoutes) Less(i, j int) bool { if a.staticCount > b.staticCount { return false } - // secundary key + // secondary key if a.paramCount < b.paramCount { return true } diff --git a/examples/form-httpin/restful-form-handling-by-httpin.go b/examples/form-httpin/restful-form-handling-by-httpin.go index ce41f55f..ada20817 100644 --- a/examples/form-httpin/restful-form-handling-by-httpin.go +++ b/examples/form-httpin/restful-form-handling-by-httpin.go @@ -19,7 +19,7 @@ import ( // - JSON/XML request body // - URL path variables // - file uploads - // by defining an input struct and composing fileds struct tags + // by defining an input struct and composing fields struct tags "github.com/ggicci/httpin" ) diff --git a/examples/nocache/restful-no-cache-filter.go b/examples/nocache/restful-no-cache-filter.go index a9b24060..ff489b84 100644 --- a/examples/nocache/restful-no-cache-filter.go +++ b/examples/nocache/restful-no-cache-filter.go @@ -8,7 +8,7 @@ import ( restful "github.com/emicklei/go-restful/v3" ) -// This example shows how to use a WebService filter that passed the Http headers to disable browser cacheing. +// This example shows how to use a WebService filter that passed the Http headers to disable browser caching. // // GET http://localhost:8080/hello diff --git a/jsr311.go b/jsr311.go index 7f04bd90..fd9c2e1c 100644 --- a/jsr311.go +++ b/jsr311.go @@ -186,7 +186,7 @@ func (r RouterJSR311) selectRoutes(dispatcher *WebService, pathRemainder string) } sort.Sort(sort.Reverse(filtered)) - // select other routes from candidates whoes expression matches rmatch + // select other routes from candidates whose expression matches rmatch matchingRoutes := []Route{filtered.candidates[0].route} for c := 1; c < len(filtered.candidates); c++ { each := filtered.candidates[c] @@ -254,7 +254,7 @@ func (rcs *sortableRouteCandidates) Less(i, j int) bool { if ci.literalCount > cj.literalCount { return false } - // secundary key + // secondary key if ci.matchesCount < cj.matchesCount { return true } @@ -301,7 +301,7 @@ func (dc *sortableDispatcherCandidates) Less(i, j int) bool { if ci.matchesCount > cj.matchesCount { return false } - // secundary key + // secondary key if ci.literalCount < cj.literalCount { return true }