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

Function write

__tests__/go-implements-embedding.test.ts:390–393  ·  view source on GitHub ↗
(rel: string, content: string)

Source from the content-addressed store, hash-verified

388 it('re-derives what the struct embedding it satisfies', async () => {
389 dir = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-go-implements-sync-'));
390 const write = (rel: string, content: string) => {
391 fs.mkdirSync(path.dirname(path.join(dir, rel)), { recursive: true });
392 fs.writeFileSync(path.join(dir, rel), content);
393 };
394 const base = 'package base\n\ntype Base struct{}\n\nfunc (Base) Close() error { return nil }\n';
395 write('go.mod', 'module example.com/app\n\ngo 1.22\n');
396 write('api/api.go', 'package api\n\ntype NamedCloser interface {\n\tClose() error\n\tName() string\n}\n');

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected