From b1cd29518f24ba5ef443a98984606554d05659a0 Mon Sep 17 00:00:00 2001 From: a Date: Thu, 25 Jul 2024 16:18:34 -0500 Subject: [PATCH] more explained --- src/docs/markdown/extending-caddy/placeholders.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docs/markdown/extending-caddy/placeholders.md b/src/docs/markdown/extending-caddy/placeholders.md index 6a45096..6b163fe 100644 --- a/src/docs/markdown/extending-caddy/placeholders.md +++ b/src/docs/markdown/extending-caddy/placeholders.md @@ -100,7 +100,9 @@ func (g *Gizmo) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { #### Resolve the placeholder during Match or Serve -In order to now correctly read our `g.Name` placeholder, in a plugin matcher or middleware, we must extract the replacer from the context, and use that replacer on our saved placeholder string. +In order to now correctly read our `g.Name` placeholder in a plugin matcher or middleware, we must extract the replacer from the context and use that replacer on our saved placeholder string. + +This gives us a string with all valid replacements done, which we can then use in whichever way we want. In the example, we write those bytes to output ```go func (g *Gizmo) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error {