3pl/util/pjson/unmarshal.go

16 lines
268 B
Go

package pjson
import (
"encoding/json"
"log"
)
// Unmarshal ...
func Unmarshal(b []byte, resultP interface{}) error {
err := json.Unmarshal(b, resultP)
if err != nil {
log.Printf("3pl/util/pjson.Unmarshal: err %v, payload %s", err, string(b))
}
return err
}