From ae748859be8d6d3ed3c0929770f0c287ab6d6460 Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Mon, 8 Apr 2024 15:29:11 -0500 Subject: Port to Golang --- internal/url.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/url.go (limited to 'internal/url.go') diff --git a/internal/url.go b/internal/url.go new file mode 100644 index 0000000..3a8d20a --- /dev/null +++ b/internal/url.go @@ -0,0 +1,11 @@ +package internal + +import "net/url" + +func MustURL(arg string) *url.URL { + u, err := url.Parse(arg) + if err != nil { + panic(err) + } + return u +} -- cgit v1.2.3