Browse Source

pkg/types: accept unix and unixs schemes

Anthony Romano 9 years ago
parent
commit
54d56e2531
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pkg/types/urls.go

+ 2 - 2
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)