From af2aaacbc93e0e9cf0b775af0eff2942c5e3a382 Mon Sep 17 00:00:00 2001 From: Tarun Koyalwar <45962551+tarunKoyalwar@users.noreply.github.com> Date: Tue, 27 Dec 2022 22:41:33 +0530 Subject: [PATCH] fix url panic (#3092) --- v2/pkg/input/input.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/pkg/input/input.go b/v2/pkg/input/input.go index 422fdcf5..8fdf6685 100644 --- a/v2/pkg/input/input.go +++ b/v2/pkg/input/input.go @@ -100,7 +100,7 @@ func (h *Helper) convertInputToType(input string, inputType inputType, defaultPo if hasHost { return host } - if isURL { + if isURL && uri != nil { return uri.Hostname() } return input