Return result with error

This commit is contained in:
Nomadic 2019-09-15 10:56:58 +03:00
parent 5d2fb52297
commit 1faa46f8d1
2 changed files with 15 additions and 5 deletions

View file

@ -20,6 +20,9 @@ import (
func main() {
for tweet := range twitterscraper.GetTweets("kennethreitz", 25) {
if tweet.Error != nil {
panic(tweet.Error)
}
fmt.Println(tweet.HTML)
}
}