Skip to content

Commit 8074509

Browse files
committed
feat: remove unsafe.Slice in om to support go1.19
1 parent 9a97415 commit 8074509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)