Skip to content

Conversation

@ozboms
Copy link
Collaborator

@ozboms ozboms commented Oct 21, 2021

tried to make it a little clearer based on my understanding (but if this changes the definition, feel free to lmk and I'll change it back)

tried to make it a little clearer based on my understanding (but if this changes the definition, feel free to lmk and I'll change it back)
@ozboms
Copy link
Collaborator Author

ozboms commented Oct 21, 2021

In the songs sample, we currently can just do songs[id] because the index happens to match the id; the sample should actually use a for loop just in case there are new songs that don't match the number index.

var data song // if the ids don't match the index for i := range songs { if songs[i].Id == reqIdInt { data = songs[i] } }

@ozboms
Copy link
Collaborator Author

ozboms commented Oct 21, 2021

add comments from code to pull request

@github-staff github-staff deleted a comment May 27, 2024
@github-staff github-staff deleted a comment May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant