This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"errors" | |
"reflect" | |
"github.com/fatih/structs" | |
) | |
// Filter takes a slice of structs that have a field with the given fieldName | |
// and uses that to filter based on value. The parameter, keep, determines | |
// whether the filter process keeps only the items filtered (true) or removes | |
// them (false). |