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 (if you don’t want to use SuperSliceOf). Or comparing a struct with SStruct and wanting to ignore some fields:

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

See also Ignore godoc.

Example

Base example