OpenMix 出品:https://openmix.org
Mix XFMT
可以打印结构体嵌套指针地址内部数据的格式化库
Formatting library that can print the internal data of the nested pointer address of the struct
Github
https://github.com/mix-go/xfmt
Overview
在 Golang 中使用 fmt 打印结构体时,无法打印指针字段内部的数据结构,导致增加 debug 难度,该库可以解决这个问题。
Installation
- 安装
go get -u github.com/mix-go/xfmt
Usage
-
支持的方法,与
fmt系统库完全一致Sprintf(format string, args ...interface{}) stringSprint(args ...interface{}) stringSprintln(args ...interface{}) stringPrintf(format string, args ...interface{})

MixGo XFMT是一个格式化库,专门解决Golang中结构体嵌套指针地址内部数据的打印问题,方便调试。它提供与标准库相同的API,并支持通过tag忽略特定引用字段。
最低0.47元/天 解锁文章
1245

被折叠的 条评论
为什么被折叠?



