fix: check err
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
726ecb0812
commit
7beb0cde18
@ -72,10 +72,9 @@ database.`,
|
||||
func getAuther(sample auth.Auther, data interface{}) interface{} {
|
||||
authType := reflect.TypeOf(sample)
|
||||
auther := reflect.New(authType).Interface()
|
||||
|
||||
bytes, err := json.Marshal(data)
|
||||
checkErr(err)
|
||||
err = json.Unmarshal(bytes, &auther)
|
||||
|
||||
checkErr(err)
|
||||
return auther
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user