From 50d659d4b3574d72dd8e3d06495bcc98195c7811 Mon Sep 17 00:00:00 2001 From: guzeng Date: Tue, 9 Mar 2021 15:59:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.sum | 8 ++++++++ user.client_test.go | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 go.sum diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..0a0e052 --- /dev/null +++ b/go.sum @@ -0,0 +1,8 @@ +github.com/chai2010/protorpc v1.0.0 h1:aJ45G9sl1utSKo35EqnBSTs5jqTpdJDJAuZMMYPAtFo= +github.com/chai2010/protorpc v1.0.0/go.mod h1:woR3WwjaQDqFjlzdVsFEKiK5Ur12QL8mYxVPjfr5z54= +github.com/golang/protobuf v1.0.0 h1:lsek0oXi8iFE9L+EXARyHIjU5rlWIhhTkjDz3vHhWWQ= +github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049 h1:K9KHZbXKpGydfDN0aZrsoHpLJlZsBrGMFWbgLDGnPZk= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/user.client_test.go b/user.client_test.go index 7a78fa8..b61b262 100644 --- a/user.client_test.go +++ b/user.client_test.go @@ -12,14 +12,14 @@ func Test_GetUserByToken(t *testing.T) { t.Log(res["UserId"]) t.Log(err) - res, err = GetUserByUsername(dbname, "tetele") - t.Log(res) - t.Log(res["UserId"]) + res2, err := GetUserByUsername(dbname, "tetele") + t.Log(res2) + t.Log(res2.GetUserId()) t.Log(err) - res, err = GetUserByUsercode(dbname, "2233") - t.Log(res) - t.Log(res["UserId"]) + res3, err := GetUserByUsercode(dbname, "2233") + t.Log(res3) + t.Log(*res3.UserId) t.Log(err) }