chore(GoModuleGenerator): update comments for clarity in generateGoMod method

chore(GenerateProvider): format log message for consistency in main function
This commit is contained in:
Nawaz Dhandala
2026-01-22 12:43:45 +00:00
parent 0e27802f1a
commit 2771efcd87
2 changed files with 12 additions and 6 deletions

View File

@@ -18,8 +18,10 @@ export class GoModuleGenerator {
}
private async generateGoMod(): Promise<void> {
// Generate minimal go.mod - dependencies will be fetched at latest versions
// by running 'go get -u' after 'go mod tidy' in GenerateProvider.ts
/*
* Generate minimal go.mod - dependencies will be fetched at latest versions
* by running 'go get -u' after 'go mod tidy' in GenerateProvider.ts
*/
const goModContent: string = `module ${this.config.goModuleName}
go 1.23
@@ -29,9 +31,11 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0
)
`;
// Note: The version numbers above are placeholder minimum versions.
// The actual latest versions will be fetched by running 'go get -u ./...'
// after 'go mod tidy' in the generation process.
/*
* Note: The version numbers above are placeholder minimum versions.
* The actual latest versions will be fetched by running 'go get -u ./...'
* after 'go mod tidy' in the generation process.
*/
await this.fileGenerator.writeFile("go.mod", goModContent);
}

View File

@@ -97,7 +97,9 @@ async function main(): Promise<void> {
await generator.generateBuildScripts();
// Step 11: Run go mod tidy and update dependencies to latest
Logger.info("📦 Step 10: Running go mod tidy and fetching latest dependencies...");
Logger.info(
"📦 Step 10: Running go mod tidy and fetching latest dependencies...",
);
try {
const originalCwd: string = process.cwd();