1
0
Fork 0
mirror of https://github.com/m1k1o/neko.git synced 2025-05-20 12:37:06 +02:00
neko/server/internal/utils/json.go
2020-01-18 23:30:09 +00:00

10 lines
200 B
Go

package utils
import "encoding/json"
func Unmarshal(in interface{}, raw []byte, callback func() error) error {
if err := json.Unmarshal(raw, &in); err != nil {
return err
}
return callback()
}