有序地图 相当于python集合的golang数据类型。 保留地图中的按键顺序 可以JSON序列化/反序列化 用法 package main import ( "encoding/json" "github.com/iancoleman/orderedmap" ) func main () { // use New() instead of o := map[string]interface{}{} o := orderedmap . New () // use SetEscapeHTML() to whether escape problematic HTML characters or not, defaults is true o . SetEscapeHTML ( false ) // use Set instead o