go-waku/library/response.go

12 lines
196 B
Go
Raw Normal View History

2023-08-10 13:30:38 +00:00
package library
import "encoding/json"
func marshalJSON(result interface{}) (string, error) {
data, err := json.Marshal(result)
if err != nil {
return "", err
}
return string(data), nil
}