1package api 2 3import "net/http" 4 5// get rendition from query params, defaulting to "source" 6func getRendition(r *http.Request) string { 7 rendition := r.URL.Query().Get("rendition") 8 if rendition == "" { 9 rendition = "source" 10 } 11 return rendition 12}