Skip to content

Commit 17a02b9

Browse files
1911860538gopherbot
authored andcommitted
net/http: remove unused isLitOrSingle and isNotToken
isLitOrSingle and isNotToken are private and unused. Change-Id: I07718d4496e92d5f75ed74986e174a8aa1f70a88 GitHub-Last-Rev: 722c4dc GitHub-Pull-Request: #76216 Reviewed-on: https://go-review.googlesource.com/c/go/+/718700 Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Sean Liao <[email protected]> Reviewed-by: Junyang Shao <[email protected]> Reviewed-by: Sean Liao <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent ff61991 commit 17a02b9

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/net/http/http.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ func removeEmptyPort(host string) string {
119119
return host
120120
}
121121

122-
func isNotToken(r rune) bool {
123-
return !httpguts.IsTokenRune(r)
124-
}
125-
126122
// isToken reports whether v is a valid token (https://www.rfc-editor.org/rfc/rfc2616#section-2.2).
127123
func isToken(v string) bool {
128124
// For historical reasons, this function is called ValidHeaderFieldName (see issue #67031).

src/net/http/pattern.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,6 @@ func inverseRelationship(r relationship) relationship {
394394
}
395395
}
396396

397-
// isLitOrSingle reports whether the segment is a non-dollar literal or a single wildcard.
398-
func isLitOrSingle(seg segment) bool {
399-
if seg.wild {
400-
return !seg.multi
401-
}
402-
return seg.s != "/"
403-
}
404-
405397
// describeConflict returns an explanation of why two patterns conflict.
406398
func describeConflict(p1, p2 *pattern) string {
407399
mrel := p1.compareMethods(p2)

0 commit comments

Comments
 (0)