diff --git a/Writing-a-Plugin:-Caddyfile-Loader.md b/Writing-a-Plugin:-Caddyfile-Loader.md index 5e42ebc..c2584ff 100644 --- a/Writing-a-Plugin:-Caddyfile-Loader.md +++ b/Writing-a-Plugin:-Caddyfile-Loader.md @@ -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