3pl/util/pjson/unmarshal.go

16 lines
268 B
Go
Raw Normal View History

2022-08-15 04:51:07 +00:00
package pjson
import (
"encoding/json"
2022-09-19 07:34:55 +00:00
"log"
2022-08-15 04:51:07 +00:00
)
// Unmarshal ...
func Unmarshal(b []byte, resultP interface{}) error {
err := json.Unmarshal(b, resultP)
if err != nil {
2022-09-19 07:34:55 +00:00
log.Printf("3pl/util/pjson.Unmarshal: err %v, payload %s", err, string(b))
2022-08-15 04:51:07 +00:00
}
return err
}