1. 1
    Remove Elements from a slice in Go
    8m 18s

Remove Elements from a slice in Go

Jeff Roberts
InstructorJeff Roberts

Share this video with your friends

Send Tweet

Go has a special indexing syntax that forms the basis of removing one or more elements from a slice. I will teach you this syntax and show you its various forms.

Based upon that, I'll show you how to remove a single element from a slice. However, you may find this somewhat limiting. I also will show you a more typical example of removing elements from a slice as we iterate over it. This technique shows you how to remove multiple elements from a slice.