From f2cf47ba9fdf075b374ddb9deebdd9ee4436f17e Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 06 三月 2020 14:22:55 +0800
Subject: [PATCH] Esinfo add carNo
---
client.go | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/client.go b/client.go
index a644a6e..d3539b0 100644
--- a/client.go
+++ b/client.go
@@ -1,6 +1,9 @@
package dbapi
-import "strconv"
+import (
+ "fmt"
+ "strconv"
+)
type Client interface {
//GET
@@ -13,7 +16,10 @@
DoDeleteRequest(url string, contentType string, body map[string]interface{}, headers map[string]string) ([]byte, error)
}
-var BASIC_URL = "http://192.168.1.11:8001"
+var BASIC_URL = "http://127.0.0.1:8001"
+
+var DEFAULT_IP = "127.0.0.1"
+var DEFAULT_PORT = 8001
const (
DATA_URL_PREFIX = "/data/api-v"
@@ -22,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