package esutil import( "testing" "fmt" "encoding/json" ) func TestEsReq(t *testing.T){ requstbody, err := json.Marshal(map[string]interface{}{ "content":"v2.0.0", "collection": "0", }) if err != nil { fmt.Println("json parse error ", err) return } EsReq("PUT","http://192.168.1.203:9200/personaction/perVideoAction/fcddbddf-4580-43f3-b79a-32343c823df2?pretty", requstbody) } func TestGetDbinfo(t *testing.T){ dbinfos, err := DbPersoninfos(0,10) if err != nil { fmt.Println(err) return } fmt.Println(dbinfos) }