isEmpty returns true if given type is empty.
(dt expr.DataType)
| 1452 | |
| 1453 | // isEmpty returns true if given type is empty. |
| 1454 | func isEmpty(dt expr.DataType) bool { |
| 1455 | if dt == expr.Empty { |
| 1456 | return true |
| 1457 | } |
| 1458 | if o := expr.AsObject(dt); o != nil && len(*o) == 0 { |
| 1459 | return true |
| 1460 | } |
| 1461 | return false |
| 1462 | } |
| 1463 | |
| 1464 | // hasAnyType recursively checks if the given attribute uses the Any type. |
| 1465 | func hasAnyType(att *expr.AttributeExpr) bool { |
no test coverage detected