aboutsummaryrefslogtreecommitdiff
path: root/internal/url.go
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-04-08 15:29:11 -0500
committerSlack Coder <slackcoder@server.ky>2024-07-18 11:47:49 -0500
commitae748859be8d6d3ed3c0929770f0c287ab6d6460 (patch)
tree284d3bf3d7fa496a9d334391eac996affc5a01b9 /internal/url.go
parentc2267767ca8ed06018d26a45b483c44b7c4234cf (diff)
downloadmirror-3719ff97f79cc3b01c7e763a49265ef64a97f884.tar.xz (sig)
Port to Golangv0.0.1-dev
Diffstat (limited to 'internal/url.go')
-rw-r--r--internal/url.go11
1 files changed, 11 insertions, 0 deletions
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
+}