func GetNextPost(s *session.Session, url string) Posts { response, err := s.RawGet(url) if err != nil { panic(err) } //Decode request var bunch Posts data, err := ioutil.ReadAll(response.Body) if err == nil && data != nil { err = json.Unmarshal(data, &bunch) } if err != nil { s.Log(string(data[:])) panic(err) } return bunch }