(headers map[string]string)
| 128 | } |
| 129 | |
| 130 | func testContextWithHeaders(headers map[string]string) *gin.Context { |
| 131 | w := httptest.NewRecorder() |
| 132 | c, _ := gin.CreateTestContext(w) |
| 133 | req := httptest.NewRequest(http.MethodPost, "/", nil) |
| 134 | for key, value := range headers { |
| 135 | req.Header.Set(key, value) |
| 136 | } |
| 137 | c.Request = req |
| 138 | return c |
| 139 | } |
| 140 | |
| 141 | func sseDataLines(output string) []string { |
| 142 | var lines []string |
no test coverage detected