mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
14 lines
195 B
Go
14 lines
195 B
Go
package testutils
|
|
|
|
import "encoding/json"
|
|
|
|
type JSONObj map[string]interface{}
|
|
|
|
func ToJSONStr(m JSONObj) string {
|
|
b, err := json.Marshal(m)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return string(b)
|
|
}
|