From a031b83a09a8628435317a03f199cdc18b78262f Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 1 Nov 2017 11:24:59 -0400 Subject: Initial checkin from CRI-O repo Signed-off-by: Matthew Heon --- vendor/github.com/go-zoo/bone/helper_15.go | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 vendor/github.com/go-zoo/bone/helper_15.go (limited to 'vendor/github.com/go-zoo/bone/helper_15.go') diff --git a/vendor/github.com/go-zoo/bone/helper_15.go b/vendor/github.com/go-zoo/bone/helper_15.go new file mode 100644 index 000000000..068ce18e0 --- /dev/null +++ b/vendor/github.com/go-zoo/bone/helper_15.go @@ -0,0 +1,45 @@ +// +build !go1.7 + +/******************************** +*** Multiplexer for Go *** +*** Bone is under MIT license *** +*** Code by CodingFerret *** +*** github.com/go-zoo *** +*********************************/ + +package bone + +import ( + "net/http" + "sync" +) + +var globalVars = struct { + sync.RWMutex + v map[*http.Request]map[string]string +}{v: make(map[*http.Request]map[string]string)} + +// GetAllValues return the req PARAMs +func GetAllValues(req *http.Request) map[string]string { + globalVars.RLock() + values := globalVars.v[req] + globalVars.RUnlock() + return values +} + +// serveMatchedRequest is an extension point for Route which allows us to conditionally compile for +// go1.7 and