( dest: string, goPackageName: string, goFuncName: string )
| 735 | } |
| 736 | |
| 737 | async function writeEntrypoint( |
| 738 | dest: string, |
| 739 | goPackageName: string, |
| 740 | goFuncName: string |
| 741 | ) { |
| 742 | const modMainGoContents = await readFile( |
| 743 | join(__dirname, '../main.go'), |
| 744 | 'utf8' |
| 745 | ); |
| 746 | const mainModGoContents = modMainGoContents |
| 747 | .replace('__VC_HANDLER_PACKAGE_NAME', goPackageName) |
| 748 | .replace('__VC_HANDLER_FUNC_NAME', goFuncName); |
| 749 | await writeFile(dest, mainModGoContents, 'utf-8'); |
| 750 | } |
| 751 | |
| 752 | /** |
| 753 | * Writes a `go.mod` file in the specified directory. If a `go.mod` file |
no test coverage detected