From a3b44ba5d984f14f5b2a73c9c7607c290010eda0 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 27 Mar 2019 13:26:59 +0000 Subject: [PATCH] add debug log --- module/apis/google/google.go | 1 + module/message-command/line-group.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/apis/google/google.go b/module/apis/google/google.go index 2e03d51..3686666 100644 --- a/module/apis/google/google.go +++ b/module/apis/google/google.go @@ -94,6 +94,7 @@ func QueryYoutubeName(id string) (n string, err error) { } bodyBytes, err := ioutil.ReadAll(resp.Body) + fmt.Println("show yt resp body :: ", string(bodyBytes)) if err != nil { return "", err } diff --git a/module/message-command/line-group.go b/module/message-command/line-group.go index 09dd029..34d91ce 100644 --- a/module/message-command/line-group.go +++ b/module/message-command/line-group.go @@ -278,7 +278,7 @@ func addYoutubeChannel(sub, txt string, s *lineobj.SourceObject) (res string) { } ytName, err := googleapi.QueryYoutubeName(args[0]) if err != nil || len(ytName) == 0 { - fmt.Println("get youtube channel name fail :: ", err) + fmt.Println("get youtube channel name fail :: ", err, ytName) return "get youtube channel name fail" }