Skip to content

Commit 3426957

Browse files
jbamptonThomasObenaus
authored andcommitted
Fix spelling (gin-gonic#2202)
1 parent 94fa6f1 commit 3426957

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
- [PERFORMANCE] Misc code optimizations. Inlining, tail call optimizations
197197
- [NEW] Built-in support for golang.org/x/net/context
198198
- [NEW] Any(path, handler). Create a route that matches any path
199-
- [NEW] Refactored rendering pipeline (faster and static typeded)
199+
- [NEW] Refactored rendering pipeline (faster and static typed)
200200
- [NEW] Refactored errors API
201201
- [NEW] IndentedJSON() prints pretty JSON
202202
- [NEW] Added gin.DefaultWriter
@@ -295,7 +295,7 @@
295295
- [FIX] Recovery() middleware only prints panics
296296
- [FIX] Context.Get() does not panic anymore. Use MustGet() instead.
297297
- [FIX] Multiple http.WriteHeader() in NotFound handlers
298-
- [FIX] Engine.Run() panics if http server can't be setted up
298+
- [FIX] Engine.Run() panics if http server can't be set up
299299
- [FIX] Crash when route path doesn't start with '/'
300300
- [FIX] Do not update header when status code is negative
301301
- [FIX] Setting response headers before calling WriteHeader in context.String()

context.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,20 +1003,20 @@ func (c *Context) NegotiateFormat(offered ...string) string {
10031003
return offered[0]
10041004
}
10051005
for _, accepted := range c.Accepted {
1006-
for _, offert := range offered {
1006+
for _, offer := range offered {
10071007
// According to RFC 2616 and RFC 2396, non-ASCII characters are not allowed in headers,
10081008
// therefore we can just iterate over the string without casting it into []rune
10091009
i := 0
10101010
for ; i < len(accepted); i++ {
1011-
if accepted[i] == '*' || offert[i] == '*' {
1012-
return offert
1011+
if accepted[i] == '*' || offer[i] == '*' {
1012+
return offer
10131013
}
1014-
if accepted[i] != offert[i] {
1014+
if accepted[i] != offer[i] {
10151015
break
10161016
}
10171017
}
10181018
if i == len(accepted) {
1019-
return offert
1019+
return offer
10201020
}
10211021
}
10221022
}

0 commit comments

Comments
 (0)