package wx_helper_sdk import ( "fmt" "testing" ) var wxh WxHelper func init() { wxh = NewWxHelper("", 0) } func TestClientCheckUserIsLogin(t *testing.T) { ok := wxh.CheckUserIsLogin() fmt.Println(ok) } func TestClientGetCurrentLoginUser(t *testing.T) { info, err := wxh.GetCurrentLoginUserInfo() if err != nil { t.Logf("failed: %v", err.Error()) return } fmt.Printf("%+v\n", info) } func TestClientGetContactList(t *testing.T) { list, err := wxh.GetContactList(false) if err != nil { return } fmt.Printf("%+v", list) }