feat:完善产品详情

This commit is contained in:
henry
2021-12-09 16:17:23 +08:00
parent adc698840c
commit 626f30a2bd
13 changed files with 361 additions and 359 deletions

23
serve/es/es_test.go Normal file
View File

@ -0,0 +1,23 @@
package es
import (
"strings"
"testing"
)
var (
dataIndex = "test"
)
func TestNewInstance(t *testing.T) {
NewInstance(
WithEsAddress([]string{"http://192.168.0.188:9200"}),
).Init().Local()
var b strings.Builder
b.WriteString(`{"title" : "`)
b.WriteString("我是好人")
b.WriteString(`"}`)
resp, err := client.Create(dataIndex, "2", strings.NewReader(b.String()))
t.Log(err)
t.Log(resp)
}