mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
GetConfig takes whole controller now, not a string
parent
c59470ba71
commit
b460fd2248
@ -54,7 +54,7 @@ The setup function does not need to be exported, but you may capitalize it to ex
|
||||
Instead of accessing site config values directly like `c.Root` or `c.Host`, get the config from the HTTP server using the key from the controller:
|
||||
|
||||
```go
|
||||
siteConfig := httpserver.GetConfig(c.Key)
|
||||
siteConfig := httpserver.GetConfig(c)
|
||||
```
|
||||
|
||||
Instead of adding startup callbacks by appending to `c.Startup` , call `c.OnStartup()` and pass in the function:
|
||||
|
Loading…
x
Reference in New Issue
Block a user