src/goEnvironmentStatus: remove a circular dependency

goInstallTools.ts imports goEnvironmentStatus.ts for initGoStatusBar.
goEnvironmentStatus.ts imported goInstallTools.ts for getActiveGoRoot.

The caller of getActiveGoRoot is the chooseGoEnvironment command
that is activated only after initGoStatusBar is called.
initGoStatusBar is called after updateGoVarsFromConfig, so calling
updateGoVarsFromConfig in getActiveGoRoot is unnecessary.

This CL replaces getActiveGoRoot with getCurrentGoRoot,
which removes the need to import goInstallTools.ts from
goEnvironmentStatus.ts.

Change-Id: I79320bd22fae7470c28dfd7f883a77b3a3c177a2
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/240694
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/goEnvironmentStatus.ts b/src/goEnvironmentStatus.ts
index 4f24e85..154803b 100644
--- a/src/goEnvironmentStatus.ts
+++ b/src/goEnvironmentStatus.ts
@@ -14,7 +14,6 @@
 import WebRequest = require('web-request');
 
 import { toolInstallationEnvironment } from './goEnv';
-import { getActiveGoRoot } from './goInstallTools';
 import { getCurrentGoRoot } from './goPath';
 import { outputChannel } from './goStatus';
 import { getBinPath, getGoConfig, getGoVersion } from './util';
@@ -285,7 +284,7 @@
 
 export async function getDefaultGoOption(): Promise<GoEnvironmentOption> {
 	// make goroot default to go.goroot
-	const goroot = await getActiveGoRoot();
+	const goroot = getCurrentGoRoot();
 	if (!goroot) {
 		throw new Error('No Go command could be found.');
 	}
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index 330fabb..3722807 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -493,13 +493,3 @@
 		return res.filter((x) => x != null);
 	});
 }
-
-export async function getActiveGoRoot(): Promise<string | undefined> {
-	// look for current current go binary
-	let goroot = getCurrentGoRoot();
-	if (!goroot) {
-		await updateGoVarsFromConfig();
-		goroot = getCurrentGoRoot();
-	}
-	return goroot || undefined;
-}