From 683948f2749889fd127080c9a9c729b22f949102 Mon Sep 17 00:00:00 2001 From: naivekun Date: Mon, 19 Apr 2021 17:19:13 +0800 Subject: [PATCH] wechat reporter: add timestamp --- reporter/wechat/wechat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reporter/wechat/wechat.go b/reporter/wechat/wechat.go index 652e170..4d66d50 100644 --- a/reporter/wechat/wechat.go +++ b/reporter/wechat/wechat.go @@ -5,6 +5,7 @@ import ( "fmt" "sign-your-horse/common" "sign-your-horse/reporter" + "time" "github.com/imroc/req" "github.com/tidwall/gjson" @@ -48,7 +49,7 @@ func (w *WechatReporter) Report(msg string) error { MsgType: "text", AgentID: w.AgentID, Text: WechatPushBodyText{ - Content: msg, + Content: "[" + time.Now().Format("2006-01-02 15:04:05") + "]" + msg, }, Safe: 0, }