worker: require full url to be passed to NewClient()

This lets us get of stitching URLs together with string concatenation in
favor of using package `url`.
This commit is contained in:
Lars Karlitski 2020-09-05 17:43:00 +02:00 committed by Tom Gundersen
parent ad11ceecf4
commit b984fd33a8
2 changed files with 25 additions and 14 deletions

View file

@ -230,7 +230,10 @@ func main() {
log.Fatalf("Error creating TLS config: %v", err)
}
client = worker.NewClient(address, conf)
client, err = worker.NewClient("https://"+address, conf)
if err != nil {
log.Fatalf("Error creating worker client: %v", err)
}
}
for {