* Emit `Deprecated:` / `Experimental:` / `Internal:` doc comments above a Go * struct field. Centralises the per-field marker logic shared between the * regular struct emitter and the discriminated-union variant emitters.
(lines: string[], prop: JSONSchema7, goName: string, ctx: GoCodegenCtx, indent = "\t")
| 248 | * regular struct emitter and the discriminated-union variant emitters. |
| 249 | */ |
| 250 | function pushGoFieldMarkers(lines: string[], prop: JSONSchema7, goName: string, ctx: GoCodegenCtx, indent = "\t"): void { |
| 251 | if (isSchemaDeprecated(prop)) { |
| 252 | pushGoCommentForContext(lines, `Deprecated: ${goName} is deprecated.`, ctx, indent); |
| 253 | } |
| 254 | if (isSchemaExperimental(prop)) { |
| 255 | pushGoExperimentalPropertyComment(lines, goName, ctx, indent); |
| 256 | } |
| 257 | if (isSchemaInternal(prop)) { |
| 258 | pushGoInternalPropertyComment(lines, goName, ctx, indent); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | function lowerFirst(value: string): string { |
| 263 | if (value.length === 0) return value; |
no test coverage detected
searching dependent graphs…