From 9a3402ad7a4e88c104ae2225f05bb46ce9476b56 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Wed, 19 Jul 2017 21:45:02 -0700 Subject: [PATCH] unexport prefixByteMatcher --- matchers.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matchers.go b/matchers.go index bb4bc90..6ccd7a8 100644 --- a/matchers.go +++ b/matchers.go @@ -38,9 +38,7 @@ func PrefixMatcher(strs ...string) Matcher { return pt.matchPrefix } -// PrefixByteMatcher returns a matcher that matches a connection if it -// starts with any of the []byte in list. -func PrefixByteMatcher(list ...[]byte) Matcher { +func prefixByteMatcher(list ...[]byte) Matcher { pt := newPatriciaTree(list...) return pt.matchPrefix } @@ -83,7 +81,7 @@ func TLS(versions ...int) Matcher { for _, v := range versions { prefixes = append(prefixes, []byte{22, byte(v >> 8 & 0xff), byte(v & 0xff)}) } - return PrefixByteMatcher(prefixes...) + return prefixByteMatcher(prefixes...) } const maxHTTPRead = 4096