bonzai/filter/filter_test.go

26 lines
457 B
Go
Raw Normal View History

2022-02-17 21:35:42 +00:00
package filter_test
import (
"fmt"
"github.com/rwxrob/bonzai/filter"
)
func ExampleHasPrefix() {
set := []string{
"one", "two", "three", "four", "five", "six", "seven",
}
fmt.Println(filter.HasPrefix(set, "t"))
// Output:
// [two three]
}
func ExampleMinus() {
set := []string{
"one", "two", "three", "four", "five", "six", "seven",
}
fmt.Println(filter.Minus(set, []string{"two", "four", "six"}))
// Output:
// [one three five seven]
}