Ignore

func Ignore() TestDeep

Ignore operator is always true, whatever data is. It is useful when comparing a slice with Slice and wanting to ignore some indexes, for example. Or comparing a struct with SStruct and wanting to ignore some fields:

td.Cmp(t, td.SStruct(
  Person{
    Name: "John Doe",
  },
  td.StructFields{
    Age:      td.Between(40, 45),
    Children: td.Ignore(),
  }),
)

See also Ignore godoc.

Example

Base example