getCollectionPage returns the collection page as an int. If the parsed page value is not greater than 0 then the default value of 1 is returned.
(vars map[string]string)
| 846 | // getCollectionPage returns the collection page as an int. If the parsed page value is not |
| 847 | // greater than 0 then the default value of 1 is returned. |
| 848 | func getCollectionPage(vars map[string]string) int { |
| 849 | if p, _ := strconv.Atoi(vars["page"]); p > 0 { |
| 850 | return p |
| 851 | } |
| 852 | |
| 853 | return 1 |
| 854 | } |
| 855 | |
| 856 | // handleViewCollection displays the requested Collection |
| 857 | func handleViewCollection(app *App, w http.ResponseWriter, r *http.Request) error { |
no outgoing calls
no test coverage detected