diff --git a/platformapi/gome_live_show/guomei_token.go b/platformapi/gome_live_show/guomei_token.go index 20a587a0..857f1fd1 100644 --- a/platformapi/gome_live_show/guomei_token.go +++ b/platformapi/gome_live_show/guomei_token.go @@ -20,7 +20,7 @@ func init() { appKey := "N0R033L2QQFR53" secretKey := "686ffc3e31c24594838baed045563790" api = New(appKey, secretKey, "") - api.GetAccessToken() + //api.GetAccessToken() // api.GetAccessToken() } diff --git a/platformapi/tiktok/tiktok_test.go b/platformapi/tiktok/tiktok_test.go index 2ec29134..871da22b 100644 --- a/platformapi/tiktok/tiktok_test.go +++ b/platformapi/tiktok/tiktok_test.go @@ -33,6 +33,13 @@ func TestCode2(t *testing.T) { fmt.Println(data) } +func TestCode343(t *testing.T) { + a := New("5c8492ec2744fb72bb6cc356983f3cfc317f85d4", "ttaceeda5333d7a7ab01") + data, err := a.GetTiktokOauth("-j_QmmDM7B-mjKKk9wcijMeUTAV75mNXbJI4rqabt1IMkDGEmmw1M0-azYJwoXNOrWaDeXlw4xNivEd-uobXuuZrtt7bNn-6AMzf8jvkXp6Jm3LPcP56KisO9w4") + fmt.Println(err) + fmt.Println(data) +} + func TestCode22(t *testing.T) { fmt.Println(2&4 != 0) fmt.Println(2&2 != 0) diff --git a/utils/utils_type.go b/utils/utils_type.go index 8f74479f..73408b99 100644 --- a/utils/utils_type.go +++ b/utils/utils_type.go @@ -1,6 +1,9 @@ package utils -import "time" +import ( + "reflect" + "time" +) func String2Pointer(value string) *string { return &value @@ -72,3 +75,11 @@ func Pointer2Time(ptr *time.Time) (value time.Time) { } return value } + +func IsNil(i interface{}) bool { + defer func() { + recover() + }() + vi := reflect.ValueOf(i) + return vi.IsNil() +}