示例#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))
}