Clarify error reporting

Matt Holt 2016-08-17 10:07:20 -06:00
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