From 9277f37f41d157db9e6f10b63fbe77f250980a43 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期一, 24 五月 2021 17:19:44 +0800
Subject: [PATCH] add gb TreeSelected
---
client.go | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/client.go b/client.go
index 98807f2..21ed3cc 100644
--- a/client.go
+++ b/client.go
@@ -1,6 +1,9 @@
package dbapi
-import "strconv"
+import (
+ "fmt"
+ "strconv"
+)
type Client interface {
//GET
@@ -10,7 +13,7 @@
//PUT
DoPutRequest(url string, contentType string, body map[string]interface{}, headers map[string]string) ([]byte, error)
//DELETE
- DoDeleteRequest(url string, contentType string, body map[string]interface{}, headers map[string]string) ([]byte, error)
+ DoDeleteRequest(url string, contentType string, body map[string]interface{}, params map[string]string, headers map[string]string) ([]byte, error)
}
var BASIC_URL = "http://127.0.0.1:8001"
@@ -25,7 +28,16 @@
CONTENT_TYPE_JSON = "application/json"
)
+var logPrint = func(i ...interface{}) {
+ fmt.Println(i)
+}
//鍒濆鍖杁bserver鐨勫湴鍧�鍜岀鍙�
func Init(ip string,port int){
BASIC_URL = "http://"+ ip + ":" + strconv.Itoa(port)
+}
+
+func InitLog(fn func(i ...interface{})) {
+ if fn != nil {
+ logPrint = fn
+ }
}
\ No newline at end of file
--
Gitblit v1.8.0