MCPcopy
hub / github.com/PatchMon/PatchMon / getReqBool

Function getReqBool

server-source-code/internal/handler/settings.go:754–762  ·  view source on GitHub ↗

getReqBool returns bool from req for key or altKey.

(req map[string]interface{}, key, altKey string)

Source from the content-addressed store, hash-verified

752
753// getReqBool returns bool from req for key or altKey.
754func getReqBool(req map[string]interface{}, key, altKey string) (bool, bool) {
755 if v, ok := req[key].(bool); ok {
756 return v, true
757 }
758 if v, ok := req[altKey].(bool); ok {
759 return v, true
760 }
761 return false, false
762}
763
764// getReqFloat64 returns float64 from req for key or altKey (for JSON numbers).
765func getReqFloat64(req map[string]interface{}, key, altKey string) (float64, bool) {

Callers 3

applyOidcSettingsUpdateFunction · 0.85
applySettingsUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected