From a97c8f44d0c1917d38a60ff583bda5f4e22f5111 Mon Sep 17 00:00:00 2001 From: 1911860538 Date: Fri, 7 Nov 2025 19:15:36 +0800 Subject: [PATCH 1/2] net/http: remove unused function isLitOrSingle --- src/net/http/pattern.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/net/http/pattern.go b/src/net/http/pattern.go index 8fd120e7775c1c..a5063807c6f011 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) From 722c4dccd85dca5d28a52e95a4f9efbab2b11807 Mon Sep 17 00:00:00 2001 From: 1911860538 Date: Mon, 10 Nov 2025 19:11:06 +0800 Subject: [PATCH 2/2] net/http: remove unused function isNotToken --- src/net/http/http.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/net/http/http.go b/src/net/http/http.go index e7959fa3b6045b..d346e60646a08e 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).