Example #1
0
func isComparable(typ types.Type) bool {
	return types.Comparable(typ)
}
Example #2
0
func isFullyComparable(typ types.Type) bool {
	ptr, isPtr := typ.Underlying().(*types.Pointer)
	return (isPtr && types.Comparable(ptr.Elem())) || (!isPtr && types.Comparable(typ))
}