mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
http2/hpack: remove unused pair function from package
Move it to a _test.go file instead. After CL 43190, the pair function is no longer used by the hpack package, so it can be removed from it. It's still used by tests. This can help avoid future readers spending time on figuring out why pair exists in package, but is not used. It can also reduce chance of the pair function unintentionally being used in the package (if that needs to happen explicitly, then pair can be easily moved back to package). Change-Id: I12ee9b46f57a522bd09e5d0ee22296df4dee1f35 Reviewed-on: https://go-review.googlesource.com/43851 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Dmitri Shuralyov
parent
0d772244c7
commit
4dbf598911
@@ -648,6 +648,10 @@ func TestHuffmanFuzzCrash(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func pair(name, value string) HeaderField {
|
||||
return HeaderField{Name: name, Value: value}
|
||||
}
|
||||
|
||||
func dehex(s string) []byte {
|
||||
s = strings.Replace(s, " ", "", -1)
|
||||
s = strings.Replace(s, "\n", "", -1)
|
||||
|
||||
@@ -125,10 +125,6 @@ func (t *headerFieldTable) idToIndex(id uint64) uint64 {
|
||||
return k + 1
|
||||
}
|
||||
|
||||
func pair(name, value string) HeaderField {
|
||||
return HeaderField{Name: name, Value: value}
|
||||
}
|
||||
|
||||
// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B
|
||||
var staticTable = newStaticTable()
|
||||
var staticTableEntries = [...]HeaderField{
|
||||
|
||||
Reference in New Issue
Block a user