aboutsummaryrefslogtreecommitdiff
path: root/url.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-19 19:17:28 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-19 19:17:28 +0800
commit431d5f2eae378bc7ff62bd5ddc553f3768aac9b9 (patch)
treed98ce58f122557abb7102966a83dc6d84749d4d6 /url.go
parenthooks: Ignore error value of the last conn.Write() (diff)
downloadforge-431d5f2eae378bc7ff62bd5ddc553f3768aac9b9.tar.gz
forge-431d5f2eae378bc7ff62bd5ddc553f3768aac9b9.tar.zst
forge-431d5f2eae378bc7ff62bd5ddc553f3768aac9b9.zip
all: Remove error wrapping
I'm undecided on how I wrap errors in this project. I'll just return errors directly for now. This will probably be adjusted later.
Diffstat (limited to 'url.go')
-rw-r--r--url.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/url.go b/url.go
index 0265fc6..ea11555 100644
--- a/url.go
+++ b/url.go
@@ -5,8 +5,6 @@ import (
"net/http"
"net/url"
"strings"
-
- "go.lindenii.runxiyu.org/lindenii-common/misc"
)
var (
@@ -52,15 +50,11 @@ func parse_request_uri(request_uri string) (segments []string, params url.Values
for i, segment := range segments {
segments[i], err = url.PathUnescape(segment)
if err != nil {
- return nil, nil, misc.Wrap_one_error(err_bad_request, err)
+ return
}
}
params, err = url.ParseQuery(params_string)
- if err != nil {
- return nil, nil, misc.Wrap_one_error(err_bad_request, err)
- }
-
return
}