MCPcopy
hub / github.com/cortexlabs/cortex / getOptionalBoolQParam

Function getOptionalBoolQParam

pkg/operator/endpoints/params.go:46–53  ·  view source on GitHub ↗
(paramName string, defaultVal bool, r *http.Request)

Source from the content-addressed store, hash-verified

44}
45
46func getOptionalBoolQParam(paramName string, defaultVal bool, r *http.Request) bool {
47 param := r.URL.Query().Get(paramName)
48 paramBool, ok := s.ParseBool(param)
49 if ok {
50 return paramBool
51 }
52 return defaultVal
53}

Callers 4

RefreshFunction · 0.85
DeleteFunction · 0.85
SubmitBatchJobFunction · 0.85
DeployFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected