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

Function pushGoRpcMethodComment

scripts/codegen/go.ts:283–301  ·  view source on GitHub ↗
(
    lines: string[],
    methodName: string,
    method: RpcMethod,
    resultSchema: JSONSchema7 | undefined,
    paramsDescription?: string,
    indent = "",
    fallbackVerb = "calls"
)

Source from the content-addressed store, hash-verified

281}
282
283function pushGoRpcMethodComment(
284 lines: string[],
285 methodName: string,
286 method: RpcMethod,
287 resultSchema: JSONSchema7 | undefined,
288 paramsDescription?: string,
289 indent = "",
290 fallbackVerb = "calls"
291): void {
292 const paragraphs = [goMethodDocSummary(methodName, method, fallbackVerb), `RPC method: ${method.rpcMethod}.`];
293 if (paramsDescription) {
294 paragraphs.push(`Parameters: ${paramsDescription}`);
295 }
296 const resultDescription = goRpcResultDescription(method, resultSchema);
297 if (resultDescription) {
298 paragraphs.push(`Returns: ${resultDescription}`);
299 }
300 pushGoComment(lines, paragraphs.join("\n\n"), indent);
301}
302
303function goCommentLines(text: string, indent = "", wrap = true): string[] {
304 const prefix = `${indent}//`;

Callers 3

emitMethodFunction · 0.85

Calls 5

goMethodDocSummaryFunction · 0.85
goRpcResultDescriptionFunction · 0.85
pushGoCommentFunction · 0.85
joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…