Skip to content

Commit

Permalink
Check extra potential load error
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcook committed Sep 11, 2023
1 parent 7c5cfc5 commit 29e7298
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions load.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ func Load(id string, ptr interface{}) error {
prefix := strings.ToLower(reflect.TypeOf(ptr).Elem().Name())

// Load object data
res, _ := C.HGetAll(ctx, prefix+":"+id).Result()
res, err := C.HGetAll(ctx, prefix+":"+id).Result()

if err := bind(prefix, id, res, ptr); err != nil {
if err != nil {
return err
} else if err := bind(prefix, id, res, ptr); err != nil {
return err
}

Expand Down

0 comments on commit 29e7298

Please sign in to comment.