mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: automatic error propagation in place of "or { return(err) }"
This commit is contained in:
@ -447,9 +447,7 @@ fn (mut ws Client) send_control_frame(code OPCode, frame_typ string, payload []b
|
||||
// parse_uri, parses the url string to it's components
|
||||
// todo: support not using port to default ones
|
||||
fn parse_uri(url string) ?&Uri {
|
||||
u := urllib.parse(url) or {
|
||||
return error(err)
|
||||
}
|
||||
u := urllib.parse(url)?
|
||||
v := u.request_uri().split('?')
|
||||
querystring := if v.len > 1 { '?' + v[1] } else { '' }
|
||||
return &Uri{
|
||||
|
Reference in New Issue
Block a user