MCPcopy Index your code
hub / github.com/github/copilot-sdk / pushGoFieldMarkers

Function pushGoFieldMarkers

scripts/codegen/go.ts:250–260  ·  view source on GitHub ↗

* 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")

Source from the content-addressed store, hash-verified

248 * regular struct emitter and the discriminated-union variant emitters.
249 */
250function 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
262function lowerFirst(value: string): string {
263 if (value.length === 0) return value;

Callers 4

emitGoStructFunction · 0.85

Calls 6

isSchemaDeprecatedFunction · 0.85
pushGoCommentForContextFunction · 0.85
isSchemaExperimentalFunction · 0.85
isSchemaInternalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…