MCPcopy Create free account
hub / github.com/ez4o/github-contribution-graph / GetRequestParams

Function GetRequestParams

src/server/util/get_request_params.go:9–24  ·  view source on GitHub ↗
(v url.Values)

Source from the content-addressed store, hash-verified

7)
8
9func GetRequestParams(v url.Values) model.RequestParams {
10 username := v.Get("username")
11 imgUrl := v.Get("img_url")
12 lastNDays, err := strconv.Atoi(v.Get("last_n_days"))
13 if lastNDays <= 0 || err != nil {
14 lastNDays = 7
15 }
16
17 params := model.RequestParams{
18 Username: username,
19 ImgUrl: imgUrl,
20 LastNDays: lastNDays,
21 }
22
23 return params
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected