package opt
import "gotest.tools/assert/opt"
Package opt provides common go-cmp.Options for use with assert.DeepEqual.
Index ¶
- func DurationWithThreshold(threshold time.Duration) gocmp.Option
- func TimeWithThreshold(threshold time.Duration) gocmp.Option
Functions ¶
func DurationWithThreshold ¶
DurationWithThreshold returns a gocmp.Comparer for comparing time.Duration. The Comparer returns true if the difference between the two Duration values is within the threshold and neither value is zero.
func TimeWithThreshold ¶
TimeWithThreshold returns a gocmp.Comparer for comparing time.Time. The Comparer returns true if the difference between the two Time values is within the threshold and neither value is zero.
Source Files ¶
opt.go
- Version
- v1.4.0 (latest)
- Published
- Mar 21, 2018
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 1 week ago –
Tools for package owners.