github.com/blend/go-sdk@v1.20220411.3/assert/predicates.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package assert 9 10 import "time" 11 12 // Predicate is a func that returns a bool. 13 type Predicate func(item interface{}) bool 14 15 //PredicateOfInt is a func that takes an int and returns a bool. 16 type PredicateOfInt func(item int) bool 17 18 // PredicateOfFloat is a func that takes a float64 and returns a bool. 19 type PredicateOfFloat func(item float64) bool 20 21 // PredicateOfString is a func that takes a string and returns a bool. 22 type PredicateOfString func(item string) bool 23 24 // PredicateOfTime is a func that takes a time.Time and returns a bool. 25 type PredicateOfTime func(item time.Time) bool