weedo icon indicating copy to clipboard operation
weedo copied to clipboard

Parameter called URL but host required

Open nd2s opened this issue 8 years ago • 1 comments
trafficstars

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.

nd2s avatar Jul 18 '17 17:07 nd2s

Actually the parameter name should be addr, it accepts the address in host:port format (without the scheme).

ginuerzh avatar Jul 19 '17 02:07 ginuerzh