typecmp

package
v0.13.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package typecmp compares Go types (not values).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distance

type Distance uint64

Distance measures the distance between two types. The higher the number, the more dissimilar the types are.

const (
	// Identical is a Distance that indicates two types are identical.
	Identical Distance = 0

	// Unrelated is a Distance that indicate two types are totally unrelated.
	Unrelated Distance = math.MaxUint64
)

func MeasureDistance

func MeasureDistance(a, b reflect.Type) Distance

MeasureDistance returns the "distance" between two types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL