getReqFloat64 returns float64 from req for key or altKey (for JSON numbers).
(req map[string]interface{}, key, altKey string)
| 763 | |
| 764 | // getReqFloat64 returns float64 from req for key or altKey (for JSON numbers). |
| 765 | func getReqFloat64(req map[string]interface{}, key, altKey string) (float64, bool) { |
| 766 | if v, ok := req[key].(float64); ok { |
| 767 | return v, true |
| 768 | } |
| 769 | if v, ok := req[altKey].(float64); ok { |
| 770 | return v, true |
| 771 | } |
| 772 | return 0, false |
| 773 | } |
| 774 | |
| 775 | // constructServerURL builds a server URL from protocol, host, and port. |
| 776 | // Omits port for default ports (80 for http, 443 for https). |
no outgoing calls
no test coverage detected