waku-org/go-waku

View on GitHub
library/response.go

Summary

Maintainability
A
0 mins
Test Coverage
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
}