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

通过llama.cpp与羊驼聊天的网页界面- 详解 Serge 的启动使用

 

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{} 代表值可以是任意类型。

 

Refer:有哪些Gin使用技巧

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

posted on 2020-04-03 19:44  ercom  阅读(2071)  评论(0编辑  收藏  举报