From e56cbb8f096f5abf963e329a4eca026691adc1ad Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Thu, 1 Jun 2017 01:40:36 +1000 Subject: [PATCH] key value pair helper function --- chatSession.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chatSession.go b/chatSession.go index 628a08f..71767f6 100644 --- a/chatSession.go +++ b/chatSession.go @@ -140,6 +140,10 @@ func (ss *openIDSessionData) setKvPair(key, val string) { ss.UpdateAt = int32(time.Now().Unix()) } +func (ss *openIDSessionData) getVal(key string) string { + return ss.KvPair[key] +} + //main entry point for processing each incoming message //this stage has session date available func (ss *openIDSessionData) incomingMsg(v InWechatMsg) {