func properPlace(p Place) *Place { if zero, _ := is.Zero(p); zero { // we ignore the error because Place has no array fields return nil } else { return &p } }
func properEntities(tweet Tweet) *ArchiveEntities { if zero, _ := is.Zero(tweet.Entities); zero { // we ignore the error because Entities has no array fields return nil } else { return &ArchiveEntities{ tweet.Entities.Hashtags, tweet.Entities.Urls, tweet.Entities.User_mentions, convertMediaToArchive(tweet.Entities.Media), } } }