From: 1911860538 Date: Mon, 10 Nov 2025 11:17:01 +0000 (+0000) Subject: net/http: remove unused isLitOrSingle and isNotToken X-Git-Tag: go1.26rc1~293 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=17a02b9106;p=gostls13.git net/http: remove unused isLitOrSingle and isNotToken isLitOrSingle and isNotToken are private and unused. Change-Id: I07718d4496e92d5f75ed74986e174a8aa1f70a88 GitHub-Last-Rev: 722c4dccd85dca5d28a52e95a4f9efbab2b11807 GitHub-Pull-Request: golang/go#76216 Reviewed-on: https://go-review.googlesource.com/c/go/+/718700 Reviewed-by: Damien Neil Auto-Submit: Sean Liao Reviewed-by: Junyang Shao Reviewed-by: Sean Liao LUCI-TryBot-Result: Go LUCI --- diff --git a/src/net/http/http.go b/src/net/http/http.go index e7959fa3b6..d346e60646 100644 --- a/src/net/http/http.go +++ b/src/net/http/http.go @@ -119,10 +119,6 @@ func removeEmptyPort(host string) string { return host } -func isNotToken(r rune) bool { - return !httpguts.IsTokenRune(r) -} - // isToken reports whether v is a valid token (https://www.rfc-editor.org/rfc/rfc2616#section-2.2). func isToken(v string) bool { // For historical reasons, this function is called ValidHeaderFieldName (see issue #67031). diff --git a/src/net/http/pattern.go b/src/net/http/pattern.go index 8fd120e777..a5063807c6 100644 --- a/src/net/http/pattern.go +++ b/src/net/http/pattern.go @@ -394,14 +394,6 @@ func inverseRelationship(r relationship) relationship { } } -// isLitOrSingle reports whether the segment is a non-dollar literal or a single wildcard. -func isLitOrSingle(seg segment) bool { - if seg.wild { - return !seg.multi - } - return seg.s != "/" -} - // describeConflict returns an explanation of why two patterns conflict. func describeConflict(p1, p2 *pattern) string { mrel := p1.compareMethods(p2)