MCPcopy
hub / github.com/gorilla/mux / stringMapEqual

Function stringMapEqual

mux_test.go:2929–2941  ·  view source on GitHub ↗

stringMapEqual checks the equality of two string maps

(m1, m2 map[string]string)

Source from the content-addressed store, hash-verified

2927
2928// stringMapEqual checks the equality of two string maps
2929func stringMapEqual(m1, m2 map[string]string) bool {
2930 nil1 := m1 == nil
2931 nil2 := m2 == nil
2932 if nil1 != nil2 || len(m1) != len(m2) {
2933 return false
2934 }
2935 for k, v := range m1 {
2936 if v != m2[k] {
2937 return false
2938 }
2939 }
2940 return true
2941}
2942
2943// stringHandler returns a handler func that writes a message 's' to the
2944// http.ResponseWriter.

Callers 1

testRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected