update log

This commit is contained in:
Jay 2018-12-06 11:05:39 +08:00
parent 3bca63f3fc
commit 1081bbe85d

View File

@ -69,6 +69,7 @@ func getHeaders() map[string]string {
// PushMessage - // PushMessage -
func PushMessage(target string, message interface{}) { func PushMessage(target string, message interface{}) {
log.Println("push target :::: ", target)
if len(target) == 0 { if len(target) == 0 {
return return
} }
@ -95,6 +96,7 @@ func PushMessage(target string, message interface{}) {
body.Messages = append(body.Messages, message) body.Messages = append(body.Messages, message)
dataByte, err := json.Marshal(body) dataByte, err := json.Marshal(body)
if err != nil { if err != nil {
log.Println("to json error ::::", err)
return return
} }
@ -102,6 +104,7 @@ func PushMessage(target string, message interface{}) {
apiURL, ok := getURL(urlPath) apiURL, ok := getURL(urlPath)
if !ok { if !ok {
log.Println("get url fail ::::::")
return return
} }
@ -114,6 +117,7 @@ func PushMessage(target string, message interface{}) {
req, err := apis.GetRequest(reqObj) req, err := apis.GetRequest(reqObj)
if err != nil { if err != nil {
log.Println("get req fail :::::: ", err)
return return
} }