Skip to content

Instantly share code, notes, and snippets.

@sbose78
Created July 17, 2017 07:15
Show Gist options
  • Save sbose78/711978fc0129ee90348d12bd9131ff39 to your computer and use it in GitHub Desktop.
Save sbose78/711978fc0129ee90348d12bd9131ff39 to your computer and use it in GitHub Desktop.
if len(spacesToGetEntitlementsFor) >= maxRecentSpacesForRPT {
// we need to take out the recent 10 spaces.
// So if the array is of length 13 , then we need to cut out
// an array from index 3 to index 12
// start_index = 13 - 10 = 3 , end_index = 13-1
totalNumberOfRecentSpaces := len(spacesToGetEntitlementsFor)
spacesToGetEntitlementsFor = spacesToGetEntitlementsFor[totalNumberOfRecentSpaces-maxRecentSpacesForRPT : totalNumberOfRecentSpaces]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment