MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / redactConfigJSON

Function redactConfigJSON

cmd/client/diagnostics.go:224–233  ·  view source on GitHub ↗
(raw []byte)

Source from the content-addressed store, hash-verified

222}
223
224func redactConfigJSON(raw []byte) ([]byte, error) {
225 dec := json.NewDecoder(bytes.NewReader(raw))
226 dec.UseNumber()
227 var v any
228 if err := dec.Decode(&v); err != nil {
229 return nil, err
230 }
231 redacted := redactJSONValue("", v)
232 return json.MarshalIndent(redacted, "", " ")
233}
234
235func redactJSONValue(key string, v any) any {
236 lowerKey := strings.ToLower(key)

Calls 1

redactJSONValueFunction · 0.85