mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix dev scripts.
This commit is contained in:
@ -3,8 +3,14 @@ package utils
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
||||
func Decode(input interface{}, output interface{}) error {
|
||||
return mapstructure.Decode(input, output)
|
||||
}
|
||||
|
||||
func Unmarshal(in any, raw []byte, callback func() error) error {
|
||||
if err := json.Unmarshal(raw, &in); err != nil {
|
||||
return err
|
Reference in New Issue
Block a user