From 9dda95e194a0c947f1ad41dda7d916d4a0b2fb93 Mon Sep 17 00:00:00 2001 From: 554325746@qq.com <554325746@qq.com> Date: 星期二, 25 六月 2019 16:22:25 +0800 Subject: [PATCH] binfos struct to []byte --- dbpersoninfo.go | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dbpersoninfo.go b/dbpersoninfo.go index 24f1f93..a3f4c06 100644 --- a/dbpersoninfo.go +++ b/dbpersoninfo.go @@ -54,7 +54,9 @@ // Getdbpersonmsg("") //} -func Getdbpersonmsg(teststring string, IsCompare bool) ([]protomsg.Baseinfo) { +func Getdbpersonmsg(teststring string, IsCompare bool) ([]byte) { + + var binfos protomsg.Binfos if !IsCompare { return nil @@ -71,8 +73,15 @@ firsttime := time.Now() Rscore := Cmap.Walk(Printest, teststring) + + binfos.Infos = append(binfos.Infos, Rscore...) + binfosbytes, err := binfos.Marshal() + if err != nil { + fmt.Println(err) + return nil + } fmt.Println(time.Since(firsttime)) - return Rscore + return binfobytes } func Printest(ci, co string ) (float32){ -- Gitblit v1.8.0