Skip to content

Commit f9559f0

Browse files
committed
Fix typos in comments
1 parent 14548c7 commit f9559f0

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

examples/authenticated-api/echo/server/fake_jws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (f *FakeAuthenticator) ValidateJWS(jwsString string) (jwt.Token, error) {
7474
jwt.WithAudience(FakeAudience), jwt.WithIssuer(FakeIssuer))
7575
}
7676

77-
// SignToken takes a JWT and signs it with our priviate key, returning a JWS.
77+
// SignToken takes a JWT and signs it with our private key, returning a JWS.
7878
func (f *FakeAuthenticator) SignToken(t jwt.Token) ([]byte, error) {
7979
hdr := jws.NewHeaders()
8080
if err := hdr.Set(jws.AlgorithmKey, jwa.ES256); err != nil {

pkg/chi-middleware/oapi_validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package middleware implements middleware function for go-chi or net/http,
22
// which validates incoming HTTP requests to make sure that they conform to the given OAPI 3.0 specification.
3-
// When OAPI validation failes on the request, we return an HTTP/400.
3+
// When OAPI validation fails on the request, we return an HTTP/400.
44
package middleware
55

66
import (

pkg/codegen/codegen_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func TestExamplePetStoreCodeGenerationWithUserTemplates(t *testing.T) {
109109
// Check that we have a package:
110110
assert.Contains(t, code, "package api")
111111

112-
// Check that the built-in template has been overriden
112+
// Check that the built-in template has been overridden
113113
assert.Contains(t, code, "//blah")
114114
}
115115

@@ -145,7 +145,7 @@ func TestExamplePetStoreCodeGenerationWithFileUserTemplates(t *testing.T) {
145145
// Check that we have a package:
146146
assert.Contains(t, code, "package api")
147147

148-
// Check that the built-in template has been overriden
148+
// Check that the built-in template has been overridden
149149
assert.Contains(t, code, "// Package api provides primitives to interact with the openapi")
150150
}
151151

@@ -194,7 +194,7 @@ func TestExamplePetStoreCodeGenerationWithHTTPUserTemplates(t *testing.T) {
194194
// Check that we have a package:
195195
assert.Contains(t, code, "package api")
196196

197-
// Check that the built-in template has been overriden
197+
// Check that the built-in template has been overridden
198198
assert.Contains(t, code, "//blah")
199199
}
200200

pkg/codegen/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ func IsGoKeyword(str string) bool {
521521
}
522522

523523
// IsPredeclaredGoIdentifier returns whether the given string
524-
// is a predefined go indentifier.
524+
// is a predefined go identifier.
525525
//
526526
// See https://golang.org/ref/spec#Predeclared_identifiers
527527
func IsPredeclaredGoIdentifier(str string) bool {

pkg/runtime/bindstring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func BindStringToObject(src string, dst interface{}) error {
4242
t = v.Type()
4343
}
4444

45-
// For some optioinal args
45+
// For some optional args
4646
if t.Kind() == reflect.Ptr {
4747
if v.IsNil() {
4848
v.Set(reflect.New(t.Elem()))

pkg/util/inputmapping.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strings"
66
)
77

8-
// The input mapping is experessed on the command line as `key1:value1,key2:value2,...`
8+
// The input mapping is expressed on the command line as `key1:value1,key2:value2,...`
99
// We parse it here, but need to keep in mind that keys or values may contain
1010
// commas and colons. We will allow escaping those using double quotes, so
1111
// when passing in "key1":"value1", we will not look inside the quoted sections.
@@ -47,7 +47,7 @@ func ParseCommandLineList(input string) []string {
4747
return args
4848
}
4949

50-
// This function splits a string along the specifed separator, but it
50+
// This function splits a string along the specified separator, but it
5151
// ignores anything between double quotes for splitting. We do simple
5252
// inside/outside quote counting. Quotes are not stripped from output.
5353
func splitString(s string, sep rune) []string {

0 commit comments

Comments
 (0)