Created
October 20, 2019 16:47
-
-
Save zackproser/5db7b10b003e8b6b184509fd887e72e0 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 getNextCatfact(i int) string { | |
| if len(catfacts) == 0 { | |
| panic("Error loading CatFacts") | |
| } | |
| if i < len(catfacts) { | |
| return catfacts[i] | |
| } | |
| return getRandomStringFromSlice(catfacts) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment