Skip to content

Instantly share code, notes, and snippets.

@gerep
Created November 5, 2014 12:54
Embed
What would you like to do?
func main() {
scores := []int{1,2,3,4,5}
scores = removeAtIndex(scores, 2)
}
func removeAtIndex(source []int, index int) []int {
source = append(source[:index], source[index+1:]...)
return source
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment