add error log debug

This commit is contained in:
root 2019-03-27 13:22:53 +00:00
parent 10cf3bd085
commit f45a755dc5

View File

@ -278,11 +278,13 @@ func addYoutubeChannel(sub, txt string, s *lineobj.SourceObject) (res string) {
} }
ytName, err := googleapi.QueryYoutubeName(args[0]) ytName, err := googleapi.QueryYoutubeName(args[0])
if err != nil || len(ytName) == 0 { if err != nil || len(ytName) == 0 {
fmt.Println("get youtube channel name fail :: ", err)
return "get youtube channel name fail" return "get youtube channel name fail"
} }
ytData, err := model.GetYoutubeChannelWithID(args[0]) ytData, err := model.GetYoutubeChannelWithID(args[0])
if err != nil { if err != nil {
fmt.Println("get channel info fail :: ", err)
return "check youtube fail" return "check youtube fail"
} }
if ytData == nil { if ytData == nil {