extractQueryParameters gets from the given request the query parameters and populate the provided templateData accordingly.
(rq *http.Request, templateData map[string]interface{})
| 102 | // extractQueryParameters gets from the given request the query parameters and populate the provided templateData |
| 103 | // accordingly. |
| 104 | func extractQueryParameters(rq *http.Request, templateData map[string]interface{}) { |
| 105 | for key, value := range rq.URL.Query() { |
| 106 | if len(value) == 1 { |
| 107 | templateData[key] = value[0] |
| 108 | continue |
| 109 | } |
| 110 | templateData[key] = value |
| 111 | } |
| 112 | } |