# 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
相关推荐
名字还没想好☜2 小时前
Go 内存逃逸分析:什么时候变量跑到堆上ttwuai3 小时前
后台管理系统 RBAC 排障:隐藏菜单后接口为什么还能调用Wang's Blog5 小时前
Go-Zero框架上手前奏2: 微服务核心要素 —— 拆分、通信与无状态设计Generalzy1 天前
从本地 Demo 到生产级检索:Milvus 学习笔记(2)小高Baby@1 天前
单链表的删操作灯澜忆梦1 天前
Go语言圣经 #7_1 | 接口约定、类型、值,sort Interface,http.Handler张3231 天前
Go语言基础 Map 函数值 闭包北冥you鱼1 天前
Go Modules 使用指南:从入门到精通灯澜忆梦1 天前
【dp_1】爬楼梯 | 斐波那契数 | 第 N 个泰波那契数 | 三步问题geovindu1 天前
go: Floyd-Warshall Algorithms