@@ -764,7 +764,7 @@ const (
764
764
)
765
765
766
766
// AnythingOfTypeArgument contains the type of an argument
767
- // for use when type checking. Used in Diff and Assert.
767
+ // for use when type checking. Used in [Arguments. Diff] and [Arguments. Assert] .
768
768
//
769
769
// Deprecated: this is an implementation detail that must not be used. Use [AnythingOfType] instead.
770
770
type AnythingOfTypeArgument = anythingOfTypeArgument
@@ -780,24 +780,25 @@ type anythingOfTypeArgument string
780
780
//
781
781
// For example:
782
782
//
783
- // Assert(t, AnythingOfType("string"), AnythingOfType("int"))
783
+ // args. Assert(t, AnythingOfType("string"), AnythingOfType("int"))
784
784
func AnythingOfType (t string ) AnythingOfTypeArgument {
785
785
return anythingOfTypeArgument (t )
786
786
}
787
787
788
788
// IsTypeArgument is a struct that contains the type of an argument
789
- // for use when type checking. This is an alternative to AnythingOfType.
790
- // Used in Diff and Assert.
789
+ // for use when type checking. This is an alternative to [ AnythingOfType] .
790
+ // Used in [Arguments. Diff] and [Arguments. Assert] .
791
791
type IsTypeArgument struct {
792
792
t reflect.Type
793
793
}
794
794
795
795
// IsType returns an IsTypeArgument object containing the type to check for.
796
796
// You can provide a zero-value of the type to check. This is an
797
- // alternative to AnythingOfType. Used in Diff and Assert.
797
+ // alternative to [ AnythingOfType] . Used in [Arguments. Diff] and [Arguments. Assert] .
798
798
//
799
799
// For example:
800
- // Assert(t, IsType(""), IsType(0))
800
+ //
801
+ // args.Assert(t, IsType(""), IsType(0))
801
802
func IsType (t interface {}) * IsTypeArgument {
802
803
return & IsTypeArgument {t : reflect .TypeOf (t )}
803
804
}
@@ -874,10 +875,11 @@ func (f argumentMatcher) String() string {
874
875
// and false otherwise.
875
876
//
876
877
// Example:
877
- // m.On("Do", MatchedBy(func(req *http.Request) bool { return req.Host == "example.com" }))
878
878
//
879
- // |fn|, must be a function accepting a single argument (of the expected type)
880
- // which returns a bool. If |fn| doesn't match the required signature,
879
+ // m.On("Do", MatchedBy(func(req *http.Request) bool { return req.Host == "example.com" }))
880
+ //
881
+ // fn must be a function accepting a single argument (of the expected type)
882
+ // which returns a bool. If fn doesn't match the required signature,
881
883
// MatchedBy() panics.
882
884
func MatchedBy (fn interface {}) argumentMatcher {
883
885
fnType := reflect .TypeOf (fn )
0 commit comments