From 2d613759f9b9124858dc19bee93394dc4d35f489 Mon Sep 17 00:00:00 2001 From: Liz Fong-Jones Date: Mon, 11 Dec 2023 05:10:22 -0500 Subject: [PATCH] fix(url): fix setting default port 4317 previously the local port was being set, but the url was not updated --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 6367552..ac3598b 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "net/url" "os" "os/signal" @@ -83,7 +84,7 @@ func parseHost(log Logger, host string, insecure bool) *url.URL { } port := u.Port() if port == "" { - port = "4317" // default GRPC port + u.Host = fmt.Sprintf("%s:4317", u.Host) // default GRPC port } return u }