Skip to content

Commit 9871f02

Browse files
Add docs from gofiber/fiber@b8726a0
1 parent eef8724 commit 9871f02

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

docs/core/api/ctx.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (c fiber.Ctx) GetReqHeaders() map[string][]string
139139
```
140140

141141
:::info
142-
The returned value is valid only within the handler. Do not store references.
142+
The returned value is valid only within the handler. Do not store references.
143143
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
144144
:::
145145

@@ -165,7 +165,7 @@ app.Get("/", func(c fiber.Ctx) error {
165165
```
166166

167167
:::info
168-
The returned value is valid only within the handler. Do not store references.
168+
The returned value is valid only within the handler. Do not store references.
169169
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
170170
:::
171171

@@ -178,7 +178,7 @@ func (c fiber.Ctx) GetRespHeaders() map[string][]string
178178
```
179179

180180
:::info
181-
The returned value is valid only within the handler. Do not store references.
181+
The returned value is valid only within the handler. Do not store references.
182182
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
183183
:::
184184

@@ -270,7 +270,7 @@ Make sure to understand and correctly implement the `Locals` method in both its
270270

271271
### Next
272272

273-
When **Next** is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the [error handler](https://docs.gofiber.io/guide/error-handling).
273+
When **Next** is called, it executes the next method in the stack that matches the current route. You can pass an error struct within the method that will end the chaining and call the [error handler](../guide/error-handling).
274274

275275
```go title="Signature"
276276
func (c fiber.Ctx) Next() error
@@ -600,7 +600,7 @@ Media-Type parameters are supported.
600600
app.Get("/", func(c fiber.Ctx) error {
601601
// Extra parameters in the accept are ignored
602602
c.Accepts("text/plain;format=flowed") // "text/plain;format=flowed"
603-
603+
604604
// An offer must contain all parameters present in the Accept type
605605
c.Accepts("application/json") // ""
606606

@@ -686,7 +686,7 @@ app.Post("/", func(c fiber.Ctx) error {
686686
```
687687

688688
:::info
689-
The returned value is valid only within the handler. Do not store references.
689+
The returned value is valid only within the handler. Do not store references.
690690
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
691691
:::
692692

@@ -708,7 +708,7 @@ app.Post("/", func(c fiber.Ctx) error {
708708
```
709709

710710
:::info
711-
The returned value is valid only within the handler. Do not store references.
711+
The returned value is valid only within the handler. Do not store references.
712712
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
713713
:::
714714

@@ -789,7 +789,7 @@ app.Post("/", func(c fiber.Ctx) error {
789789

790790
:::info
791791

792-
The returned value is valid only within the handler. Do not store references.
792+
The returned value is valid only within the handler. Do not store references.
793793
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
794794

795795
:::
@@ -828,7 +828,7 @@ app.Get("/", func(c fiber.Ctx) error {
828828
```
829829

830830
:::info
831-
The returned value is valid only within the handler. Do not store references.
831+
The returned value is valid only within the handler. Do not store references.
832832
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
833833
:::
834834

@@ -854,7 +854,7 @@ app.Get("/", func(c fiber.Ctx) error {
854854
```
855855

856856
:::info
857-
The returned value is valid only within the handler. Do not store references.
857+
The returned value is valid only within the handler. Do not store references.
858858
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
859859
:::
860860

@@ -877,7 +877,7 @@ app.Get("/", func(c fiber.Ctx) error {
877877
```
878878

879879
:::info
880-
The returned value is valid only within the handler. Do not store references.
880+
The returned value is valid only within the handler. Do not store references.
881881
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
882882
:::
883883

@@ -1075,7 +1075,7 @@ app.Get("/", func(c fiber.Ctx) error {
10751075
```
10761076

10771077
:::info
1078-
The returned value is valid only within the handler. Do not store references.
1078+
The returned value is valid only within the handler. Do not store references.
10791079
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
10801080
:::
10811081

@@ -1126,7 +1126,7 @@ app.Get("/v1/*/shop/*", func(c fiber.Ctx) error {
11261126
```
11271127

11281128
:::info
1129-
The returned value is valid only within the handler. Do not store references.
1129+
The returned value is valid only within the handler. Do not store references.
11301130
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
11311131
:::
11321132

@@ -1303,7 +1303,7 @@ app.Get("/", func(c fiber.Ctx) error {
13031303
```
13041304

13051305
:::info
1306-
The returned value is valid only within the handler. Do not store references.
1306+
The returned value is valid only within the handler. Do not store references.
13071307
Make copies or use the [**`Immutable`**](./fiber.md#immutable) setting instead. [Read more...](../#zero-allocation)
13081308
:::
13091309

@@ -1485,7 +1485,7 @@ func (c fiber.Ctx) Stale() bool
14851485

14861486
Returns a slice with the host’s sub-domain labels. The dot-separated parts that precede the registrable domain (`example`) and the top-level domain (ex: `com`).
14871487

1488-
The `subdomain offset` (default `2`) tells Fiber how many labels, counting from the right-hand side, are always discarded.
1488+
The `subdomain offset` (default `2`) tells Fiber how many labels, counting from the right-hand side, are always discarded.
14891489
Passing an `offset` argument lets you override that value for a single call.
14901490

14911491
```go
@@ -1821,7 +1821,7 @@ when they regain control after calling `c.Next()`.
18211821
// Error Logging/Responding middleware
18221822
app.Use(func(c fiber.Ctx) error {
18231823
err := c.Next()
1824-
1824+
18251825
// Log errors & write the error to the response
18261826
if err != nil {
18271827
log.Printf("Got error in middleware: %v", err)

docs/core/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Fiber is optimized for **high performance**, meaning values returned from **fibe
2929
```go
3030
func handler(c fiber.Ctx) error {
3131
// Variable is only valid within this handler
32-
result := c.Params("foo")
32+
result := c.Params("foo")
3333

3434
// ...
3535
}
@@ -45,7 +45,7 @@ func handler(c fiber.Ctx) error {
4545
// Make a copy
4646
buffer := make([]byte, len(result))
4747
copy(buffer, result)
48-
resultCopy := string(buffer)
48+
resultCopy := string(buffer)
4949
// Variable is now valid indefinitely
5050

5151
// ...
@@ -113,9 +113,9 @@ app.Method(path string, ...func(fiber.Ctx) error)
113113
```
114114

115115
- `app` is an instance of **Fiber**
116-
- `Method` is an [HTTP request method](https://docs.gofiber.io/api/app#route-handlers): `GET`, `PUT`, `POST`, etc.
116+
- `Method` is an [HTTP request method](./api/app#route-handlers): `GET`, `PUT`, `POST`, etc.
117117
- `path` is a virtual path on the server
118-
- `func(fiber.Ctx) error` is a callback function containing the [Context](https://docs.gofiber.io/api/ctx) executed when the route is matched
118+
- `func(fiber.Ctx) error` is a callback function containing the [Context](./api/ctx) executed when the route is matched
119119

120120
#### Simple Route
121121

docs/core/middleware/recover.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id: recover
44

55
# Recover
66

7-
The Recover middleware for [Fiber](https://github.com/gofiber/fiber) intercepts panics and forwards them to the central [ErrorHandler](https://docs.gofiber.io/guide/error-handling).
7+
The Recover middleware for [Fiber](https://github.com/gofiber/fiber) intercepts panics and forwards them to the central [ErrorHandler](../guide/error-handling).
88

99
## Signatures
1010

docs/core/middleware/session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ app.Use(session.New(session.Config{
298298

299299
## Session ID Extractors
300300

301-
This middleware uses the shared extractors module for session ID extraction. See the [Extractors Guide](https://docs.gofiber.io/guide/extractors) for more details.
301+
This middleware uses the shared extractors module for session ID extraction. See the [Extractors Guide](../guide/extractors) for more details.
302302

303303
### Built-in Extractors
304304

0 commit comments

Comments
 (0)