MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / write

Function write

__tests__/go-implements-stdlib.test.ts:463–466  ·  view source on GitHub ↗
(rel: string, content: string)

Source from the content-addressed store, hash-verified

461 it('re-reads the standard-library type it names', async () => {
462 dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-go-implements-stdlib-sync-'));
463 const write = (rel: string, content: string) => {
464 fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true });
465 fs.writeFileSync(path.join(dir, rel), content);
466 };
467 const api = 'package api\n\nimport stdio "io"\n\ntype SyncWriter interface {\n\tstdio.Writer\n\tSync() error\n}\n';
468 write('go.mod', 'module example.com/app\n\ngo 1.22\n');
469 write('api/api.go', api);

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected