Array-Filter

command
v0.0.0-...-120d683 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 5 Imported by: 0

README

Filtering a slice/array

Golang has no built-in function(s) to filter a slice/array. This lesson will teach you two different ways to filter.

The first is to create a separate slice/array and add the filtered elements to it. This works great, but doesn't use memory as efficiently as the second way.

The second way shows you how to filter by altering the original slice/array in place without making another copy to hold the filtered elements. But, it has a side-effect that I'll tell you about which may help you decide which approach you will use.

Watch this lesson at Egghead.io.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL