Skip to content

Commit 05d2048

Browse files
chore: remove unnecessary error check for url parsing
1 parent 66d97d3 commit 05d2048

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

internal/requestconfig/requestconfig.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@ func NewRequestConfig(ctx context.Context, method string, u string, body any, ds
121121
}
122122
params := q.Encode()
123123
if params != "" {
124-
parsed, err := url.Parse(u)
125-
if err != nil {
126-
return nil, err
127-
}
124+
parsed, _ := url.Parse(u)
128125
if parsed.RawQuery != "" {
129126
parsed.RawQuery = parsed.RawQuery + "&" + params
130127
u = parsed.String()

0 commit comments

Comments
 (0)