[Gin] gin.H{} 与 map[string]interface{}

gin.H 中的 H 是对 map[string]interface{} 定义的新类型,用来简化生成 map 数据时的书写。

// H is a shortcut for map[string]interface{}
type H map[string]interface{}

map[string]interface{} 中的 string 代表键的类型,interface{} 代表值可以是任意类型。

Link:https://www.cnblogs.com/farwish/p/12628549.html

原文地址:https://www.cnblogs.com/farwish/p/12628549.html