From 64b0b7fe52a009df0366b46064e323b1fc6e36c8 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 5 Feb 2020 18:42:19 +0800 Subject: [PATCH] update with version --- def.go | 1 + main.go | 1 + mq.go | 1 + 3 files changed, 3 insertions(+) diff --git a/def.go b/def.go index 1db0463..cb147dd 100644 --- a/def.go +++ b/def.go @@ -43,6 +43,7 @@ type MQKeepAlive struct { Nickname string `json:"nick"` Queue string `json:"queue"` Date time.Time `json:"date"` + Build string `json:"build"` } const ( diff --git a/main.go b/main.go index 1e64efe..5db2021 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,7 @@ var ( history = flag.Bool("history", false, "initialize chat history") historyChatID64 = flag.Int64("chat_id", 0, "chat to historize") historySenderUserID64 = flag.Int64("sender_user_id", 0, "sender_user_id to historize") + githash = "unknown" cfg Config diff --git a/mq.go b/mq.go index 5801dce..dac4887 100644 --- a/mq.go +++ b/mq.go @@ -120,6 +120,7 @@ func MQKeepAliveWorker() { Nickname: cfg.Rabbit.User, Queue: cfg.Rabbit.ReceiveQueue, Date: t, + Build: githash, } b, err := json.Marshal(m) if err != nil {