MCPcopy
hub / github.com/bettercap/bettercap / jsPropToString

Function jsPropToString

modules/dns_proxy/dns_proxy_js_query.go:58–64  ·  view source on GitHub ↗
(obj map[string]interface{}, key string)

Source from the content-addressed store, hash-verified

56}
57
58func jsPropToString(obj map[string]interface{}, key string) string {
59 if v, ok := obj[key].(string); ok {
60 return v
61 }
62 log.Error("error converting JS property to string where key is: %s", key)
63 return ""
64}
65
66func jsPropToStringArray(obj map[string]interface{}, key string) []string {
67 if v, ok := obj[key].([]string); ok {

Callers 4

ToEDNS0Function · 0.85
ToQueryMethod · 0.85
ToRRFunction · 0.85
ToSVCBKeyValueFunction · 0.85

Calls 1

ErrorFunction · 0.92

Tested by

no test coverage detected