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