package user import ( "testing" ) func Test_GetUserByToken(t *testing.T) { dbname := "dev_tetele_net" token := "5536827c-36a5-4ec7-946d-49e4380c5103" res, err := GetUserByToken(dbname, token, "111.229.34.252:7976") t.Log(res) t.Log(res["UserId"]) t.Log(err) res, err = GetUserById(dbname, "114") t.Log(res) t.Log(res["UserId"]) t.Log(err) } func Test_Login(t *testing.T) { dbname := "dev_tetele_net" account := "adminw" password := "e10adc3949ba59abbe56e057f20f883e" res, err := Login(dbname, account, password) t.Log(res) t.Log(res["UserId"]) t.Log(err) }