From aad4a813bf4614f6e8d99a98add4412392279eb7 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Thu, 4 May 2017 11:26:38 -0600 Subject: [PATCH] Updated Writing a Plugin: Directives (markdown) --- Writing-a-Plugin:-Directives.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Writing-a-Plugin:-Directives.md b/Writing-a-Plugin:-Directives.md index e5e23ac..ec12d3f 100644 --- a/Writing-a-Plugin:-Directives.md +++ b/Writing-a-Plugin:-Directives.md @@ -83,13 +83,13 @@ Each server type has a list of strings where each item is the name of a directiv ## 4. Plug in your Plugin -Finally, don't forget to import your plugin's package! Caddy must import your plugin to register and execute it. This is usually done within [run.go](https://github.com/mholt/caddy/blob/master/caddy/caddymain/run.go): +Finally, don't forget to import your plugin's package! Caddy must import your plugin to register and execute it. This is usually done within [run.go](https://github.com/mholt/caddy/blob/master/caddy/caddymain/run.go) at the end of the `import` section: ```go -import _ "your/plugin/package/here" + _ "your/plugin/package/here" ``` -*Please Note:* The `_` after import is required. +*Please Note:* The `_` before the package name is required. That's it! Build caddy with your plugin, then write a Caddyfile with your new directive to see it in action.