(params []*parser.Param, results []*parser.Result)
| 186 | } |
| 187 | |
| 188 | func (l *loader) isHandlerFunc(params []*parser.Param, results []*parser.Result) bool { |
| 189 | if len(params) != 2 || len(results) != 0 { |
| 190 | return false |
| 191 | } |
| 192 | |
| 193 | maybeW := params[0].Type() |
| 194 | isW, err := parser.IsImportType(maybeW, "net/http", "ResponseWriter") |
| 195 | if err != nil { |
| 196 | l.Bail(err) |
| 197 | } |
| 198 | |
| 199 | if !isW { |
| 200 | return false |
| 201 | } |
| 202 | |
| 203 | maybeR := params[1].Type() |
| 204 | isR, err := parser.IsImportType(maybeR, "net/http", "Request") |
| 205 | if err != nil { |
| 206 | l.Bail(err) |
| 207 | } |
| 208 | |
| 209 | if !isR { |
| 210 | return false |
| 211 | } |
| 212 | |
| 213 | return true |
| 214 | } |
| 215 | |
| 216 | // Route to the action |
| 217 | func (l *loader) loadActionRoute(controllerRoute, actionName string) string { |
no test coverage detected