# struct use MarshalIndent
dataByte, err := json.MarshalIndent(v, "", " ")
# str json use gjson @pretty
gjson.Get(task.Config, "@pretty").String()
golang pretty-print json
Beer Home2024-07-27 13:03
相关推荐
小羊在睡觉11 小时前
HLS视频金金计较.15 小时前
Go语言-2数据狐(Datafox)17 小时前
京东商品列表API接口解析(附 JSON 样例)平头哥AI1 天前
Day 22 _ 包装错误别丢链_%w、errors.Is 与 errors.Asmengzhi啊1 天前
缓存类CacheDataManager把临时数据存入json。做成插件·golang学习记1 天前
Go 1.27新特性: json/v2使用有趣指南王码码20351 天前
Go语言CGO:Go与C交互PC2005-cloud1 天前
DSH 白嫖指南:接入 Command Code Go、WorkBuddy 与 Trae 的免费额度名字还没想好☜1 天前
Docker 镜像瘦身进阶:用 distroless/scratch 把 Go 服务打到 10MB,以及没 shell 怎么调试lvshuocool1 天前
golang 多版本管理工具 -- g