From a4644396580ca77bb6945dc5e52d3b9d3ebd6215 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 27 Apr 2020 08:18:35 -0700 Subject: [PATCH] control/controlclient: fix build break caused by overzealous gitting --- control/controlclient/direct.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 2c6b9ff56..5a83e3067 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "log" "net/http" + "net/url" "os" "reflect" "strconv" @@ -115,6 +116,10 @@ func NewDirect(opts Options) (*Direct, error) { return nil, errors.New("controlclient.New: no server URL specified") } opts.ServerURL = strings.TrimRight(opts.ServerURL, "/") + serverURL, err := url.Parse(opts.ServerURL) + if err != nil { + return nil, err + } if opts.TimeNow == nil { opts.TimeNow = time.Now }