(
lines: string[],
structVar: string,
fieldNames: Map<string, string>,
properties: string[],
indent: string,
emitFinalReturn: boolean = false
)
| 1648 | } |
| 1649 | |
| 1650 | function pushGoJSONNegativePropertyLines( |
| 1651 | lines: string[], |
| 1652 | structVar: string, |
| 1653 | fieldNames: Map<string, string>, |
| 1654 | properties: string[], |
| 1655 | indent: string, |
| 1656 | emitFinalReturn: boolean = false |
| 1657 | ): string | undefined { |
| 1658 | const propertyChecks = emitFinalReturn ? properties.slice(0, -1) : properties; |
| 1659 | for (const propName of propertyChecks) { |
| 1660 | lines.push(`${indent}if ${structVar}.${fieldNames.get(propName)!} != nil {`); |
| 1661 | lines.push(`${indent}\treturn false`); |
| 1662 | lines.push(`${indent}}`); |
| 1663 | } |
| 1664 | if (!emitFinalReturn || properties.length === 0) return undefined; |
| 1665 | return `${structVar}.${fieldNames.get(properties[properties.length - 1])!} == nil`; |
| 1666 | } |
| 1667 | |
| 1668 | function pushGoJSONTargetedMatchSpecLines( |
| 1669 | lines: string[], |
no test coverage detected
searching dependent graphs…