opt

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package opt provides common go-cmp.Options for use with assert.DeepEqual.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationWithThreshold

func DurationWithThreshold(threshold time.Duration) gocmp.Option

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

func TimeWithThreshold(threshold time.Duration) gocmp.Option

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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