stringMapEqual checks the equality of two string maps
(m1, m2 map[string]string)
| 2927 | |
| 2928 | // stringMapEqual checks the equality of two string maps |
| 2929 | func 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. |