MCPcopy
hub / github.com/deepfence/SecretScanner / mustMarshal

Function mustMarshal

core/config_test.go:111–120  ·  view source on GitHub ↗
(in interface{})

Source from the content-addressed store, hash-verified

109}
110
111func mustMarshal(in interface{}) string {
112 var buf bytes.Buffer
113 enc := json.NewEncoder(&buf)
114 enc.SetIndent("", " ")
115 err := enc.Encode(in)
116 if err != nil {
117 panic(err)
118 }
119 return buf.String()
120}

Callers 1

Test_ConfigMergeFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected