From c41c97606477ad35fbd4a2047a45b6e24d8ffc13 Mon Sep 17 00:00:00 2001 From: Jess Lacy Date: Tue, 15 Jun 2021 16:00:12 -0600 Subject: [PATCH] Add a method for retrieving the instance wait group --- caddy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/caddy.go b/caddy.go index 9601ab2cc53..5ba420f1e4e 100644 --- a/caddy.go +++ b/caddy.go @@ -429,6 +429,10 @@ func (i *Instance) Wait() { i.wg.Wait() } +func (i *Instance) Waiter() *sync.WaitGroup { + return i.wg +} + // CaddyfileFromPipe loads the Caddyfile input from f if f is // not interactive input. f is assumed to be a pipe or stream, // such as os.Stdin. If f is not a pipe, no error is returned