http2/hpack: make staticTable an array, not a slice
Minor performance improvement, since len(staticTable) is then a
constant at compile time.
Change-Id: Ie51ecc985aa3f40d50f0a7d1ab6ac91738f696d5
Reviewed-on: https://go-review.googlesource.com/15731
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/http2/hpack/tables.go b/http2/hpack/tables.go
index f898e25..7b6c3c8 100644
--- a/http2/hpack/tables.go
+++ b/http2/hpack/tables.go
@@ -10,7 +10,7 @@
}
// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B
-var staticTable = []HeaderField{
+var staticTable = [...]HeaderField{
pair(":authority", ""), // index 1 (1-based)
pair(":method", "GET"),
pair(":method", "POST"),