Skip to content

Commit 534aa88

Browse files
jsorefsixcolors
andauthored
🧹 chore: Fix spelling issues (#3813)
Co-authored-by: Jason McNeil <sixcolors@mac.com>
1 parent b02f39c commit 534aa88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+145
-145
lines changed

β€ŽAGENTS.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Agent Instructions
44

5-
> **Note for the AI agent:** Before running the startup script, verify that all dependencies and CLI tools are already available. If a `vendor/` directory exists **or** `go list -m -mod=readonly all` succeeds (indicating modules are cached), you may skip the entire startup scriptβ€”including all `go mod` commands and `go install` steps. Otherwise run the script as listed below.
5+
> **Note for the AI agent:** Before running the startup script, verify that all dependencies and CLI tools are already available. If a `vendor/` directory exists **or** `go list -m -mod=readonly all` succeeds (indicating modules are cached), you may skip the entire startup scriptβ€”including all `go mod` commands and `go install` steps. Otherwise, run the script as listed below.
66
77
---
88

β€Žapp.goβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ⚑️ Fiber is an Express inspired web framework written in Go with β˜•οΈ
2-
// πŸ€– Github Repository: https://github.com/gofiber/fiber
2+
// πŸ€– GitHub Repository: https://github.com/gofiber/fiber
33
// πŸ“Œ API Documentation: https://docs.gofiber.io
44

55
// Package fiber is an Express inspired web framework built on top of Fasthttp,
@@ -637,7 +637,7 @@ func NewWithCustomCtx(newCtxFunc func(app *App) CustomCtx, config ...Config) *Ap
637637
}
638638

