MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / parseWebsocketsValue

Function parseWebsocketsValue

internal/pluginhost/auth_callbacks.go:614–625  ·  view source on GitHub ↗
(raw any)

Source from the content-addressed store, hash-verified

612}
613
614func parseWebsocketsValue(raw any) (bool, bool) {
615 switch v := raw.(type) {
616 case bool:
617 return v, true
618 case string:
619 parsed, errParse := strconv.ParseBool(strings.TrimSpace(v))
620 if errParse == nil {
621 return parsed, true
622 }
623 }
624 return false, false
625}
626
627func bytesTrimSpace(raw []byte) []byte {
628 return []byte(strings.TrimSpace(string(raw)))

Callers 2

listAuthFilesFromDiskMethod · 0.85
authWebsocketsValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected