1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-27 06:47:08 +00:00

apps.Switch/Hosts minor doc improvement

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-11-16 03:06:06 +02:00
parent f29d690c5f
commit 4cbd9deff7
3 changed files with 45 additions and 7 deletions

View File

@@ -121,9 +121,9 @@ Example Code:
```go
switcher := Switch(Hosts{
"mydomain.com": app,
"test.mydomain.com": testSubdomainApp,
"otherdomain.com": "appName",
{Pattern: "mydomain.com", Target: app},
{Pattern: "test.mydomain.com", Target: testSubdomainApp},
{Pattern: "otherdomain.com", Target: "appName"},
})
switcher.Listen(":80")
```
@@ -211,7 +211,7 @@ Switch(Join{
App: myapp,
},
Hosts{
{"^test.*$", myapp},
{Pattern: "^test.*$", Target: myapp},
},
})
```