From 54d56e2531a3d3fff0f80a15371cc18a68b83e52 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Fri, 24 Jun 2016 16:10:53 -0700 Subject: [PATCH] pkg/types: accept unix and unixs schemes --- pkg/types/urls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/types/urls.go b/pkg/types/urls.go index e532722ac..9e5d03ff6 100644 --- a/pkg/types/urls.go +++ b/pkg/types/urls.go @@ -36,8 +36,8 @@ func NewURLs(strs []string) (URLs, error) { if err != nil { return nil, err } - if u.Scheme != "http" && u.Scheme != "https" { - return nil, fmt.Errorf("URL scheme must be http or https: %s", in) + if u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "unix" && u.Scheme != "unixs" { + return nil, fmt.Errorf("URL scheme must be http, https, unix, or unixs: %s", in) } if _, _, err := net.SplitHostPort(u.Host); err != nil { return nil, fmt.Errorf(`URL address does not have the form "host:port": %s`, in)