Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ReasonTypeKinds = fmt.Errorf("type kinds") // nolint ReasonCodecMarshalerImplementations = fmt.Errorf("codec marshaler implementations") // nolint ReasonCodecUnmarshalerImplementations = fmt.Errorf("codec unmarshaler implementations") // nolint ReasonArrayLength = fmt.Errorf("array length") // nolint ReasonArrayElement = fmt.Errorf("array element") // nolint ReasonMapKey = fmt.Errorf("map key") // nolint ReasonMapValue = fmt.Errorf("map value") // nolint ReasonPtrElememnt = fmt.Errorf("pointed type") // nolint ReasonSliceElement = fmt.Errorf("slice element") // nolint ReasonStructField = fmt.Errorf("struct field") // nolint ReasonInterfaceMethod = fmt.Errorf("interface method") // nolint ReasonChanDir = fmt.Errorf("channel direction") // nolint ReasonChanElement = fmt.Errorf("channel element") // nolint ReasonFuncInNum = fmt.Errorf("func in num") // nolint ReasonFuncOutNum = fmt.Errorf("func out num") // nolint ReasonFuncInType = fmt.Errorf("func in type") // nolint ReasonFuncOutType = fmt.Errorf("func out type") // nolint ReasonExportedFieldsCount = fmt.Errorf("exported fields count") // nolint ReasonExportedFieldName = fmt.Errorf("exported field name") // nolint ReasonExportedFieldTag = fmt.Errorf("exported field tag") // nolint ReasonExportedFieldNotFound = fmt.Errorf("exported field not found") // nolint ReasonExportedFieldType = fmt.Errorf("exported field type") // nolint ReasonExportedMethodsCount = fmt.Errorf("exported methods count") // nolint ReasonExportedMethodName = fmt.Errorf("exported method name") // nolint ReasonExportedMethodType = fmt.Errorf("exported method type") // nolint ReasonRecursiveCompare = fmt.Errorf("recursive compare") // nolint )
Functions ¶
func AllMethods ¶
func ExportedFields ¶
func ExportedFields(obj interface{}) []reflect.StructField
func ExportedMethods ¶
Types ¶
type Reason ¶
func Similar ¶
func Similar(a, b interface{}, codecFlag CodecFlag, smode SimilarMode, stack ...SimilarStack) (bool, *Reason)
type SimilarMode ¶
type SimilarMode uint
const ( StructFieldsOrdered SimilarMode = 1 << iota StructFieldTagsMatch InterfaceAllMethods AvoidRecursive )
type SimilarStack ¶
Click to show internal directories.
Click to hide internal directories.