From 01ef73c11d7e979b00b4bdeb8a910131dcd12a1a Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 23 Sep 2019 09:33:45 +0800 Subject: [PATCH] fix typo --- msg.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/msg.go b/msg.go index 80f07f4..e4bafe9 100644 --- a/msg.go +++ b/msg.go @@ -61,17 +61,16 @@ func parseSubTypeMessageStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat re := regexp.MustCompile(`(📃){0,1}([a-zA-Z ]+) \(([0-9]+)\)( /view_[a-z0-9]+){0,1}\n{0,1}`) for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Items}"), -1) { -// fmt.Printf("parseSubTypeMessageStockAnyAck : %+q\n", l) - i := getObjItemID(``, l[2]) - q, _ := strconv.ParseInt(l[3], 10, 64) - if i != 0 { - item := ChatWarsItems{ - ItemID64: i, - Quantity: q, - } - items = append(items, item) + // fmt.Printf("parseSubTypeMessageStockAnyAck : %+q\n", l) + i := getObjItemID(``, l[2]) + q, _ := strconv.ParseInt(l[3], 10, 64) + if i != 0 { + item := ChatWarsItems{ + ItemID64: i, + Quantity: q, } - */ + items = append(items, item) + } } cwm.Stock = items