This commit is contained in:
shoopea 2019-05-13 14:16:44 +08:00
parent 46d3638d85
commit 16af1a0ad9

3
msg.go
View File

@ -1,14 +1,13 @@
package main package main
import ( import (
"errors"
"fmt" "fmt"
"regexp" "regexp"
"strconv" "strconv"
"time" "time"
) )
func parseSubTypeMessageMiniWar(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageMiniWar, err) { func parseSubTypeMessageMiniWar(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWarsMessageMiniWar, error) {
t, err := time.Parse("02/01/06 15:04", r.ReplaceAllString(m.Text, "${Time}")) t, err := time.Parse("02/01/06 15:04", r.ReplaceAllString(m.Text, "${Time}"))
logOnError(err, "parseSubTypeMessageMiniWar : parsing time : "+r.ReplaceAllString(m.Text, "${Time}")) logOnError(err, "parseSubTypeMessageMiniWar : parsing time : "+r.ReplaceAllString(m.Text, "${Time}"))
cwm := ChatWarsMessageMiniWar{ cwm := ChatWarsMessageMiniWar{