From 1310a498246feec68ea120f37b37c52f416a5d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=B5=B7=E4=BB=B2=E5=AD=90?= Date: Sat, 13 Aug 2022 22:16:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E7=94=A8=E6=96=87=E4=BB=B6=E6=B8=85?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exceptionless/api.go | 3 +++ exceptionless/log.go | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 exceptionless/log.go diff --git a/exceptionless/api.go b/exceptionless/api.go index ee58132..ebaff21 100644 --- a/exceptionless/api.go +++ b/exceptionless/api.go @@ -26,6 +26,9 @@ func Post(endpoint string, postBody string, authorization string) string { url := baseURL + endpoint var jsonStr = []byte(postBody) req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr)) + if err != nil { + return err.Error() + } req.Header.Set("Authorization", "Bearer "+authorization) req.Header.Set("Content-Type", "application/json") client := &http.Client{} diff --git a/exceptionless/log.go b/exceptionless/log.go deleted file mode 100644 index 8d7a42e..0000000 --- a/exceptionless/log.go +++ /dev/null @@ -1,6 +0,0 @@ -package exceptionless - -func createLog(source string, message string, level string, geo string, referenceID string, date string, value uint) { - // event := BuildEvent("log", message, source, nil, nil, nil, nil, nil, nil) - // fmt.Println(event) -}