BBVA / qed

The scalable, auditable and high-performance tamper-evident log project
https://qed.readthedocs.io/
Apache License 2.0
95 stars 19 forks source link

QED input parameter check #89

Closed gdiazlo closed 5 years ago

gdiazlo commented 5 years ago

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.

iknite commented 5 years ago

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.