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

Function mapToPairs

mux_test.go:2917–2926  ·  view source on GitHub ↗

mapToPairs converts a string map to a slice of string pairs

(m map[string]string)

Source from the content-addressed store, hash-verified

2915
2916// mapToPairs converts a string map to a slice of string pairs
2917func mapToPairs(m map[string]string) []string {
2918 var i int
2919 p := make([]string, len(m)*2)
2920 for k, v := range m {
2921 p[i] = k
2922 p[i+1] = v
2923 i += 2
2924 }
2925 return p
2926}
2927
2928// stringMapEqual checks the equality of two string maps
2929func stringMapEqual(m1, m2 map[string]string) bool {

Callers 1

testRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected