Skip to content

Commit b4f207e

Browse files
fix(docs): correct router variable name in custom middleware example (#348)
Replaced incorrect usage of 'router.Run(":8080")' with 'r.Run(":8080")' in the custom middleware example. The variable 'r' is initialized with gin.New() and should be used to start the server. This change prevents potential runtime errors due to undefined 'router'.
1 parent a131c9a commit b4f207e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/en/docs/examples/custom-middleware.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636
})
3737

3838
// Listen and serve on 0.0.0.0:8080
39-
router.Run(":8080")
39+
r.Run(":8080")
4040
}
4141
```
4242

0 commit comments

Comments
 (0)