When setting up URLS from the command line we need to make sure those are well formed URLs, instead of passing random strings up to the libraries API.
This is quite annoying when we require to use http:// in and endpoint definition instead of hostname:port, and the program does not fail whatever you put in.
There is no out-of-the-box net/url.URL validator, not in https://golang.org/pkg/flag/ nor in https://godoc.org/github.com/spf13/pflag. we had to manually parse those params.
When setting up URLS from the command line we need to make sure those are well formed URLs, instead of passing random strings up to the libraries API.
This is quite annoying when we require to use http:// in and endpoint definition instead of hostname:port, and the program does not fail whatever you put in.
We must check all parameters properly.