You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我测试了直接替换为encoding/json库进行反序列化,对CSI进行e2e测试中会遇到如下错误
json: cannot unmarshal number into Go struct field Snapshot.Snapshots.Snapshot.SourceDiskSize of type string
看来在替换前需要先确保Go的类型和json中的类型一致。
github.com/json-iterator/go库已长期无更新。
另外,github.com/modern-go/reflect2使用了一些反射技巧,使Golang链接器的dead code eliminate功能无法工作。在彻底去除reflect2后,CSI的二进制大小将从65M缩减到30M,缩减一半以上,非常可观。
The text was updated successfully, but these errors were encountered: