...

Package function

import "github.com/google/go-cmp/cmp/internal/function"
Overview
Index

Overview ▾

Package function provides functionality for identifying function types.

Constants

const (
    Equal             = ttbFunc // func(T, T) bool
    EqualAssignable   = tibFunc // func(T, I) bool; encapsulates func(T, T) bool
    Transformer       = trFunc  // func(T) R
    ValueFilter       = ttbFunc // func(T, T) bool
    Less              = ttbFunc // func(T, T) bool
    ValuePredicate    = tbFunc  // func(T) bool
    KeyValuePredicate = trbFunc // func(T, R) bool
)

func IsType

func IsType(t reflect.Type, ft funcType) bool

IsType reports whether the reflect.Type is of the specified function type.

func NameOf

func NameOf(v reflect.Value) string

NameOf returns the name of the function value.