From 0554f41c13a546a5e669adaef361548240e56497 Mon Sep 17 00:00:00 2001 From: Zhuoyun Wei Date: Tue, 29 Mar 2016 18:21:41 +0800 Subject: [PATCH] Support unixgram syslog address - Consider unixgram:// as a valid URL prefix - Parse unixgram:// addresses - Update docs Signed-off-by: Zhuoyun Wei --- urlutil/urlutil.go | 2 +- urlutil/urlutil_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/urlutil/urlutil.go b/urlutil/urlutil.go index 1135a4c..4415287 100644 --- a/urlutil/urlutil.go +++ b/urlutil/urlutil.go @@ -11,7 +11,7 @@ var ( validPrefixes = map[string][]string{ "url": {"http://", "https://"}, "git": {"git://", "github.com/", "git@"}, - "transport": {"tcp://", "tcp+tls://", "udp://", "unix://"}, + "transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"}, } urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$") ) diff --git a/urlutil/urlutil_test.go b/urlutil/urlutil_test.go index 86d48cf..75eb464 100644 --- a/urlutil/urlutil_test.go +++ b/urlutil/urlutil_test.go @@ -23,6 +23,7 @@ var ( "tcp+tls://example.com", "udp://example.com", "unix:///example", + "unixgram:///example", } )