Skip to content

Commit

Permalink
chore:correcting go path-II
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya-eddy <aditya282003@gmail.com>
  • Loading branch information
Aditya-eddy committed Oct 8, 2024
1 parent 8388d10 commit ac4f08c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Utg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ async function Utg(context: vscode.ExtensionContext , additional_prompts?:string
} else if (extension === '.go') {
// Proceed as before for Go
//todo: have to detect the package name and instead of package main that should go there.
const defaultTestFilePath = path.join(currentFilePath, path.basename(sourceFilePath).replace('.go', '_test.go'));
const TestFilePath = path.dirname(currentFilePath);
console.log("TestFilePath is : ", TestFilePath);
const defaultTestFilePath = path.join(TestFilePath, path.basename(sourceFilePath).replace('.go', '_test.go'));
testFilePaths.push(defaultTestFilePath);
if (!fs.existsSync(defaultTestFilePath)) {
vscode.window.showInformationMessage("Test doesn't exist", defaultTestFilePath);
Expand Down

0 comments on commit ac4f08c

Please sign in to comment.