From 6a4e69eb9fd0aa02c47d74d743ae4fce292dcbb7 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Tue, 22 Aug 2017 20:44:42 +0100 Subject: mw/kubernetes: Rewrite parseRequest and Readability improvements (#939) * 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. * Fix tests Add a whole bunch of comments to document what we are trying to do. * This is now answered * up coverage * duh * Update testcase * Make it nodata --- middleware/pkg/strings/slice.go | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 middleware/pkg/strings/slice.go (limited to 'middleware/pkg/strings/slice.go') diff --git a/middleware/pkg/strings/slice.go b/middleware/pkg/strings/slice.go deleted file mode 100644 index 3d4b1d481..000000000 --- a/middleware/pkg/strings/slice.go +++ /dev/null @@ -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 -} -- cgit v1.2.3