2,190
社区成员
发帖
与我相关
我的任务
分享
var info map[string]interface{}
var HouseType []map[string]interface{}
var housedetail map[string]interface{}
housedetail["Housetype"] = housetype
housedetail["Housearea"] = housearea
housedetail["HousepriceMax"] = housepriceMax
housedetail["HousepriceMin"] = housepriceMin
housedetail["Housedirection"] = housedirection
housedetail["Housedusage"] = housedusage
housedetail["Housesell"] = housesell
housedetail["Housesdeal"] = housesdeal
HouseType = append(HouseType,housedetail)
info["HouseType"] = HouseType
package main
import (
"fmt"
//"gospider/libs"
)
func main() {
info := make(map[string]interface{})
HouseType:= []map[string]interface {}{}
housedetail := make(map[string]interface{})
housedetail["Housetype"] = "3房2厅1卫"
housedetail["Housearea"] = 900
HouseType = append(HouseType, housedetail)
info["HouseType"] = HouseType
info["Price"] = 900
info["Comp"] = "恒大"
fmt.Println(info)
}
然而不知道为什么这么写