From 817b08673837920a36dae18a71cd80986f88ad54 Mon Sep 17 00:00:00 2001 From: shoopea Date: Tue, 14 Jan 2020 10:38:42 +0800 Subject: [PATCH] test --- main.go | 2 -- utils.go | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 2c698fc..57b4de6 100644 --- a/main.go +++ b/main.go @@ -5,13 +5,11 @@ package main import ( "database/sql" "flag" - "fmt" "log" "math/rand" "sync" "time" - "gopkg.in/gcfg.v1" //"github.com/robfig/cron/v3" "gopkg.in/robfig/cron.v3" diff --git a/utils.go b/utils.go index 601fb69..5cb5d0c 100644 --- a/utils.go +++ b/utils.go @@ -1,11 +1,14 @@ package main import ( + "encoding/json" "errors" "log" "regexp" "strconv" "time" + + tb "gopkg.in/tucnak/telebot.v2" ) func failOnError(err error, msg string) { @@ -37,7 +40,7 @@ func MaxInt(a int, b int) int { } func PrintText(m *tb.Message) { - fmt.Printf("[%d] %s(%d) | %s(%d) : %s\n", m.ID, m.Chat.Title, m.Chat.ID, m.Sender.Username, m.Sender.ID, m.Text) + log.Printf("[%d] %s(%d) | %s(%d) : %s\n", m.ID, m.Chat.Title, m.Chat.ID, m.Sender.Username, m.Sender.ID, m.Text) return }