(r *http.Request)
| 1445 | } |
| 1446 | |
| 1447 | func isRaw(r *http.Request) bool { |
| 1448 | vars := mux.Vars(r) |
| 1449 | slug := vars["slug"] |
| 1450 | |
| 1451 | // NOTE: until this is done better, be sure to keep this in parity with |
| 1452 | // isRaw in viewCollectionPost() and handleViewPost() |
| 1453 | isJSON := strings.HasSuffix(slug, ".json") |
| 1454 | isXML := strings.HasSuffix(slug, ".xml") |
| 1455 | isMarkdown := strings.HasSuffix(slug, ".md") |
| 1456 | return strings.HasSuffix(slug, ".txt") || isJSON || isXML || isMarkdown |
| 1457 | } |
| 1458 | |
| 1459 | func viewCollectionPost(app *App, w http.ResponseWriter, r *http.Request) error { |
| 1460 | vars := mux.Vars(r) |
no outgoing calls
no test coverage detected