This is my code, I want to run it in an infinite loop and whenever an user makes a new post with the hashtag this function will print its ShortCode. How to use Sync() to do it?
`
func GetNewPostsFromTags() {
h := Insta.NewHashtag("hashtag")
for {
for h.Next() {
for i := range h.Sections {
for _, i := range h.Sections[i].LayoutContent.Medias {
fmt.Println(i.Item.Code)
}
}
}
}
This is my code, I want to run it in an infinite loop and whenever an user makes a new post with the hashtag this function will print its ShortCode. How to use Sync() to do it?
` func GetNewPostsFromTags() {
} `