weedo
weedo copied to clipboard
Parameter called URL but host required
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.
Actually the parameter name should be addr, it accepts the address in host:port format (without the scheme).