gf
gf copied to clipboard
frame/g/Dump: It is recommended to enhance the log friendliness of g.Dump.
Description
现在的Dump在打印日志时,对部分类型的数据显示不是太友好,特别是字节数组,每个字节都会占用一行。 推荐借鉴或引入 https://github.com/davecgh/go-spew 库来增强g.Dump()
Additional
这是 spew.Dump() 的打印效果:
这是 g.Dump() 效果
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Description
When printing logs, the current Dump is not very friendly to the display of some types of data, especially byte arrays, where each byte occupies one line. It is recommended to learn from or introduce the https://github.com/davecgh/go-spew library to enhance g.Dump()
Additional
This is what spew.Dump() prints out:
This is the effect of g.Dump()