Skip to content

Commit f732ac7

Browse files
authored
docs: fix wrong method init echo middleware (#650)
1 parent 0718109 commit f732ac7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ func main(){
685685
686686
// ...
687687
e := echo.New()
688-
s := souin_echo.New(souin_echo.DefaultConfiguration)
688+
s := souin_echo.NewMiddleware(souin_echo.DefaultConfiguration)
689689
e.Use(s.Process)
690690
// ...
691691

plugins/echo/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ import (
2525
func main(){
2626

2727
// ...
28-
s := souin_echo.New(souin_echo.DevDefaultConfiguration)
28+
s := souin_echo.NewMiddleware(souin_echo.DevDefaultConfiguration)
2929
e.Use(s.Process)
3030
// ...
3131

3232
}
3333
```
3434
With that your application will be able to cache the responses if possible and returns at least the `Cache-Status` HTTP header with the different directives mentionned in the RFC specification.
35-
You have to pass an Echo `Configuration` structure into the `New` method (you can use the `DefaultConfiguration` variable to have a built-in production ready configuration).
35+
You have to pass an Echo `Configuration` structure into the `NewMiddleware` method (you can use the `DefaultConfiguration` variable to have a built-in production ready configuration).
3636
See the full detailled configuration names [here](https://github.com/darkweak/souin#optional-configuration).
3737

3838
Other resources

0 commit comments

Comments
 (0)