From e180bd67e6a8cf9a38849e3983c7aa2e686edeb6 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Tue, 11 Feb 2020 15:08:07 -0500 Subject: [PATCH] controlclient: handle nil Logf option --- control/controlclient/auto.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go index ebcf120d8..7ff11926f 100644 --- a/control/controlclient/auto.go +++ b/control/controlclient/auto.go @@ -142,6 +142,9 @@ func NewNoStart(opts Options) (*Client, error) { if err != nil { return nil, err } + if opts.Logf == nil { + opts.Logf = func(fmt string, args ...interface{}) {} + } c := &Client{ direct: direct, timeNow: opts.TimeNow,