This commit is contained in:
jiangyong27 2024-06-29 15:04:04 +08:00
parent 7b2512861b
commit 7094ddf7da
2 changed files with 1 additions and 24 deletions

View File

@ -16,7 +16,7 @@ type Sdk struct {
token string token string
} }
func NewSdk(address string, token string) *Sdk { func NewAdApi(address string, token string) *Sdk {
if address == "" { if address == "" {
address = "http://127.0.0.1:9281" address = "http://127.0.0.1:9281"
} }

View File

@ -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")
}