- 新增 DiscountedProduct 和 DiscountedProductChange 结构体 - 实现 mainJson 函数,包含多个 JSON 编码示例 - 更新 Product 结构体字段名称为导出形式 - 添加 mainJson1 到 mainJson7 的具体编码演示 -修复结构体标签和 JSON 序列化相关问题
8 lines
124 B
Go
8 lines
124 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func Printfln(template string, values ...interface{}) {
|
|
fmt.Printf(template+"\n", values...)
|
|
}
|