Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maputil.MapTo方法有误 #169

Closed
az2az opened this issue Feb 18, 2024 · 2 comments
Closed

Maputil.MapTo方法有误 #169

az2az opened this issue Feb 18, 2024 · 2 comments

Comments

@az2az
Copy link

az2az commented Feb 18, 2024

执行方法Maputil.MapTo,当dst指向的对象内嵌对象为指针时会报错。比如:
type MerchantModelMsg struct {
Id string json:"_id"
InsertTime int64 json:"insert_time"
UpdateTime int64 json:"update_time"
DeleteTime int64 json:"delete_time"
LastVersion int64 json:"last_version"
DataVersion int64 json:"data_version"
Data *MerchantModelMsg_Data json:"data" //此处会报错,如果为MerchantModelMsg_Data类型则不会。
}

type MerchantModelMsg_Data struct {
CreditCode string json:"credit_code"
CreditName string json:"credit_name"
}

//grpc生成的代码一般都是指针类型,请大佬修复一下,谢谢

@duke-git
Copy link
Owner

@az2az ok,下个版本(v2.2.10)会修复。

duke-git added a commit that referenced this issue Feb 20, 2024
@duke-git
Copy link
Owner

duke-git commented Mar 5, 2024

v2.3.0版本已修复

@duke-git duke-git closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants