aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2022-11-10 23:59:42 +0300
committerla-ninpre <leobrekalini@gmail.com>2022-11-10 23:59:42 +0300
commitf327676a42240686c81c8898e99f2bd2896a9207 (patch)
treefbef06680eb07aa00f20661dfd1864fd863154f0
parent20171eaba4cfc881ed259b753b8d3d07079bc687 (diff)
downloadtelebonk-f327676a42240686c81c8898e99f2bd2896a9207.tar.gz
telebonk-f327676a42240686c81c8898e99f2bd2896a9207.zip
remove unnecessary struct and tweak logging
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index f1a660a..a7c29a8 100644
--- a/main.go
+++ b/main.go
@@ -186,11 +186,9 @@ type Mess struct {
type TelegramResponse struct {
Ok bool
Description string
- Result telegramResponseResult
-}
-
-type telegramResponseResult struct {
- MessageID int `json:"message_id"`
+ Result struct {
+ MessageID int `json:"message_id"`
+ }
}
// NewMess creates and populates a new Mess with default values.
@@ -354,6 +352,7 @@ func getHonks(after int) ([]*Honk, error) {
var honkJunk map[string][]*Honk
err = json.NewDecoder(resp.Body).Decode(&honkJunk)
if err != nil {
+ log.Print("gethonks: ", resp.Status)
return nil, err
}
@@ -445,6 +444,7 @@ var now = time.Now()
func main() {
var retry = 5
+ log.Print("starting telebonk") // info
for {
honks, err := getHonks(0)
if err != nil {