code: func MatchedBy(fn interface{}) argumentMatcher {
  	fnType := reflect.TypeOf(fn)
  
  	if fnType.Kind() != reflect.Func {
  		panic(fmt.Sprintf("assert: arguments: %s is not a func", fn))
  	}
  	if fnType.NumIn() != 1 {
  		panic(fmt.Sprintf("assert: arguments: %s does not take exactly one argument", fn))
  	}
  	if fnType.NumOut() != 1 || fnType.Out(0).Kind() != reflect.Bool {
  		panic(fmt.Sprintf("assert: arguments: %s does not return a bool", fn))
  	}
  
  	return argumentMatcher{fn: reflect.ValueOf(fn)}
  }
docs: // MatchedBy can be used to match a mock call based on only certain properties
  // from a complex struct or some calculation. It takes a function that will be
  // evaluated with the called argument and will return true when there's a match
  // and false otherwise.
  //
  // Example:
  // m.On("Do", MatchedBy(func(req *http.Request) bool { return req.Host == "example.com" }))
  //
  // |fn|, must be a function accepting a single argument (of the expected type)
  // which returns a bool. If |fn| doesn't match the required signature,
  // MatchedBy() panics.