MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / parseIntQuery

Function parseIntQuery

server-source-code/internal/handler/common.go:66–76  ·  view source on GitHub ↗
(r *http.Request, key string, def int)

Source from the content-addressed store, hash-verified

64}
65
66func parseIntQuery(r *http.Request, key string, def int) int {
67 s := r.URL.Query().Get(key)
68 if s == "" {
69 return def
70 }
71 n, err := strconv.Atoi(s)
72 if err != nil || n < 1 {
73 return def
74 }
75 return n
76}

Callers 13

HostDetailMethod · 0.85
PackageTrendsMethod · 0.85
HostQueueMethod · 0.85
ListMethod · 0.85
HandleGlobalSearchMethod · 0.85
AdminListMethod · 0.85
ListRunsMethod · 0.85
ListContainersMethod · 0.85
ListImagesMethod · 0.85
ListHostsMethod · 0.85
ListVolumesMethod · 0.85
ListNetworksMethod · 0.85

Calls 2

QueryMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected