1
This commit is contained in:
@@ -3,6 +3,7 @@ package tiktok_api
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -16,10 +17,34 @@ func TestCancelWaybill(t *testing.T) {
|
||||
err := a.ShopOrderDispatcher(62490423, "5017358149445080799", 2)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
type tete struct {
|
||||
ids []int64
|
||||
name string
|
||||
}
|
||||
|
||||
func Test(t *testing.T) {
|
||||
a := make([]int64, 0)
|
||||
Strings2Objs(`[1262627,1723872383]`, &a)
|
||||
fmt.Println(a)
|
||||
//var a []int64
|
||||
var b interface{}
|
||||
//stType := reflect.TypeOf(a)
|
||||
//stValue := reflect.ValueOf(a)
|
||||
x := reflect.TypeOf(b)
|
||||
fmt.Println(reflect.TypeOf(a) == reflect.TypeOf([]int64{}))
|
||||
switch x {
|
||||
case reflect.TypeOf([]int64{}):
|
||||
|
||||
fmt.Println(1)
|
||||
case reflect.TypeOf([]string{}):
|
||||
fmt.Println(2)
|
||||
|
||||
}
|
||||
//fmt.Println(stType.NumField())
|
||||
//fmt.Println(stType.Field(0))
|
||||
//temp := stType.Field(0)
|
||||
//fmt.Println(temp.Type)
|
||||
|
||||
//Strings2Objs(`[1262627,1723872383]`, &a)
|
||||
//fmt.Printf("%v", reflect.TypeOf(a).NumField())
|
||||
}
|
||||
func Strings2Objs(strAndObjAddPairs ...interface{}) (err error) {
|
||||
str := ""
|
||||
|
||||
Reference in New Issue
Block a user