Created
May 13, 2019 17:40
-
-
Save dbridges/82efc771d7955d115f0e3a267915bba0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func filterFeeds(feeds []*Feed) ([]*Feed) { | |
cutoff := time.Now().Add(-24*time.Hour) | |
filtered := make([]*Feed, 0, len(feeds)) | |
for _, f := range feeds { | |
if time.Time(f.Updated).After(cutoff) { | |
filtered = append(filtered, f) | |
} | |
} | |
return filtered | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment