Messaging/pkg/internal/models/utils.go

9 lines
167 B
Go

package models
import jsoniter "github.com/json-iterator/go"
func FitStruct(src any, out any) {
raw, _ := jsoniter.Marshal(src)
_ = jsoniter.Unmarshal(raw, out)
}