unify
This commit is contained in:
parent
7b2512861b
commit
7094ddf7da
|
@ -16,7 +16,7 @@ type Sdk struct {
|
|||
token string
|
||||
}
|
||||
|
||||
func NewSdk(address string, token string) *Sdk {
|
||||
func NewAdApi(address string, token string) *Sdk {
|
||||
if address == "" {
|
||||
address = "http://127.0.0.1:9281"
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package unify
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSdk(t1 *testing.T) {
|
||||
fmt.Println("ok1")
|
||||
sdk := NewSdk("http://localhost:9281", "10020", "")
|
||||
res, err := sdk.GetAccountReport("", "", "")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println("ok2")
|
||||
fmt.Println(len(res))
|
||||
fmt.Printf("%+v", res)
|
||||
for i, r := range res {
|
||||
fmt.Println(i, r.Name)
|
||||
}
|
||||
|
||||
fmt.Println("ok3")
|
||||
}
|
Loading…
Reference in New Issue