MCPcopy
hub / github.com/fabiolb/fabio / toJSON

Function toJSON

main.go:693–699  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

691}
692
693func toJSON(v any) string {
694 data, err := json.MarshalIndent(v, "", " ")
695 if err != nil {
696 panic("json: " + err.Error())
697 }
698 return string(data)
699}
700
701func unique(strSlice []string) []string {
702 keys := make(map[string]bool)

Callers 1

mainFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected