package function

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

Package function provides functionality for identifying function types.

Index

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
)

Functions

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.

Source Files

func.go

Version
v0.6.0 (latest)
Published
Aug 31, 2023
Platform
linux/amd64
Imports
4 packages
Last checked
5 days ago

Tools for package owners.