isEmpty gets whether the specified object is considered empty or not.
(object interface{})
| 748 | |
| 749 | // isEmpty gets whether the specified object is considered empty or not. |
| 750 | func isEmpty(object interface{}) bool { |
| 751 | // get nil case out of the way |
| 752 | if object == nil { |
| 753 | return true |
| 754 | } |
| 755 | |
| 756 | return isEmptyValue(reflect.ValueOf(object)) |
| 757 | } |
| 758 | |
| 759 | // isEmptyValue gets whether the specified reflect.Value is considered empty or not. |
| 760 | func isEmptyValue(objValue reflect.Value) bool { |