639639
// GetString returns s unchanged when Immutable is off or s is read-only (rodata).
640-
// Otherwise it returns a detached copy (strings.Clone).
640+
// Otherwise, it returns a detached copy (strings.Clone).
641641
func (app *App) GetString(s string) string {
642642
if !app.config.Immutable || len(s) == 0 {
643643
return s
@@ -649,7 +649,7 @@ func (app *App) GetString(s string) string {
649649
}
650650

651651
// GetBytes returns b unchanged when Immutable is off or b is read-only (rodata).
652-
// Otherwise it returns a detached copy.
652+
// Otherwise, it returns a detached copy.
653653
func (app *App) GetBytes(b []byte) []byte {
654654
if !app.config.Immutable || len(b) == 0 {
655655
return b
@@ -1015,7 +1015,7 @@ func (app *App) HandlersCount() uint32 {
10151015
//
10161016
// Make sure the program doesn't exit and waits instead for Shutdown to return.
10171017
//
1018-
// Important: app.Listen() must be called in a separate goroutine, otherwise shutdown hooks will not work
1018+
// Important: app.Listen() must be called in a separate goroutine; otherwise, shutdown hooks will not work
10191019
// as Listen() is a blocking operation. Example:
10201020
//
10211021
// go app.Listen(":3000")
@@ -1263,7 +1263,7 @@ func (app *App) init() *App {
12631263
// ErrorHandler is the application's method in charge of finding the
12641264
// appropriate handler for the given request. It searches any mounted
12651265
// sub fibers by their prefixes and if it finds a match, it uses that
1266-
// error handler. Otherwise it uses the configured error handler for
1266+
// error handler. Otherwise, it uses the configured error handler for
12671267
// the app, which if not set is the DefaultErrorHandler.
12681268
func (app *App) ErrorHandler(ctx Ctx, err error) error {
12691269
var (

β€Žapp_test.goβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ⚑️ Fiber is an Express inspired web framework written in Go with β˜•οΈ
2-
// πŸ€– Github Repository: https://github.com/gofiber/fiber
2+
// πŸ€– GitHub Repository: https://github.com/gofiber/fiber
33
// πŸ“Œ API Documentation: https://docs.gofiber.io
44

55
package fiber
@@ -530,7 +530,7 @@ func Test_App_ErrorHandler_Custom(t *testing.T) {
530530
t.Parallel()
531531
app := New(Config{
532532
ErrorHandler: func(c Ctx, _ error) error {
533-
return c.Status(200).SendString("hi, i'm an custom error")
533+
return c.Status(200).SendString("hi, i'm a custom error")
534534
},
535535
})
536536

@@ -544,7 +544,7 @@ func Test_App_ErrorHandler_Custom(t *testing.T) {
544544

545545
body, err := io.ReadAll(resp.Body)
546546
require.NoError(t, err)
547-
require.Equal(t, "hi, i'm an custom error", string(body))
547+
require.Equal(t, "hi, i'm a custom error", string(body))
548548
}
549549

550550
func Test_App_ErrorHandler_HandlerStack(t *testing.T) {

β€Žbind.goβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (b *Bind) RespHeader(out any) error {
151151
}
152152

153153
// Cookie binds the request cookie strings into the struct, map[string]string and map[string][]string.
154-
// NOTE: If your cookie is like key=val1,val2; they'll be binded as an slice if your map is map[string][]string. Else, it'll use last element of cookie.
154+
// NOTE: If your cookie is like key=val1,val2; they'll be bound as a slice if your map is map[string][]string. Else, it'll use last element of cookie.
155155
func (b *Bind) Cookie(out any) error {
156156
bind := binder.GetFromThePool[*binder.CookieBinding](&binder.CookieBinderPool)
157157
bind.EnableSplitting = b.ctx.App().config.EnableSplittingOnParsers
@@ -299,7 +299,7 @@ func (b *Bind) MsgPack(out any) error {
299299
// It supports decoding the following content types based on the Content-Type header:
300300
// application/json, application/xml, application/x-www-form-urlencoded, multipart/form-data
301301
// If none of the content types above are matched, it'll take a look custom binders by checking the MIMETypes() method of custom binder.
302-
// If there're no custom binder for mime type of body, it will return a ErrUnprocessableEntity error.
302+
// If there is no custom binder for mime type of body, it will return a ErrUnprocessableEntity error.
303303
func (b *Bind) Body(out any) error {
304304
// Get content-type
305305
ctype := utils.ToLower(utils.UnsafeString(b.ctx.RequestCtx().Request.Header.ContentType()))

β€Žbind_test.goβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func Test_Bind_Query(t *testing.T) {
7272
require.NoError(t, c.Bind().Query(q))
7373
require.Len(t, q.Hobby, 2)
7474

75-
c.Request().URI().SetQueryString("id=1&name=tom&hobby=scoccer&hobby=basketball,football")
75+
c.Request().URI().SetQueryString("id=1&name=tom&hobby=soccer&hobby=basketball,football")
7676
q = new(Query)
7777
require.NoError(t, c.Bind().Query(q))
7878
require.Len(t, q.Hobby, 3)
@@ -148,12 +148,12 @@ func Test_Bind_Query_Map(t *testing.T) {
148148
require.NoError(t, c.Bind().Query(&q))
149149
require.Len(t, q["hobby"], 2)
150150

151-
c.Request().URI().SetQueryString("id=1&name=tom&hobby=scoccer&hobby=basketball,football")
151+
c.Request().URI().SetQueryString("id=1&name=tom&hobby=soccer&hobby=basketball,football")
152152
q = make(map[string][]string)
153153
require.NoError(t, c.Bind().Query(&q))
154154
require.Len(t, q["hobby"], 3)
155155

156-
c.Request().URI().SetQueryString("id=1&name=tom&hobby=scoccer")
156+
c.Request().URI().SetQueryString("id=1&name=tom&hobby=soccer")
157157
qq := make(map[string]string)
158158
require.NoError(t, c.Bind().Query(&qq))
159159
require.Equal(t, "1", qq["id"])

β€Žclient/client_test.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ func Test_Client_Header(t *testing.T) {
13381338
require.Equal(t, "foo", res[0])
13391339
})
13401340

1341-
t.Run("set header case insensitive", func(t *testing.T) {
1341+
t.Run("set header case-insensitive", func(t *testing.T) {
13421342
t.Parallel()
13431343
req := New()
13441344
req.SetHeader("foo", "bar").

β€Žclient/hooks_test.goβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func Test_Parser_Request_Header(t *testing.T) {
326326
req := AcquireRequest().
327327
SetFormDataWithMap(map[string]string{
328328
"foo": "bar",
329-
"ball": "cricle and square",
329+
"ball": "circle and square",
330330
})
331331

332332
err := parserRequestHeader(client, req)
@@ -531,12 +531,12 @@ func Test_Parser_Request_Body(t *testing.T) {
531531
client := New()
532532
req := AcquireRequest().
533533
SetFormDataWithMap(map[string]string{
534-
"ball": "cricle and square",
534+
"ball": "circle and square",
535535
})
536536

537537
err := parserRequestBody(client, req)
538538
require.NoError(t, err)
539-
require.Equal(t, "ball=cricle+and+square", string(req.RawRequest.Body()))
539+
require.Equal(t, "ball=circle+and+square", string(req.RawRequest.Body()))
540540
})
541541

542542
t.Run("form data body error", func(t *testing.T) {

β€Žcolor.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ⚑️ Fiber is an Express inspired web framework written in Go with β˜•οΈ
2-
// πŸ€– Github Repository: https://github.com/gofiber/fiber
2+
// πŸ€– GitHub Repository: https://github.com/gofiber/fiber
33
// πŸ“Œ API Documentation: https://docs.gofiber.io
44

55
package fiber

β€Žctx.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ⚑️ Fiber is an Express inspired web framework written in Go with β˜•οΈ
2-
// πŸ€– Github Repository: https://github.com/gofiber/fiber
2+
// πŸ€– GitHub Repository: https://github.com/gofiber/fiber
33
// πŸ“Œ API Documentation: https://docs.gofiber.io
44

55
package fiber

β€Žctx_interface.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ⚑️ Fiber is an Express inspired web framework written in Go with β˜•οΈ
2-
// πŸ€– Github Repository: https://github.com/gofiber/fiber
2+
// πŸ€– GitHub Repository: https://github.com/gofiber/fiber
33
// πŸ“Œ API Documentation: https://docs.gofiber.io
44

55
package fiber

0 commit comments

Comments
Β (0)