Skip to content

Commit 554c87f

Browse files
committed
feat: remove unsafe.Slice in om to support go1.19
1 parent a7f9839 commit 554c87f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

om/conv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (r hashConv) FromHash(fields map[string]string) error {
6868
continue
6969
}
7070
if f.conv.StringToValue == nil {
71-
if err := json.Unmarshal(unsafe.Slice(unsafe.StringData(v), len(v)), r.entity.Field(f.idx).Addr().Interface()); err != nil {
71+
if err := json.Unmarshal([]byte(v), r.entity.Field(f.idx).Addr().Interface()); err != nil {
7272
return err
7373
}
7474
} else {

0 commit comments

Comments
 (0)