1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-06 17:40:24 +08:00

TUN-801: Rapid SQL Proxy

This commit is contained in:
rishabh-bector
2018-07-30 16:45:15 -05:00
committed by Areg Harutyunyan
parent aa5e551de6
commit 60ca06d020
55 changed files with 10332 additions and 149 deletions

View File

@@ -123,14 +123,12 @@ func handleDeprecatedOptions(c *cli.Context) error {
return nil
}
// validate url. It can be either from --url or argument
func validateUrl(c *cli.Context) (string, error) {
var url = c.String("url")
if c.NArg() > 0 {
if c.IsSet("url") {
return "", errors.New("Specified origin urls using both --url and argument. Decide which one you want, I can only support one.")
if !c.IsSet("url") {
return "", errors.New("Please specify an origin URL.")
}
url = c.Args().Get(0)
}
validUrl, err := validation.ValidateUrl(url)
return validUrl, err