Fixed up commenting and removed unused code

This commit is contained in:
Clint Ryan
2015-07-05 20:18:38 +10:00
parent c0a5cbce5a
commit c21431a6cd

7
mux.go
View File

@@ -359,9 +359,7 @@ func matchInArray(arr []string, value string) bool {
return false
}
type equals func(interface{}, interface{}) bool
// matchMap returns true if the given key/value pairs exist in a given map.
// matchMapWithString returns true if the given key/value pairs exist in a given map.
func matchMapWithString(toCheck map[string]string, toMatch map[string][]string, canonicalKey bool) bool {
for k, v := range toCheck {
// Check if key exists.
@@ -388,7 +386,8 @@ func matchMapWithString(toCheck map[string]string, toMatch map[string][]string,
return true
}
// matchMap returns true if the given key/value pairs exist in a given map.
// matchMapWithRegex returns true if the given key/value pairs exist in a given map compiled against
// the given regex
func matchMapWithRegex(toCheck map[string]*regexp.Regexp, toMatch map[string][]string, canonicalKey bool) bool {
for k, v := range toCheck {
// Check if key exists.