1234567891011121314 |
- package ui
- // mapToPairs converts a string map to a slice of string pairs
- // Part of the mux_test.go file in Gorilla Mux, used under its BSD-like license.
- func mapToPairs(m map[string]string) []string {
- var i int
- p := make([]string, len(m)*2)
- for k, v := range m {
- p[i] = k
- p[i+1] = v
- i += 2
- }
- return p
- }
|