mw/kubernetes: rewrite parseRequest

Stop looking at the qtype in parseRequest and make k.Namespace a map.
Fallout from this is that pkg/strings as it is not used anymore. Also
add a few helper functions to make unexposed namespaces easier to see in
the code.

Add wildcard tests to the middleware tests.
This commit is contained in:
Miek Gieben
2017-08-18 19:40:12 +01:00
parent 627687b11f
commit 118ef3dfa0
7 changed files with 128 additions and 127 deletions

View File

@@ -1,11 +0,0 @@
package strings
// StringInSlice check whether string a is a member of slice.
func StringInSlice(a string, slice []string) bool {
for _, b := range slice {
if b == a {
return true
}
}
return false
}