MCPcopy
hub / github.com/writefreely/writefreely / getCollectionPage

Function getCollectionPage

collections.go:848–854  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
848func 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
857func handleViewCollection(app *App, w http.ResponseWriter, r *http.Request) error {

Callers 3

handleViewCollectionFunction · 0.85
handleViewCollectionTagFunction · 0.85
handleViewCollectionLangFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected