mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
Clarify error reporting
parent
f75f773680
commit
1ab91b7ef9
@ -18,7 +18,9 @@ func myLoader(serverType string) (caddy.Input, error) {
|
||||
}
|
||||
```
|
||||
|
||||
If your loader needs more state, you can implement the caddy.Loader interface directly using a struct, instead of using the wrapper type like we did above. Simple loaders need only be standalone functions.
|
||||
If your loader needs more state, you can implement the caddy.Loader interface directly using a struct, instead of using the wrapper type `caddy.LoaderFunc` like we did above. Simple loaders need only be standalone functions.
|
||||
|
||||
Your loader should return an error only if it is worth aborting and reporting to the user. In other words, do not return an error merely because there is no Caddyfile for your loader to load.
|
||||
|
||||
## How Loaders are Used
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user