Parameter called URL but host required
nd2s opened this issue · 1 comments
nd2s commented
weedo.NewClient()
and related functions expect a hostname but the function parameter is called URL. this is confusing. Additionally passing a URL like "http://localhost.3030" returns a very unintuitive error:
parse http://http:%!F(MISSING)localhost:3030/dir/status: invalid URL escape "%!F(MISSING)"
It would be better to call the parameter host
or hostName
and maybe check the format.
ginuerzh commented
Actually the parameter name should be addr
, it accepts the address in host:port
format (without the scheme).