This commit is contained in:
richboo111
2022-08-19 14:07:56 +08:00
3 changed files with 20 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ func init() {
appKey := "N0R033L2QQFR53" appKey := "N0R033L2QQFR53"
secretKey := "686ffc3e31c24594838baed045563790" secretKey := "686ffc3e31c24594838baed045563790"
api = New(appKey, secretKey, "") api = New(appKey, secretKey, "")
api.GetAccessToken() //api.GetAccessToken()
// api.GetAccessToken() // api.GetAccessToken()
} }

View File

@@ -40,6 +40,13 @@ func TestCode343(t *testing.T) {
fmt.Println(data) 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) { func TestCode22(t *testing.T) {
fmt.Println(2&4 != 0) fmt.Println(2&4 != 0)
fmt.Println(2&2 != 0) fmt.Println(2&2 != 0)

View File

@@ -1,6 +1,9 @@
package utils package utils
import "time" import (
"reflect"
"time"
)
func String2Pointer(value string) *string { func String2Pointer(value string) *string {
return &value return &value
@@ -72,3 +75,11 @@ func Pointer2Time(ptr *time.Time) (value time.Time) {
} }
return value return value
} }
func IsNil(i interface{}) bool {
defer func() {
recover()
}()
vi := reflect.ValueOf(i)
return vi.IsNil()
}