Skip to content

Fix typos in multiple files #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion curly.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion curly_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion examples/form-httpin/restful-form-handling-by-httpin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/nocache/restful-no-cache-filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions jsr311.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
Loading