Add npm script for formatting using prettier
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..410bca4
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,6 @@
+{
+	"printWidth": 120,
+	"singleQuote": true,
+	"arrowParens": "always",
+	"quoteProps": "consistent"
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 6e693ce..632d7eb 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,8 @@
     "test": "node ./out/test/runTest.js",
     "lint": "node ./node_modules/tslint/bin/tslint --project tsconfig.json",
     "fix-lint": "node ./node_modules/tslint/bin/tslint --fix --project tsconfig.json",
-    "unit-test": "node ./node_modules/mocha/bin/_mocha -u tdd --timeout 5000 --colors ./out/test/unit"
+    "unit-test": "node ./node_modules/mocha/bin/_mocha -u tdd --timeout 5000 --colors ./out/test/unit",
+    "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
   },
   "extensionDependencies": [],
   "dependencies": {
@@ -60,7 +61,8 @@
     "mocha": "^6.2.0",
     "tslint": "^5.19.0",
     "typescript": "^3.7.2",
-    "vscode-test": "^1.2.3"
+    "vscode-test": "^1.2.3",
+    "prettier": "^1.16.4"
   },
   "engines": {
     "vscode": "^1.30.0"
diff --git a/src/avlTree.ts b/src/avlTree.ts
index e1f6e65..b9c146d 100644
--- a/src/avlTree.ts
+++ b/src/avlTree.ts
@@ -41,11 +41,7 @@
 	 * @param key The key of the new node.
 	 * @param value The value of the new node.
 	 */
-	constructor(
-		public key: K,
-		public value: V
-	) {
-	}
+	constructor(public key: K, public value: V) {}
 
 	/**
 	 * Performs a right rotate on this node.
@@ -128,9 +124,8 @@
 }
 
 export class NearestNeighborDict<K, V> {
-
-	public static NUMERIC_DISTANCE_FUNCTION = (a: number, b: number) => a > b ? a - b : b - a;
-	public static DEFAULT_COMPARE_FUNCTION = (a: any, b: any) => a > b ? 1 : a < b ? -1 : 0;
+	public static NUMERIC_DISTANCE_FUNCTION = (a: number, b: number) => (a > b ? a - b : b - a);
+	public static DEFAULT_COMPARE_FUNCTION = (a: any, b: any) => (a > b ? 1 : a < b ? -1 : 0);
 
 	protected root: Node<K, V> = null;
 
@@ -217,10 +212,12 @@
 	}
 
 	/**
-	 * Gets a node within the tree with a specific key, or the node closest (as measured by this._distance) to that node if the key is not present
+	 * Gets a node within the tree with a specific key, or the node closest (as measured by this._distance)
+	 * to that node if the key is not present
 	 * @param key The key being searched for.
 	 * @param root The root of the tree to search in.
-	 * @param closest The current best estimate of the node closest to the node being searched for, as measured by this._distance
+	 * @param closest The current best estimate of the node closest to the node being searched for,
+	 * as measured by this._distance
 	 * @return The (key, value) pair of the node with key nearest the given key in value.
 	 */
 	private _getNearest(key: K, root: Node<K, V>, closest: Node<K, V>): Node<K, V> {
@@ -247,15 +244,24 @@
 	private _getBalanceState(node: Node<K, V>): BalanceState {
 		const heightDifference = node.leftHeight - node.rightHeight;
 		switch (heightDifference) {
-			case -2: return BalanceState.UNBALANCED_RIGHT;
-			case -1: return BalanceState.SLIGHTLY_UNBALANCED_RIGHT;
-			case 1: return BalanceState.SLIGHTLY_UNBALANCED_LEFT;
-			case 2: return BalanceState.UNBALANCED_LEFT;
-			case 0: return BalanceState.BALANCED;
+			case -2:
+				return BalanceState.UNBALANCED_RIGHT;
+			case -1:
+				return BalanceState.SLIGHTLY_UNBALANCED_RIGHT;
+			case 1:
+				return BalanceState.SLIGHTLY_UNBALANCED_LEFT;
+			case 2:
+				return BalanceState.UNBALANCED_LEFT;
+			case 0:
+				return BalanceState.BALANCED;
 			default: {
 				console.error('Internal error: Avl tree should never be more than two levels unbalanced');
-				if (heightDifference > 0) { return BalanceState.UNBALANCED_LEFT; }
-				if (heightDifference < 0) { return BalanceState.UNBALANCED_RIGHT; }
+				if (heightDifference > 0) {
+					return BalanceState.UNBALANCED_LEFT;
+				}
+				if (heightDifference < 0) {
+					return BalanceState.UNBALANCED_RIGHT;
+				}
 			}
 		}
 	}
diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts
index 78884a9..7305c3d 100644
--- a/src/debugAdapter/goDebug.ts
+++ b/src/debugAdapter/goDebug.ts
@@ -11,9 +11,32 @@
 import * as path from 'path';
 import { basename, dirname, extname } from 'path';
 import * as util from 'util';
-import { Breakpoint, DebugSession, Handles, InitializedEvent, logger, Logger, LoggingDebugSession, OutputEvent, Scope, Source, StackFrame, StoppedEvent, TerminatedEvent, Thread, ThreadEvent } from 'vscode-debugadapter';
+import {
+	Breakpoint,
+	DebugSession,
+	Handles,
+	InitializedEvent,
+	logger,
+	Logger,
+	LoggingDebugSession,
+	OutputEvent,
+	Scope,
+	Source,
+	StackFrame,
+	StoppedEvent,
+	TerminatedEvent,
+	Thread,
+	ThreadEvent
+} from 'vscode-debugadapter';
 import { DebugProtocol } from 'vscode-debugprotocol';
-import { envPath, fixDriveCasingInWindows, getBinPathWithPreferredGopath, getCurrentGoWorkspaceFromGOPATH, getInferredGopath, parseEnvFile } from '../goPath';
+import {
+	envPath,
+	fixDriveCasingInWindows,
+	getBinPathWithPreferredGopath,
+	getCurrentGoWorkspaceFromGOPATH,
+	getInferredGopath,
+	parseEnvFile
+} from '../goPath';
 
 const fsAccess = util.promisify(fs.access);
 const fsUnlink = util.promisify(fs.unlink);
@@ -211,7 +234,7 @@
 	showLog?: boolean;
 	logOutput?: string;
 	cwd?: string;
-	env?: { [key: string]: string; };
+	env?: { [key: string]: string };
 	mode?: 'auto' | 'debug' | 'remote' | 'test' | 'exec';
 	remotePath?: string;
 	port?: number;
@@ -233,7 +256,7 @@
 
 	showGlobalVariables?: boolean;
 	currentFile: string;
-	packagePathToGoModPathMap: {[key: string]: string};
+	packagePathToGoModPathMap: { [key: string]: string };
 }
 
 interface AttachRequestArguments extends DebugProtocol.AttachRequestArguments {
@@ -268,11 +291,11 @@
 });
 
 function logArgsToString(args: any[]): string {
-	return args.map((arg) => {
-		return typeof arg === 'string' ?
-			arg :
-			JSON.stringify(arg);
-	}).join(' ');
+	return args
+		.map((arg) => {
+			return typeof arg === 'string' ? arg : JSON.stringify(arg);
+		})
+		.join(' ');
 }
 
 function log(...args: any[]) {
@@ -337,7 +360,7 @@
 			if (mode === 'remote') {
 				this.debugProcess = null;
 				this.isRemoteDebugging = true;
-				serverRunning = true;  // assume server is running when in remote mode
+				serverRunning = true; // assume server is running when in remote mode
 				connectClient(launchArgs.port, launchArgs.host);
 				return;
 			}
@@ -407,15 +430,21 @@
 							this.debugProcess = spawn(getBinPathWithPreferredGopath('go', []), runArgs, { env });
 							this.debugProcess.stderr.on('data', (chunk) => {
 								const str = chunk.toString();
-								if (this.onstderr) { this.onstderr(str); }
+								if (this.onstderr) {
+									this.onstderr(str);
+								}
 							});
 							this.debugProcess.stdout.on('data', (chunk) => {
 								const str = chunk.toString();
-								if (this.onstdout) { this.onstdout(str); }
+								if (this.onstdout) {
+									this.onstdout(str);
+								}
 							});
 							this.debugProcess.on('close', (code) => {
 								logError('Process exiting with code: ' + code);
-								if (this.onclose) { this.onclose(code); }
+								if (this.onclose) {
+									this.onclose(code);
+								}
 							});
 							this.debugProcess.on('error', (err) => {
 								reject(err);
@@ -428,8 +457,14 @@
 				this.noDebug = false;
 
 				if (!existsSync(launchArgs.dlvToolPath)) {
-					log(`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${env['GOPATH'] ? ', ' + env['GOPATH'] : ''} or ${envPath}`);
-					return reject(`Cannot find Delve debugger. Install from https://github.com/derekparker/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".`);
+					log(
+						`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${
+							env['GOPATH'] ? ', ' + env['GOPATH'] : ''
+						} or ${envPath}`
+					);
+					return reject(
+						`Cannot find Delve debugger. Install from https://github.com/derekparker/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".`
+					);
 				}
 
 				const currentGOWorkspace = getCurrentGoWorkspaceFromGOPATH(env['GOPATH'], dirname);
@@ -475,7 +510,9 @@
 				}
 
 				if (!existsSync(launchArgs.dlvToolPath)) {
-					return reject(`Cannot find Delve debugger. Install from https://github.com/go-delve/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".`);
+					return reject(
+						`Cannot find Delve debugger. Install from https://github.com/go-delve/delve & ensure it is in your Go tools path, "GOPATH/bin" or "PATH".`
+					);
 				}
 
 				dlvArgs.push('attach', `${launchArgs.processId}`);
@@ -503,7 +540,7 @@
 
 			this.debugProcess = spawn(launchArgs.dlvToolPath, dlvArgs, {
 				cwd: dlvCwd,
-				env,
+				env
 			});
 
 			function connectClient(port: number, host: string) {
@@ -522,11 +559,15 @@
 
 			this.debugProcess.stderr.on('data', (chunk) => {
 				const str = chunk.toString();
-				if (this.onstderr) { this.onstderr(str); }
+				if (this.onstderr) {
+					this.onstderr(str);
+				}
 			});
 			this.debugProcess.stdout.on('data', (chunk) => {
 				const str = chunk.toString();
-				if (this.onstdout) { this.onstdout(str); }
+				if (this.onstdout) {
+					this.onstdout(str);
+				}
 				if (!serverRunning) {
 					serverRunning = true;
 					connectClient(launchArgs.port, launchArgs.host);
@@ -535,7 +576,9 @@
 			this.debugProcess.on('close', (code) => {
 				// TODO: Report `dlv` crash to user.
 				logError('Process exiting with code: ' + code);
-				if (this.onclose) { this.onclose(code); }
+				if (this.onclose) {
+					this.onclose(code);
+				}
 			});
 			this.debugProcess.on('error', (err) => {
 				reject(err);
@@ -544,22 +587,28 @@
 	}
 
 	public call<T>(command: string, args: any[], callback: (err: Error, results: T) => void) {
-		this.connection.then((conn) => {
-			conn.call('RPCServer.' + command, args, callback);
-		}, (err) => {
-			callback(err, null);
-		});
+		this.connection.then(
+			(conn) => {
+				conn.call('RPCServer.' + command, args, callback);
+			},
+			(err) => {
+				callback(err, null);
+			}
+		);
 	}
 
 	public callPromise<T>(command: string, args: any[]): Thenable<T> {
 		return new Promise<T>((resolve, reject) => {
-			this.connection.then((conn) => {
-				conn.call<T>(`RPCServer.${command}`, args, (err, res) => {
-					return err ? reject(err) : resolve(res);
-				});
-			}, (err) => {
-				reject(err);
-			});
+			this.connection.then(
+				(conn) => {
+					conn.call<T>(`RPCServer.${command}`, args, (err, res) => {
+						return err ? reject(err) : resolve(res);
+					});
+				},
+				(err) => {
+					reject(err);
+				}
+			);
 		});
 	}
 
@@ -611,11 +660,13 @@
 				(rpcConnection as any)['conn']['end']();
 				return;
 			}
-			const timeoutToken: NodeJS.Timer = isLocalDebugging && setTimeout(async () => {
-				log('Killing debug process manually as we could not halt delve in time');
-				await forceCleanup();
-				resolve();
-			}, 1000);
+			const timeoutToken: NodeJS.Timer =
+				isLocalDebugging &&
+				setTimeout(async () => {
+					log('Killing debug process manually as we could not halt delve in time');
+					await forceCleanup();
+					resolve();
+				}, 1000);
 
 			let haltErrMsg: string;
 			try {
@@ -636,7 +687,7 @@
 					await this.callPromise('Detach', [this.isApiV1 ? true : { Kill: isLocalDebugging }]);
 				} catch (err) {
 					log('DetachResponse');
-					logError(`Failed to detach - ${(err.toString() || '')}`);
+					logError(`Failed to detach - ${err.toString() || ''}`);
 					shouldForceClean = isLocalDebugging;
 				}
 			}
@@ -649,17 +700,15 @@
 
 	private getLocalDebugeePath(output: string | undefined): string {
 		const configOutput = output || 'debug';
-		return path.isAbsolute(configOutput)
-			? configOutput
-			: path.resolve(this.program, configOutput);
+		return path.isAbsolute(configOutput) ? configOutput : path.resolve(this.program, configOutput);
 	}
 }
 
 class GoDebugSession extends LoggingDebugSession {
-
 	private variableHandles: Handles<DebugVariable>;
 	private breakpoints: Map<string, DebugBreakpoint[]>;
-	private skipStopEventOnce: boolean; // Editing breakpoints requires halting delve, skip sending Stop Event to VS Code in such cases
+	// Editing breakpoints requires halting delve, skip sending Stop Event to VS Code in such cases
+	private skipStopEventOnce: boolean;
 	private goroutines: Set<number>;
 	private debugState: DebuggerState;
 	private delve: Delve;
@@ -687,7 +736,10 @@
 		this.stackFrameHandles = new Handles<[number, number]>();
 	}
 
-	protected initializeRequest(response: DebugProtocol.InitializeResponse, args: DebugProtocol.InitializeRequestArguments): void {
+	protected initializeRequest(
+		response: DebugProtocol.InitializeResponse,
+		args: DebugProtocol.InitializeRequestArguments
+	): void {
 		log('InitializeRequest');
 		// This debug adapter implements the configurationDoneRequest.
 		response.body.supportsConfigurationDoneRequest = true;
@@ -705,7 +757,11 @@
 
 	protected launchRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments): void {
 		if (!args.program) {
-			this.sendErrorResponse(response, 3000, 'Failed to continue: The program attribute is missing in the debug configuration in launch.json');
+			this.sendErrorResponse(
+				response,
+				3000,
+				'Failed to continue: The program attribute is missing in the debug configuration in launch.json'
+			);
 			return;
 		}
 		this.initLaunchAttachRequest(response, args);
@@ -713,14 +769,25 @@
 
 	protected attachRequest(response: DebugProtocol.AttachResponse, args: AttachRequestArguments): void {
 		if (args.mode === 'local' && !args.processId) {
-			this.sendErrorResponse(response, 3000, 'Failed to continue: the processId attribute is missing in the debug configuration in launch.json');
+			this.sendErrorResponse(
+				response,
+				3000,
+				'Failed to continue: the processId attribute is missing in the debug configuration in launch.json'
+			);
 		} else if (args.mode === 'remote' && !args.port) {
-			this.sendErrorResponse(response, 3000, 'Failed to continue: the port attribute is missing in the debug configuration in launch.json');
+			this.sendErrorResponse(
+				response,
+				3000,
+				'Failed to continue: the port attribute is missing in the debug configuration in launch.json'
+			);
 		}
 		this.initLaunchAttachRequest(response, args);
 	}
 
-	protected async disconnectRequest(response: DebugProtocol.DisconnectResponse, args: DebugProtocol.DisconnectArguments): Promise<void> {
+	protected async disconnectRequest(
+		response: DebugProtocol.DisconnectResponse,
+		args: DebugProtocol.DisconnectArguments
+	): Promise<void> {
 		log('DisconnectRequest');
 		// For remote process, we have to issue a continue request
 		// before disconnecting.
@@ -741,7 +808,10 @@
 		});
 	}
 
-	protected async configurationDoneRequest(response: DebugProtocol.ConfigurationDoneResponse, args: DebugProtocol.ConfigurationDoneArguments): Promise<void> {
+	protected async configurationDoneRequest(
+		response: DebugProtocol.ConfigurationDoneResponse,
+		args: DebugProtocol.ConfigurationDoneArguments
+	): Promise<void> {
 		log('ConfigurationDoneRequest');
 		if (this.stopOnEntry) {
 			this.sendEvent(new StoppedEvent('breakpoint', 1));
@@ -759,7 +829,10 @@
 		if (this.delve.remotePath.length === 0) {
 			return this.convertClientPathToDebugger(path);
 		}
-		return path.replace(this.delve.program, this.delve.remotePath).split(this.localPathSeparator).join(this.remotePathSeparator);
+		return path
+			.replace(this.delve.program, this.delve.remotePath)
+			.split(this.localPathSeparator)
+			.join(this.remotePathSeparator);
 	}
 
 	protected toLocalPath(pathToConvert: string): string {
@@ -776,10 +849,16 @@
 				return path.join(goroot, pathToConvert.substr(index));
 			}
 		}
-		return pathToConvert.replace(this.delve.remotePath, this.delve.program).split(this.remotePathSeparator).join(this.localPathSeparator);
+		return pathToConvert
+			.replace(this.delve.remotePath, this.delve.program)
+			.split(this.remotePathSeparator)
+			.join(this.localPathSeparator);
 	}
 
-	protected async setBreakPointsRequest(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): Promise<void> {
+	protected async setBreakPointsRequest(
+		response: DebugProtocol.SetBreakpointsResponse,
+		args: DebugProtocol.SetBreakpointsArguments
+	): Promise<void> {
 		log('SetBreakPointsRequest');
 		try {
 			// If a program is launched with --continue, the program is running
@@ -794,17 +873,27 @@
 			await this.setBreakPoints(response, args);
 		} else {
 			this.skipStopEventOnce = this.continueRequestRunning;
-			this.delve.callPromise('Command', [{ name: 'halt' }]).then(() => {
-				return this.setBreakPoints(response, args).then(() => {
-					return this.continue(true).then(null, (err) => {
-						logError(`Failed to continue delve after halting it to set breakpoints: "${err.toString()}"`);
+			this.delve.callPromise('Command', [{ name: 'halt' }]).then(
+				() => {
+					return this.setBreakPoints(response, args).then(() => {
+						return this.continue(true).then(null, (err) => {
+							logError(
+								`Failed to continue delve after halting it to set breakpoints: "${err.toString()}"`
+							);
+						});
 					});
-				});
-			}, (err) => {
-				this.skipStopEventOnce = false;
-				logError(err);
-				return this.sendErrorResponse(response, 2008, 'Failed to halt delve before attempting to set breakpoint: "{e}"', { e: err.toString() });
-			});
+				},
+				(err) => {
+					this.skipStopEventOnce = false;
+					logError(err);
+					return this.sendErrorResponse(
+						response,
+						2008,
+						'Failed to halt delve before attempting to set breakpoint: "{e}"',
+						{ e: err.toString() }
+					);
+				}
+			);
 		}
 	}
 
@@ -825,16 +914,21 @@
 
 			if (err) {
 				logError('Failed to get threads - ' + err.toString());
-				return this.sendErrorResponse(response, 2003, 'Unable to display threads: "{e}"', { e: err.toString() });
+				return this.sendErrorResponse(response, 2003, 'Unable to display threads: "{e}"', {
+					e: err.toString()
+				});
 			}
 			const goroutines = this.delve.isApiV1 ? <DebugGoroutine[]>out : (<ListGoroutinesOut>out).Goroutines;
 			log('goroutines', goroutines);
 			this.updateGoroutinesList(goroutines);
-			const threads = goroutines.map((goroutine) =>
-				new Thread(
-					goroutine.id,
-					goroutine.userCurrentLoc.function ? goroutine.userCurrentLoc.function.name : (goroutine.userCurrentLoc.file + '@' + goroutine.userCurrentLoc.line)
-				)
+			const threads = goroutines.map(
+				(goroutine) =>
+					new Thread(
+						goroutine.id,
+						goroutine.userCurrentLoc.function
+							? goroutine.userCurrentLoc.function.name
+							: goroutine.userCurrentLoc.file + '@' + goroutine.userCurrentLoc.line
+					)
 			);
 			if (threads.length === 0) {
 				threads.push(new Thread(1, 'Dummy'));
@@ -845,7 +939,10 @@
 		});
 	}
 
-	protected stackTraceRequest(response: DebugProtocol.StackTraceResponse, args: DebugProtocol.StackTraceArguments): void {
+	protected stackTraceRequest(
+		response: DebugProtocol.StackTraceResponse,
+		args: DebugProtocol.StackTraceArguments
+	): void {
 		log('StackTraceRequest');
 		// delve does not support frame paging, so we ask for a large depth
 		const goroutineId = args.threadId;
@@ -853,144 +950,111 @@
 		if (!this.delve.isApiV1) {
 			Object.assign(stackTraceIn, { full: false, cfg: this.delve.loadConfig });
 		}
-		this.delve.call<DebugLocation[] | StacktraceOut>(this.delve.isApiV1 ? 'StacktraceGoroutine' : 'Stacktrace', [stackTraceIn], (err, out) => {
-			if (err) {
-				logError('Failed to produce stack trace!');
-				return this.sendErrorResponse(response, 2004, 'Unable to produce stack trace: "{e}"', { e: err.toString() });
+		this.delve.call<DebugLocation[] | StacktraceOut>(
+			this.delve.isApiV1 ? 'StacktraceGoroutine' : 'Stacktrace',
+			[stackTraceIn],
+			(err, out) => {
+				if (err) {
+					logError('Failed to produce stack trace!');
+					return this.sendErrorResponse(response, 2004, 'Unable to produce stack trace: "{e}"', {
+						e: err.toString()
+					});
+				}
+				const locations = this.delve.isApiV1 ? <DebugLocation[]>out : (<StacktraceOut>out).Locations;
+				log('locations', locations);
+				let stackFrames = locations.map((location, frameId) => {
+					const uniqueStackFrameId = this.stackFrameHandles.create([goroutineId, frameId]);
+					return new StackFrame(
+						uniqueStackFrameId,
+						location.function ? location.function.name : '<unknown>',
+						location.file === '<autogenerated>'
+							? null
+							: new Source(basename(location.file), this.toLocalPath(location.file)),
+						location.line,
+						0
+					);
+				});
+				if (args.startFrame > 0) {
+					stackFrames = stackFrames.slice(args.startFrame);
+				}
+				if (args.levels > 0) {
+					stackFrames = stackFrames.slice(0, args.levels);
+				}
+				response.body = { stackFrames, totalFrames: locations.length };
+				this.sendResponse(response);
+				log('StackTraceResponse');
 			}
-			const locations = this.delve.isApiV1 ? <DebugLocation[]>out : (<StacktraceOut>out).Locations;
-			log('locations', locations);
-			let stackFrames = locations.map((location, frameId) => {
-				const uniqueStackFrameId = this.stackFrameHandles.create([goroutineId, frameId]);
-				return new StackFrame(
-					uniqueStackFrameId,
-					location.function ? location.function.name : '<unknown>',
-					location.file === '<autogenerated>' ? null : new Source(
-						basename(location.file),
-						this.toLocalPath(location.file)
-					),
-					location.line,
-					0
-				);
-			});
-			if (args.startFrame > 0) {
-				stackFrames = stackFrames.slice(args.startFrame);
-			}
-			if (args.levels > 0) {
-				stackFrames = stackFrames.slice(0, args.levels);
-			}
-			response.body = { stackFrames, totalFrames: locations.length };
-			this.sendResponse(response);
-			log('StackTraceResponse');
-		});
+		);
 	}
 
 	protected scopesRequest(response: DebugProtocol.ScopesResponse, args: DebugProtocol.ScopesArguments): void {
 		log('ScopesRequest');
 		const [goroutineId, frameId] = this.stackFrameHandles.get(args.frameId);
 		const listLocalVarsIn = { goroutineID: goroutineId, frame: frameId };
-		this.delve.call<DebugVariable[] | ListVarsOut>('ListLocalVars', this.delve.isApiV1 ? [listLocalVarsIn] : [{ scope: listLocalVarsIn, cfg: this.delve.loadConfig }], (err, out) => {
-			if (err) {
-				logError('Failed to list local variables - ' + err.toString());
-				return this.sendErrorResponse(response, 2005, 'Unable to list locals: "{e}"', { e: err.toString() });
-			}
-			const locals = this.delve.isApiV1 ? <DebugVariable[]>out : (<ListVarsOut>out).Variables;
-			log('locals', locals);
-			this.addFullyQualifiedName(locals);
-			const listLocalFunctionArgsIn = { goroutineID: goroutineId, frame: frameId };
-			this.delve.call<DebugVariable[] | ListFunctionArgsOut>('ListFunctionArgs', this.delve.isApiV1 ? [listLocalFunctionArgsIn] : [{ scope: listLocalFunctionArgsIn, cfg: this.delve.loadConfig }], (err, outArgs) => {
+		this.delve.call<DebugVariable[] | ListVarsOut>(
+			'ListLocalVars',
+			this.delve.isApiV1 ? [listLocalVarsIn] : [{ scope: listLocalVarsIn, cfg: this.delve.loadConfig }],
+			(err, out) => {
 				if (err) {
-					logError('Failed to list function args - ' + err.toString());
-					return this.sendErrorResponse(response, 2006, 'Unable to list args: "{e}"', { e: err.toString() });
-				}
-				const args = this.delve.isApiV1 ? <DebugVariable[]>outArgs : (<ListFunctionArgsOut>outArgs).Args;
-				log('functionArgs', args);
-				this.addFullyQualifiedName(args);
-				const vars = args.concat(locals);
-				// annotate shadowed variables in parentheses
-				const shadowedVars = new Map<string, Array<number>>();
-				for (let i = 0; i < vars.length; ++i) {
-					if ((vars[i].flags & GoVariableFlags.VariableShadowed) === 0) {
-						continue;
-					}
-					const varName = vars[i].name;
-					if (!shadowedVars.has(varName)) {
-						const indices = new Array<number>();
-						indices.push(i);
-						shadowedVars.set(varName, indices);
-					} else {
-						shadowedVars.get(varName).push(i);
-					}
-				}
-				for (const svIndices of shadowedVars.values()) {
-					// sort by declared line number in descending order
-					svIndices.sort((lhs: number, rhs: number) => {
-						return vars[rhs].DeclLine - vars[lhs].DeclLine;
+					logError('Failed to list local variables - ' + err.toString());
+					return this.sendErrorResponse(response, 2005, 'Unable to list locals: "{e}"', {
+						e: err.toString()
 					});
-					// enclose in parentheses, one pair per scope
-					for (let scope = 0; scope < svIndices.length; ++scope) {
-						const svIndex = svIndices[scope];
-						// start at -1 so scope of 0 has one pair of parens
-						for (let count = -1; count < scope; ++count) {
-							vars[svIndex].name = `(${vars[svIndex].name})`;
-						}
-					}
 				}
-				const scopes = new Array<Scope>();
-				const localVariables: DebugVariable = {
-					name: 'Local',
-					addr: 0,
-					type: '',
-					realType: '',
-					kind: 0,
-					flags: 0,
-					onlyAddr: false,
-					DeclLine: 0,
-					value: '',
-					len: 0,
-					cap: 0,
-					children: vars,
-					unreadable: '',
-					fullyQualifiedName: '',
-					base: 0,
-				};
-
-				scopes.push(new Scope('Local', this.variableHandles.create(localVariables), false));
-				response.body = { scopes };
-
-				if (!this.showGlobalVariables) {
-					this.sendResponse(response);
-					log('ScopesResponse');
-					return;
-				}
-
-				this.getPackageInfo(this.debugState).then((packageName) => {
-					if (!packageName) {
-						this.sendResponse(response);
-						log('ScopesResponse');
-						return;
-					}
-					const filter = `^${packageName}\\.`;
-					this.delve.call<DebugVariable[] | ListVarsOut>('ListPackageVars', this.delve.isApiV1 ? [filter] : [{ filter, cfg: this.delve.loadConfig }], (err, out) => {
+				const locals = this.delve.isApiV1 ? <DebugVariable[]>out : (<ListVarsOut>out).Variables;
+				log('locals', locals);
+				this.addFullyQualifiedName(locals);
+				const listLocalFunctionArgsIn = { goroutineID: goroutineId, frame: frameId };
+				this.delve.call<DebugVariable[] | ListFunctionArgsOut>(
+					'ListFunctionArgs',
+					this.delve.isApiV1
+						? [listLocalFunctionArgsIn]
+						: [{ scope: listLocalFunctionArgsIn, cfg: this.delve.loadConfig }],
+					(err, outArgs) => {
 						if (err) {
-							logError('Failed to list global vars - ' + err.toString());
-							return this.sendErrorResponse(response, 2007, 'Unable to list global vars: "{e}"', { e: err.toString() });
+							logError('Failed to list function args - ' + err.toString());
+							return this.sendErrorResponse(response, 2006, 'Unable to list args: "{e}"', {
+								e: err.toString()
+							});
 						}
-						const globals = this.delve.isApiV1 ? <DebugVariable[]>out : (<ListVarsOut>out).Variables;
-						let initdoneIndex = -1;
-						for (let i = 0; i < globals.length; i++) {
-							globals[i].name = globals[i].name.substr(packageName.length + 1);
-							if (initdoneIndex === -1 && globals[i].name === this.initdone) {
-								initdoneIndex = i;
+						const args = this.delve.isApiV1
+							? <DebugVariable[]>outArgs
+							: (<ListFunctionArgsOut>outArgs).Args;
+						log('functionArgs', args);
+						this.addFullyQualifiedName(args);
+						const vars = args.concat(locals);
+						// annotate shadowed variables in parentheses
+						const shadowedVars = new Map<string, Array<number>>();
+						for (let i = 0; i < vars.length; ++i) {
+							if ((vars[i].flags & GoVariableFlags.VariableShadowed) === 0) {
+								continue;
+							}
+							const varName = vars[i].name;
+							if (!shadowedVars.has(varName)) {
+								const indices = new Array<number>();
+								indices.push(i);
+								shadowedVars.set(varName, indices);
+							} else {
+								shadowedVars.get(varName).push(i);
 							}
 						}
-						if (initdoneIndex > -1) {
-							globals.splice(initdoneIndex, 1);
+						for (const svIndices of shadowedVars.values()) {
+							// sort by declared line number in descending order
+							svIndices.sort((lhs: number, rhs: number) => {
+								return vars[rhs].DeclLine - vars[lhs].DeclLine;
+							});
+							// enclose in parentheses, one pair per scope
+							for (let scope = 0; scope < svIndices.length; ++scope) {
+								const svIndex = svIndices[scope];
+								// start at -1 so scope of 0 has one pair of parens
+								for (let count = -1; count < scope; ++count) {
+									vars[svIndex].name = `(${vars[svIndex].name})`;
+								}
+							}
 						}
-						log('global vars', globals);
-
-						const globalVariables: DebugVariable = {
-							name: 'Global',
+						const scopes = new Array<Scope>();
+						const localVariables: DebugVariable = {
+							name: 'Local',
 							addr: 0,
 							type: '',
 							realType: '',
@@ -1001,77 +1065,165 @@
 							value: '',
 							len: 0,
 							cap: 0,
-							children: globals,
+							children: vars,
 							unreadable: '',
 							fullyQualifiedName: '',
-							base: 0,
+							base: 0
 						};
-						scopes.push(new Scope('Global', this.variableHandles.create(globalVariables), false));
-						this.sendResponse(response);
-						log('ScopesResponse');
-					});
-				});
-			});
-		});
+
+						scopes.push(new Scope('Local', this.variableHandles.create(localVariables), false));
+						response.body = { scopes };
+
+						if (!this.showGlobalVariables) {
+							this.sendResponse(response);
+							log('ScopesResponse');
+							return;
+						}
+
+						this.getPackageInfo(this.debugState).then((packageName) => {
+							if (!packageName) {
+								this.sendResponse(response);
+								log('ScopesResponse');
+								return;
+							}
+							const filter = `^${packageName}\\.`;
+							this.delve.call<DebugVariable[] | ListVarsOut>(
+								'ListPackageVars',
+								this.delve.isApiV1 ? [filter] : [{ filter, cfg: this.delve.loadConfig }],
+								(err, out) => {
+									if (err) {
+										logError('Failed to list global vars - ' + err.toString());
+										return this.sendErrorResponse(
+											response,
+											2007,
+											'Unable to list global vars: "{e}"',
+											{ e: err.toString() }
+										);
+									}
+									const globals = this.delve.isApiV1
+										? <DebugVariable[]>out
+										: (<ListVarsOut>out).Variables;
+									let initdoneIndex = -1;
+									for (let i = 0; i < globals.length; i++) {
+										globals[i].name = globals[i].name.substr(packageName.length + 1);
+										if (initdoneIndex === -1 && globals[i].name === this.initdone) {
+											initdoneIndex = i;
+										}
+									}
+									if (initdoneIndex > -1) {
+										globals.splice(initdoneIndex, 1);
+									}
+									log('global vars', globals);
+
+									const globalVariables: DebugVariable = {
+										name: 'Global',
+										addr: 0,
+										type: '',
+										realType: '',
+										kind: 0,
+										flags: 0,
+										onlyAddr: false,
+										DeclLine: 0,
+										value: '',
+										len: 0,
+										cap: 0,
+										children: globals,
+										unreadable: '',
+										fullyQualifiedName: '',
+										base: 0
+									};
+									scopes.push(
+										new Scope('Global', this.variableHandles.create(globalVariables), false)
+									);
+									this.sendResponse(response);
+									log('ScopesResponse');
+								}
+							);
+						});
+					}
+				);
+			}
+		);
 	}
 
-	protected variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): void {
+	protected variablesRequest(
+		response: DebugProtocol.VariablesResponse,
+		args: DebugProtocol.VariablesArguments
+	): void {
 		log('VariablesRequest');
 		const vari = this.variableHandles.get(args.variablesReference);
 		let variablesPromise: Promise<DebugProtocol.Variable[]>;
 		const loadChildren = async (exp: string, v: DebugVariable) => {
 			// from https://github.com/go-delve/delve/blob/master/Documentation/api/ClientHowto.md#looking-into-variables
-			if ((v.kind === GoReflectKind.Struct && v.len > v.children.length) ||
-				(v.kind === GoReflectKind.Interface && v.children.length > 0 && v.children[0].onlyAddr === true)) {
-				await this.evaluateRequestImpl({ expression: exp }).then((result) => {
-					const variable = this.delve.isApiV1 ? <DebugVariable>result : (<EvalOut>result).Variable;
-					v.children = variable.children;
-				}, (err) => logError('Failed to evaluate expression - ' + err.toString()));
+			if (
+				(v.kind === GoReflectKind.Struct && v.len > v.children.length) ||
+				(v.kind === GoReflectKind.Interface && v.children.length > 0 && v.children[0].onlyAddr === true)
+			) {
+				await this.evaluateRequestImpl({ expression: exp }).then(
+					(result) => {
+						const variable = this.delve.isApiV1 ? <DebugVariable>result : (<EvalOut>result).Variable;
+						v.children = variable.children;
+					},
+					(err) => logError('Failed to evaluate expression - ' + err.toString())
+				);
 			}
 		};
-		// expressions passed to loadChildren defined per https://github.com/go-delve/delve/blob/master/Documentation/api/ClientHowto.md#loading-more-of-a-variable
+		// expressions passed to loadChildren defined per
+		// https://github.com/go-delve/delve/blob/master/Documentation/api/ClientHowto.md#loading-more-of-a-variable
 		if (vari.kind === GoReflectKind.Array || vari.kind === GoReflectKind.Slice) {
-			variablesPromise = Promise.all(vari.children.map((v, i) => {
-				return loadChildren(`*(*"${v.type}")(${v.addr})`, v).then((): DebugProtocol.Variable => {
-					const { result, variablesReference } = this.convertDebugVariableToProtocolVariable(v);
-					return {
-						name: '[' + i + ']',
-						value: result,
-						evaluateName: vari.fullyQualifiedName + '[' + i + ']',
-						variablesReference
-					};
-				});
-			})
+			variablesPromise = Promise.all(
+				vari.children.map((v, i) => {
+					return loadChildren(`*(*"${v.type}")(${v.addr})`, v).then(
+						(): DebugProtocol.Variable => {
+							const { result, variablesReference } = this.convertDebugVariableToProtocolVariable(v);
+							return {
+								name: '[' + i + ']',
+								value: result,
+								evaluateName: vari.fullyQualifiedName + '[' + i + ']',
+								variablesReference
+							};
+						}
+					);
+				})
 			);
 		} else if (vari.kind === GoReflectKind.Map) {
-			variablesPromise = Promise.all(vari.children.map((_, i) => {
-				// even indices are map keys, odd indices are values
-				if (i % 2 === 0 && i + 1 < vari.children.length) {
-					const mapKey = this.convertDebugVariableToProtocolVariable(vari.children[i]);
-					return loadChildren(`${vari.fullyQualifiedName}.${vari.name}[${mapKey.result}]`, vari.children[i + 1]).then(() => {
-						const mapValue = this.convertDebugVariableToProtocolVariable(vari.children[i + 1]);
-						return {
-							name: mapKey.result,
-							value: mapValue.result,
-							evaluateName: vari.fullyQualifiedName + '[' + mapKey.result + ']',
-							variablesReference: mapValue.variablesReference
-						};
-					});
-				}
-			}));
+			variablesPromise = Promise.all(
+				vari.children.map((_, i) => {
+					// even indices are map keys, odd indices are values
+					if (i % 2 === 0 && i + 1 < vari.children.length) {
+						const mapKey = this.convertDebugVariableToProtocolVariable(vari.children[i]);
+						return loadChildren(
+							`${vari.fullyQualifiedName}.${vari.name}[${mapKey.result}]`,
+							vari.children[i + 1]
+						).then(() => {
+							const mapValue = this.convertDebugVariableToProtocolVariable(vari.children[i + 1]);
+							return {
+								name: mapKey.result,
+								value: mapValue.result,
+								evaluateName: vari.fullyQualifiedName + '[' + mapKey.result + ']',
+								variablesReference: mapValue.variablesReference
+							};
+						});
+					}
+				})
+			);
 		} else {
-			variablesPromise = Promise.all(vari.children.map((v) => {
-				return loadChildren(`*(*"${v.type}")(${v.addr})`, v).then((): DebugProtocol.Variable => {
-					const { result, variablesReference } = this.convertDebugVariableToProtocolVariable(v);
+			variablesPromise = Promise.all(
+				vari.children.map((v) => {
+					return loadChildren(`*(*"${v.type}")(${v.addr})`, v).then(
+						(): DebugProtocol.Variable => {
+							const { result, variablesReference } = this.convertDebugVariableToProtocolVariable(v);
 
-					return {
-						name: v.name,
-						value: result,
-						evaluateName: v.fullyQualifiedName,
-						variablesReference
-					};
-				});
-			}));
+							return {
+								name: v.name,
+								value: result,
+								evaluateName: v.fullyQualifiedName,
+								variablesReference
+							};
+						}
+					);
+				})
+			);
 		}
 		variablesPromise.then((variables) => {
 			response.body = { variables };
@@ -1137,7 +1289,9 @@
 		this.delve.call<DebuggerState | CommandOut>('Command', [{ name: 'halt' }], (err, out) => {
 			if (err) {
 				logError('Failed to halt - ' + err.toString());
-				return this.sendErrorResponse(response, 2010, 'Unable to halt execution: "{e}"', { e: err.toString() });
+				return this.sendErrorResponse(response, 2010, 'Unable to halt execution: "{e}"', {
+					e: err.toString()
+				});
 			}
 			const state = this.delve.isApiV1 ? <DebuggerState>out : (<CommandOut>out).State;
 			log('pause state', state);
@@ -1150,19 +1304,27 @@
 
 	protected evaluateRequest(response: DebugProtocol.EvaluateResponse, args: DebugProtocol.EvaluateArguments): void {
 		log('EvaluateRequest');
-		this.evaluateRequestImpl(args).then((out) => {
-			const variable = this.delve.isApiV1 ? <DebugVariable>out : (<EvalOut>out).Variable;
-			// #2326: Set the fully qualified name for variable mapping
-			variable.fullyQualifiedName = variable.name;
-			response.body = this.convertDebugVariableToProtocolVariable(variable);
-			this.sendResponse(response);
-			log('EvaluateResponse');
-		}, (err) => {
-			this.sendErrorResponse(response, 2009, 'Unable to eval expression: "{e}"', { e: err.toString() });
-		});
+		this.evaluateRequestImpl(args).then(
+			(out) => {
+				const variable = this.delve.isApiV1 ? <DebugVariable>out : (<EvalOut>out).Variable;
+				// #2326: Set the fully qualified name for variable mapping
+				variable.fullyQualifiedName = variable.name;
+				response.body = this.convertDebugVariableToProtocolVariable(variable);
+				this.sendResponse(response);
+				log('EvaluateResponse');
+			},
+			(err) => {
+				this.sendErrorResponse(response, 2009, 'Unable to eval expression: "{e}"', {
+					e: err.toString()
+				});
+			}
+		);
 	}
 
-	protected setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): void {
+	protected setVariableRequest(
+		response: DebugProtocol.SetVariableResponse,
+		args: DebugProtocol.SetVariableArguments
+	): void {
 		log('SetVariableRequest');
 		const scope = {
 			goroutineID: this.debugState.currentGoroutine.id
@@ -1185,15 +1347,21 @@
 	}
 
 	// contains common code for launch and attach debugging initialization
-	private initLaunchAttachRequest(response: DebugProtocol.LaunchResponse, args: LaunchRequestArguments | AttachRequestArguments) {
-		this.logLevel = args.trace === 'verbose' ?
-			Logger.LogLevel.Verbose :
-			args.trace === 'log' ? Logger.LogLevel.Log :
-				Logger.LogLevel.Error;
-		const logPath = this.logLevel !== Logger.LogLevel.Error ? path.join(os.tmpdir(), 'vscode-go-debug.txt') : undefined;
+	private initLaunchAttachRequest(
+		response: DebugProtocol.LaunchResponse,
+		args: LaunchRequestArguments | AttachRequestArguments
+	) {
+		this.logLevel =
+			args.trace === 'verbose'
+				? Logger.LogLevel.Verbose
+				: args.trace === 'log'
+				? Logger.LogLevel.Log
+				: Logger.LogLevel.Error;
+		const logPath =
+			this.logLevel !== Logger.LogLevel.Error ? path.join(os.tmpdir(), 'vscode-go-debug.txt') : undefined;
 		logger.setup(this.logLevel, logPath);
 
-		if (typeof (args.showGlobalVariables) === 'boolean') {
+		if (typeof args.showGlobalVariables === 'boolean') {
 			this.showGlobalVariables = args.showGlobalVariables;
 		}
 		if (args.stopOnEntry) {
@@ -1231,10 +1399,20 @@
 			}
 
 			if (i) {
-				localPath = llist.reverse().slice(0, -i).join(this.localPathSeparator) + this.localPathSeparator;
-				args.remotePath = rlist.reverse().slice(0, -i).join(this.remotePathSeparator) + this.remotePathSeparator;
-			} else if (args.remotePath.length > 1 &&
-				(args.remotePath.endsWith('\\') || args.remotePath.endsWith('/'))) {
+				localPath =
+					llist
+						.reverse()
+						.slice(0, -i)
+						.join(this.localPathSeparator) + this.localPathSeparator;
+				args.remotePath =
+					rlist
+						.reverse()
+						.slice(0, -i)
+						.join(this.remotePathSeparator) + this.remotePathSeparator;
+			} else if (
+				args.remotePath.length > 1 &&
+				(args.remotePath.endsWith('\\') || args.remotePath.endsWith('/'))
+			) {
 				args.remotePath = args.remotePath.substring(0, args.remotePath.length - 1);
 			}
 		}
@@ -1255,31 +1433,39 @@
 			this.sendEvent(new TerminatedEvent());
 		};
 
-		this.delve.connection.then(() => {
-			if (!this.delve.noDebug) {
-				this.delve.call<GetVersionOut>('GetVersion', [], (err, out) => {
-					if (err) {
-						logError(err);
-						return this.sendErrorResponse(response, 2001, 'Failed to get remote server version: "{e}"', { e: err.toString() });
-					}
-					const clientVersion = this.delve.isApiV1 ? 1 : 2;
-					if (out.APIVersion !== clientVersion) {
-						const errorMessage = `The remote server is running on delve v${out.APIVersion} API and the client is running v${clientVersion} API. Change the version used on the client by using the property "apiVersion" in your launch.json file.`;
-						logError(errorMessage);
-						return this.sendErrorResponse(response,
-							3000,
-							errorMessage);
-					}
-				});
+		this.delve.connection.then(
+			() => {
+				if (!this.delve.noDebug) {
+					this.delve.call<GetVersionOut>('GetVersion', [], (err, out) => {
+						if (err) {
+							logError(err);
+							return this.sendErrorResponse(
+								response,
+								2001,
+								'Failed to get remote server version: "{e}"',
+								{ e: err.toString() }
+							);
+						}
+						const clientVersion = this.delve.isApiV1 ? 1 : 2;
+						if (out.APIVersion !== clientVersion) {
+							const errorMessage = `The remote server is running on delve v${out.APIVersion} API and the client is running v${clientVersion} API. Change the version used on the client by using the property "apiVersion" in your launch.json file.`;
+							logError(errorMessage);
+							return this.sendErrorResponse(response, 3000, errorMessage);
+						}
+					});
 
-				this.sendEvent(new InitializedEvent());
-				log('InitializeEvent');
+					this.sendEvent(new InitializedEvent());
+					log('InitializeEvent');
+				}
+				this.sendResponse(response);
+			},
+			(err) => {
+				this.sendErrorResponse(response, 3000, 'Failed to continue: "{e}"', {
+					e: err.toString()
+				});
+				log('ContinueResponse');
 			}
-			this.sendResponse(response);
-		}, (err) => {
-			this.sendErrorResponse(response, 3000, 'Failed to continue: "{e}"', { e: err.toString() });
-			log('ContinueResponse');
-		});
+		);
 	}
 
 	private updateGoroutinesList(goroutines: DebugGoroutine[]): void {
@@ -1302,120 +1488,154 @@
 		});
 	}
 
-	private setBreakPoints(response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments): Thenable<void> {
+	private setBreakPoints(
+		response: DebugProtocol.SetBreakpointsResponse,
+		args: DebugProtocol.SetBreakpointsArguments
+	): Thenable<void> {
 		const file = normalizePath(args.source.path);
 		if (!this.breakpoints.get(file)) {
 			this.breakpoints.set(file, []);
 		}
 		const remoteFile = this.toDebuggerPath(file);
 
-		return Promise.all(this.breakpoints.get(file).map((existingBP) => {
-			log('Clearing: ' + existingBP.id);
-			return this.delve.callPromise('ClearBreakpoint', [this.delve.isApiV1 ? existingBP.id : { Id: existingBP.id }]);
-		})).then(() => {
-			log('All cleared');
-			let existingBreakpoints: DebugBreakpoint[] | undefined;
-			return Promise.all(args.breakpoints.map((breakpoint) => {
-				if (this.delve.remotePath.length === 0) {
-					log('Creating on: ' + file + ':' + breakpoint.line);
-				} else {
-					log('Creating on: ' + file + ' (' + remoteFile + ') :' + breakpoint.line);
-				}
-				const breakpointIn = <DebugBreakpoint>{};
-				breakpointIn.file = remoteFile;
-				breakpointIn.line = breakpoint.line;
-				breakpointIn.loadArgs = this.delve.loadConfig;
-				breakpointIn.loadLocals = this.delve.loadConfig;
-				breakpointIn.cond = breakpoint.condition;
-				return this.delve.callPromise('CreateBreakpoint', [this.delve.isApiV1 ? breakpointIn : { Breakpoint: breakpointIn }]).then(null,
-					async (err) => {
-						// Delve does not seem to support error code at this time.
-						// TODO(quoct): Follow up with delve team.
-						if (err.toString().startsWith('Breakpoint exists at')) {
-							log('Encounter existing breakpoint: ' + breakpointIn);
-							// We need to call listbreakpoints to find the ID.
-							// Otherwise, we would not be able to clear the breakpoints.
-							if (!existingBreakpoints) {
-								try {
-									const listBreakpointsResponse =
-										await this.delve.callPromise<ListBreakpointsOut | DebugBreakpoint[]>('ListBreakpoints', this.delve.isApiV1 ? [] : [{}]);
-									existingBreakpoints = this.delve.isApiV1 ?
-										listBreakpointsResponse as DebugBreakpoint[] : (listBreakpointsResponse as ListBreakpointsOut).Breakpoints;
-								} catch (error) {
-									log('Error listing breakpoints: ' + error.toString());
-									return null;
-								}
-							}
-							const matchedBreakpoint = existingBreakpoints.find((breakpoint) =>
-								breakpoint.line === breakpointIn.line && breakpoint.file === breakpointIn.file);
-							if (!matchedBreakpoint) {
-								log(`Cannot match breakpoint ${breakpointIn} with existing breakpoints.`);
-								return null;
-							}
-							return this.delve.isApiV1 ? matchedBreakpoint : { Breakpoint: matchedBreakpoint };
+		return Promise.all(
+			this.breakpoints.get(file).map((existingBP) => {
+				log('Clearing: ' + existingBP.id);
+				return this.delve.callPromise('ClearBreakpoint', [
+					this.delve.isApiV1 ? existingBP.id : { Id: existingBP.id }
+				]);
+			})
+		)
+			.then(() => {
+				log('All cleared');
+				let existingBreakpoints: DebugBreakpoint[] | undefined;
+				return Promise.all(
+					args.breakpoints.map((breakpoint) => {
+						if (this.delve.remotePath.length === 0) {
+							log('Creating on: ' + file + ':' + breakpoint.line);
+						} else {
+							log('Creating on: ' + file + ' (' + remoteFile + ') :' + breakpoint.line);
 						}
-						log('Error on CreateBreakpoint: ' + err.toString());
-						return null;
+						const breakpointIn = <DebugBreakpoint>{};
+						breakpointIn.file = remoteFile;
+						breakpointIn.line = breakpoint.line;
+						breakpointIn.loadArgs = this.delve.loadConfig;
+						breakpointIn.loadLocals = this.delve.loadConfig;
+						breakpointIn.cond = breakpoint.condition;
+						return this.delve
+							.callPromise('CreateBreakpoint', [
+								this.delve.isApiV1 ? breakpointIn : { Breakpoint: breakpointIn }
+							])
+							.then(null, async (err) => {
+								// Delve does not seem to support error code at this time.
+								// TODO(quoct): Follow up with delve team.
+								if (err.toString().startsWith('Breakpoint exists at')) {
+									log('Encounter existing breakpoint: ' + breakpointIn);
+									// We need to call listbreakpoints to find the ID.
+									// Otherwise, we would not be able to clear the breakpoints.
+									if (!existingBreakpoints) {
+										try {
+											const listBreakpointsResponse = await this.delve.callPromise<
+												ListBreakpointsOut | DebugBreakpoint[]
+											>('ListBreakpoints', this.delve.isApiV1 ? [] : [{}]);
+											existingBreakpoints = this.delve.isApiV1
+												? (listBreakpointsResponse as DebugBreakpoint[])
+												: (listBreakpointsResponse as ListBreakpointsOut).Breakpoints;
+										} catch (error) {
+											log('Error listing breakpoints: ' + error.toString());
+											return null;
+										}
+									}
+									const matchedBreakpoint = existingBreakpoints.find(
+										(breakpoint) =>
+											breakpoint.line === breakpointIn.line &&
+											breakpoint.file === breakpointIn.file
+									);
+									if (!matchedBreakpoint) {
+										log(`Cannot match breakpoint ${breakpointIn} with existing breakpoints.`);
+										return null;
+									}
+									return this.delve.isApiV1 ? matchedBreakpoint : { Breakpoint: matchedBreakpoint };
+								}
+								log('Error on CreateBreakpoint: ' + err.toString());
+								return null;
+							});
+					})
+				);
+			})
+			.then((newBreakpoints) => {
+				let convertedBreakpoints: DebugBreakpoint[];
+				if (!this.delve.isApiV1) {
+					// Unwrap breakpoints from v2 apicall
+					convertedBreakpoints = newBreakpoints.map((bp, i) => {
+						return bp ? (bp as CreateBreakpointOut).Breakpoint : null;
 					});
-			}));
-		}).then((newBreakpoints) => {
-			let convertedBreakpoints: DebugBreakpoint[];
-			if (!this.delve.isApiV1) {
-				// Unwrap breakpoints from v2 apicall
-				convertedBreakpoints = newBreakpoints.map((bp, i) => {
-					return bp ? (bp as CreateBreakpointOut).Breakpoint : null;
-				});
-			} else {
-				convertedBreakpoints = newBreakpoints as DebugBreakpoint[];
-			}
-
-			log('All set:' + JSON.stringify(newBreakpoints));
-			const breakpoints = convertedBreakpoints.map((bp, i) => {
-				if (bp) {
-					return { verified: true, line: bp.line };
 				} else {
-					return { verified: false, line: args.lines[i] };
+					convertedBreakpoints = newBreakpoints as DebugBreakpoint[];
 				}
-			});
-			this.breakpoints.set(file, convertedBreakpoints.filter((x) => !!x));
-			return breakpoints;
-		}).then((breakpoints) => {
-			response.body = { breakpoints };
-			this.sendResponse(response);
-			log('SetBreakPointsResponse');
-		}, (err) => {
-			this.sendErrorResponse(response, 2002, 'Failed to set breakpoint: "{e}"', { e: err.toString() });
-			logError(err);
-		});
+
+				log('All set:' + JSON.stringify(newBreakpoints));
+				const breakpoints = convertedBreakpoints.map((bp, i) => {
+					if (bp) {
+						return { verified: true, line: bp.line };
+					} else {
+						return { verified: false, line: args.lines[i] };
+					}
+				});
+				this.breakpoints.set(file, convertedBreakpoints.filter((x) => !!x));
+				return breakpoints;
+			})
+			.then(
+				(breakpoints) => {
+					response.body = { breakpoints };
+					this.sendResponse(response);
+					log('SetBreakPointsResponse');
+				},
+				(err) => {
+					this.sendErrorResponse(response, 2002, 'Failed to set breakpoint: "{e}"', {
+						e: err.toString()
+					});
+					logError(err);
+				}
+			);
 	}
 
 	private getPackageInfo(debugState: DebuggerState): Thenable<string> {
 		if (!debugState.currentThread || !debugState.currentThread.file) {
 			return Promise.resolve(null);
 		}
-		const dir = path.dirname(this.delve.remotePath.length ? this.toLocalPath(debugState.currentThread.file) : debugState.currentThread.file);
+		const dir = path.dirname(
+			this.delve.remotePath.length
+				? this.toLocalPath(debugState.currentThread.file)
+				: debugState.currentThread.file
+		);
 		if (this.packageInfo.has(dir)) {
 			return Promise.resolve(this.packageInfo.get(dir));
 		}
 		return new Promise((resolve) => {
-			execFile(getBinPathWithPreferredGopath('go', []), ['list', '-f', '{{.Name}} {{.ImportPath}}'], { cwd: dir, env: this.delve.dlvEnv }, (err, stdout, stderr) => {
-				if (err || stderr || !stdout) {
-					logError(`go list failed on ${dir}: ${stderr || err}`);
-					return resolve();
+			execFile(
+				getBinPathWithPreferredGopath('go', []),
+				['list', '-f', '{{.Name}} {{.ImportPath}}'],
+				{ cwd: dir, env: this.delve.dlvEnv },
+				(err, stdout, stderr) => {
+					if (err || stderr || !stdout) {
+						logError(`go list failed on ${dir}: ${stderr || err}`);
+						return resolve();
+					}
+					if (stdout.split('\n').length !== 2) {
+						logError(`Cannot determine package for ${dir}`);
+						return resolve();
+					}
+					const spaceIndex = stdout.indexOf(' ');
+					const result = stdout.substr(0, spaceIndex) === 'main' ? 'main' : stdout.substr(spaceIndex).trim();
+					this.packageInfo.set(dir, result);
+					resolve(result);
 				}
-				if (stdout.split('\n').length !== 2) {
-					logError(`Cannot determine package for ${dir}`);
-					return resolve();
-				}
-				const spaceIndex = stdout.indexOf(' ');
-				const result = stdout.substr(0, spaceIndex) === 'main' ? 'main' : stdout.substr(spaceIndex).trim();
-				this.packageInfo.set(dir, result);
-				resolve(result);
-			});
+			);
 		});
 	}
 
-	private convertDebugVariableToProtocolVariable(v: DebugVariable): { result: string; variablesReference: number; } {
+	private convertDebugVariableToProtocolVariable(v: DebugVariable): { result: string; variablesReference: number } {
 		if (v.kind === GoReflectKind.UnsafePointer) {
 			return {
 				result: `unsafe.Pointer(0x${v.children[0].addr.toString(16)})`,
@@ -1479,7 +1699,7 @@
 				val += `...+${v.len - byteLength} more`;
 			}
 			return {
-				result: v.unreadable ? ('<' + v.unreadable + '>') : ('"' + val + '"'),
+				result: v.unreadable ? '<' + v.unreadable + '>' : '"' + val + '"',
 				variablesReference: 0
 			};
 		} else {
@@ -1491,7 +1711,7 @@
 				});
 			}
 			return {
-				result: v.value || ('<' + v.type + '>'),
+				result: v.value || '<' + v.type + '>',
 				variablesReference: v.children.length > 0 ? this.variableHandles.create(v) : 0
 			};
 		}
@@ -1548,13 +1768,16 @@
 		};
 
 		// If called when setting breakpoint internally, we want the error to bubble up.
-		const errorCallback = calledWhenSettingBreakpoint ? null : (err: any) => {
-			if (err) {
-				logError('Failed to continue - ' + err.toString());
-			}
-			this.handleReenterDebug('breakpoint');
-			throw err;
-		};
+		let errorCallback = null;
+		if (!calledWhenSettingBreakpoint) {
+			errorCallback = (err: any) => {
+				if (err) {
+					logError('Failed to continue - ' + err.toString());
+				}
+				this.handleReenterDebug('breakpoint');
+				throw err;
+			};
+		}
 
 		return this.delve.callPromise('Command', [{ name: 'continue' }]).then(callback, errorCallback);
 	}
@@ -1571,19 +1794,30 @@
 			goroutineID: goroutineId,
 			frame: frameId
 		};
-		const evalSymbolArgs = this.delve.isApiV1 ? {
+		const apiV1Args = {
 			symbol: args.expression,
 			scope
-		} : {
-				Expr: args.expression,
-				Scope: scope,
-				Cfg: this.delve.loadConfig
-			};
-		const returnValue = this.delve.callPromise<EvalOut | DebugVariable>(this.delve.isApiV1 ? 'EvalSymbol' : 'Eval', [evalSymbolArgs]).then((val) => val,
-			(err) => {
-				logError('Failed to eval expression: ', JSON.stringify(evalSymbolArgs, null, ' '), '\n\rEval error:', err.toString());
-				return Promise.reject(err);
-			});
+		};
+		const apiV2Args = {
+			Expr: args.expression,
+			Scope: scope,
+			Cfg: this.delve.loadConfig
+		};
+		const evalSymbolArgs = this.delve.isApiV1 ? apiV1Args : apiV2Args;
+		const returnValue = this.delve
+			.callPromise<EvalOut | DebugVariable>(this.delve.isApiV1 ? 'EvalSymbol' : 'Eval', [evalSymbolArgs])
+			.then(
+				(val) => val,
+				(err) => {
+					logError(
+						'Failed to eval expression: ',
+						JSON.stringify(evalSymbolArgs, null, ' '),
+						'\n\rEval error:',
+						err.toString()
+					);
+					return Promise.reject(err);
+				}
+			);
 		return returnValue;
 	}
 
diff --git a/src/diffUtils.ts b/src/diffUtils.ts
index 2fecb61..5310b8b 100644
--- a/src/diffUtils.ts
+++ b/src/diffUtils.ts
@@ -17,7 +17,11 @@
 	return diffToolAvailable;
 }
 
-export enum EditTypes { EDIT_DELETE, EDIT_INSERT, EDIT_REPLACE }
+export enum EditTypes {
+	EDIT_DELETE,
+	EDIT_INSERT,
+	EDIT_REPLACE
+}
 
 export class Edit {
 	public start: Position;
@@ -124,7 +128,6 @@
 	});
 
 	return filePatches;
-
 }
 
 /**
@@ -149,7 +152,8 @@
 /**
  * Uses diff module to parse given diff string and returns edits for files
  *
- * @param diffStr : Diff string in unified format. http://www.gnu.org/software/diffutils/manual/diffutils.html#Unified-Format
+ * @param diffStr : Diff string in unified format.
+ * http://www.gnu.org/software/diffutils/manual/diffutils.html#Unified-Format
  *
  * @returns Array of FilePatch objects, one for each file
  */
diff --git a/src/goBaseCodelens.ts b/src/goBaseCodelens.ts
index 8536072..6f4f442 100644
--- a/src/goBaseCodelens.ts
+++ b/src/goBaseCodelens.ts
@@ -20,8 +20,10 @@
 		}

 	}

 

-	public provideCodeLenses(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.ProviderResult<vscode.CodeLens[]> {

+	public provideCodeLenses(

+		document: vscode.TextDocument,

+		token: vscode.CancellationToken

+	): vscode.ProviderResult<vscode.CodeLens[]> {

 		return [];

 	}

-

 }

diff --git a/src/goBrowsePackage.ts b/src/goBrowsePackage.ts
index aa8020d..755e448 100644
--- a/src/goBrowsePackage.ts
+++ b/src/goBrowsePackage.ts
@@ -35,13 +35,14 @@
 	}
 
 	showPackageFiles(selectedText, true, workDir);
-
 }
 
 function showPackageFiles(pkg: string, showAllPkgsIfPkgNotFound: boolean, workDir: string) {
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		return vscode.window.showErrorMessage(`Failed to run "go list" to fetch packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		return vscode.window.showErrorMessage(
+			`Failed to run "go list" to fetch packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 	}
 
 	if (!pkg && showAllPkgsIfPkgNotFound) {
@@ -56,47 +57,53 @@
 		options['cwd'] = workDir;
 	}
 
-	cp.execFile(goRuntimePath, ['list', '-f', '{{.Dir}}:{{.GoFiles}}:{{.TestGoFiles}}:{{.XTestGoFiles}}', pkg], options, (err, stdout, stderr) => {
-		if (!stdout || stdout.indexOf(':') === -1) {
-			if (showAllPkgsIfPkgNotFound) {
-				return showPackageList(workDir);
-			}
-
-			return;
-		}
-
-		const matches = stdout && stdout.match(/(.*):\[(.*)\]:\[(.*)\]:\[(.*)\]/);
-		if (matches) {
-			const dir = matches[1];
-			let files = matches[2] ? matches[2].split(' ') : [];
-			const testfiles = matches[3] ? matches[3].split(' ') : [];
-			const xtestfiles = matches[4] ? matches[4].split(' ') : [];
-			files = files.concat(testfiles);
-			files = files.concat(xtestfiles);
-			vscode.window.showQuickPick(files, { placeHolder: `Below are Go files from ${pkg}` }).then((file) => {
-				// if user abandoned list, file will be null and path.join will error out.
-				// therefore return.
-				if (!file) {
-					return;
+	cp.execFile(
+		goRuntimePath,
+		['list', '-f', '{{.Dir}}:{{.GoFiles}}:{{.TestGoFiles}}:{{.XTestGoFiles}}', pkg],
+		options,
+		(err, stdout, stderr) => {
+			if (!stdout || stdout.indexOf(':') === -1) {
+				if (showAllPkgsIfPkgNotFound) {
+					return showPackageList(workDir);
 				}
 
-				vscode.workspace.openTextDocument(path.join(dir, file)).then((document) => {
-					vscode.window.showTextDocument(document);
+				return;
+			}
+
+			const matches = stdout && stdout.match(/(.*):\[(.*)\]:\[(.*)\]:\[(.*)\]/);
+			if (matches) {
+				const dir = matches[1];
+				let files = matches[2] ? matches[2].split(' ') : [];
+				const testfiles = matches[3] ? matches[3].split(' ') : [];
+				const xtestfiles = matches[4] ? matches[4].split(' ') : [];
+				files = files.concat(testfiles);
+				files = files.concat(xtestfiles);
+				vscode.window.showQuickPick(files, { placeHolder: `Below are Go files from ${pkg}` }).then((file) => {
+					// if user abandoned list, file will be null and path.join will error out.
+					// therefore return.
+					if (!file) {
+						return;
+					}
+
+					vscode.workspace.openTextDocument(path.join(dir, file)).then((document) => {
+						vscode.window.showTextDocument(document);
+					});
 				});
-			});
+			}
 		}
-	});
+	);
 }
 
 function showPackageList(workDir: string) {
 	return getAllPackages(workDir).then((pkgMap) => {
 		const pkgs: string[] = Array.from(pkgMap.keys());
 		if (pkgs.length === 0) {
-			return vscode.window.showErrorMessage('Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.');
+			return vscode.window.showErrorMessage(
+				'Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.'
+			);
 		}
 
-		vscode
-			.window
+		vscode.window
 			.showQuickPick(pkgs.sort(), { placeHolder: 'Select a package to browse' })
 			.then((pkgFromDropdown) => {
 				if (!pkgFromDropdown) {
@@ -105,5 +112,4 @@
 				showPackageFiles(pkgFromDropdown, false, workDir);
 			});
 	});
-
 }
diff --git a/src/goBuild.ts b/src/goBuild.ts
index b503d36..db5c387 100644
--- a/src/goBuild.ts
+++ b/src/goBuild.ts
@@ -11,7 +11,17 @@
 import { getCurrentGoWorkspaceFromGOPATH } from './goPath';

 import { diagnosticsStatusBarItem, outputChannel } from './goStatus';

 import { getTestFlags } from './testUtils';

-import { getCurrentGoPath, getGoConfig, getModuleCache, getTempFilePath, getToolsEnvVars, getWorkspaceFolderPath, handleDiagnosticErrors, ICheckResult, runTool } from './util';

+import {

+	getCurrentGoPath,

+	getGoConfig,

+	getModuleCache,

+	getTempFilePath,

+	getToolsEnvVars,

+	getWorkspaceFolderPath,

+	handleDiagnosticErrors,

+	ICheckResult,

+	runTool

+} from './util';

 /**

  * Builds current package or workspace.

  */

@@ -23,7 +33,9 @@
 			return;

 		}

 		if (editor.document.languageId !== 'go') {

-			vscode.window.showInformationMessage('File in the active editor is not a Go file, cannot find current package to build');

+			vscode.window.showInformationMessage(

+				'File in the active editor is not a Go file, cannot find current package to build'

+			);

 			return;

 		}

 	}

@@ -37,14 +49,14 @@
 

 	isModSupported(documentUri).then((isMod) => {

 		goBuild(documentUri, isMod, goConfig, buildWorkspace)

-		.then((errors) => {

-			handleDiagnosticErrors(editor ? editor.document : null, errors, buildDiagnosticCollection);

-			diagnosticsStatusBarItem.hide();

-		})

-		.catch((err) => {

-			vscode.window.showInformationMessage('Error: ' + err);

-			diagnosticsStatusBarItem.text = 'Build Failed';

-		});

+			.then((errors) => {

+				handleDiagnosticErrors(editor ? editor.document : null, errors, buildDiagnosticCollection);

+				diagnosticsStatusBarItem.hide();

+			})

+			.catch((err) => {

+				vscode.window.showInformationMessage('Error: ' + err);

+				diagnosticsStatusBarItem.text = 'Build Failed';

+			});

 	});

 }

 

@@ -56,7 +68,12 @@
  * @param goConfig Configuration for the Go extension.

  * @param buildWorkspace If true builds code in all workspace.

  */

-export async function goBuild(fileUri: vscode.Uri, isMod: boolean, goConfig: vscode.WorkspaceConfiguration, buildWorkspace?: boolean): Promise<ICheckResult[]> {

+export async function goBuild(

+	fileUri: vscode.Uri,

+	isMod: boolean,

+	goConfig: vscode.WorkspaceConfiguration,

+	buildWorkspace?: boolean

+): Promise<ICheckResult[]> {

 	epoch++;

 	const closureEpoch = epoch;

 	if (tokenSource) {

@@ -73,7 +90,7 @@
 	};

 

 	const currentWorkspace = getWorkspaceFolderPath(fileUri);

-	const cwd = (buildWorkspace && currentWorkspace) ? currentWorkspace : path.dirname(fileUri.fsPath);

+	const cwd = buildWorkspace && currentWorkspace ? currentWorkspace : path.dirname(fileUri.fsPath);

 	if (!path.isAbsolute(cwd)) {

 		return Promise.resolve([]);

 	}

@@ -86,7 +103,11 @@
 	const buildEnv = Object.assign({}, getToolsEnvVars());

 	const tmpPath = getTempFilePath('go-code-check');

 	const isTestFile = fileUri && fileUri.fsPath.endsWith('_test.go');

-	const buildFlags: string[] = isTestFile ? getTestFlags(goConfig) : (Array.isArray(goConfig['buildFlags']) ? [...goConfig['buildFlags']] : []);

+	const buildFlags: string[] = isTestFile

+		? getTestFlags(goConfig)

+		: Array.isArray(goConfig['buildFlags'])

+		? [...goConfig['buildFlags']]

+		: [];

 	const buildArgs: string[] = isTestFile ? ['test', '-c'] : ['build'];

 

 	if (goConfig['installDependenciesWhenBuilding'] === true && !isMod) {

@@ -130,7 +151,9 @@
 	if (currentGoWorkspace && !isMod) {

 		importPath = cwd.substr(currentGoWorkspace.length + 1);

 	} else {

-		outputChannel.appendLine(`Not able to determine import path of current package by using cwd: ${cwd} and Go workspace: ${currentGoWorkspace}`);

+		outputChannel.appendLine(

+			`Not able to determine import path of current package by using cwd: ${cwd} and Go workspace: ${currentGoWorkspace}`

+		);

 	}

 

 	running = true;

diff --git a/src/goCheck.ts b/src/goCheck.ts
index dcd0e93..72146cd 100644
--- a/src/goCheck.ts
+++ b/src/goCheck.ts
@@ -19,7 +19,7 @@
 
 const statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
 statusBarItem.command = 'go.test.showOutput';
-const neverAgain = { title: 'Don\'t Show Again' };
+const neverAgain = { title: `Don't Show Again` };
 
 export function removeTestStatus(e: vscode.TextDocumentChangeEvent) {
 	if (e.document.isUntitled) {
@@ -34,7 +34,10 @@
 	if (e.document.isUntitled || e.document.languageId !== 'go') {
 		return;
 	}
-	if ((ctx.globalState.get('ignoreGeneratedCodeWarning') !== true) && e.document.lineAt(0).text.match(/^\/\/ Code generated .* DO NOT EDIT\.$/)) {
+	if (
+		ctx.globalState.get('ignoreGeneratedCodeWarning') !== true &&
+		e.document.lineAt(0).text.match(/^\/\/ Code generated .* DO NOT EDIT\.$/)
+	) {
 		vscode.window.showWarningMessage('This file seems to be generated. DO NOT EDIT.', neverAgain).then((result) => {
 			if (result === neverAgain) {
 				ctx.globalState.update('ignoreGeneratedCodeWarning', true);
@@ -81,9 +84,11 @@
 	};
 
 	if (!disableBuildAndVet && !!goConfig['buildOnSave'] && goConfig['buildOnSave'] !== 'off') {
-		runningToolsPromises.push(isModSupported(fileUri)
-			.then((isMod) => goBuild(fileUri, isMod, goConfig, goConfig['buildOnSave'] === 'workspace'))
-			.then((errors) => ({ diagnosticCollection: buildDiagnosticCollection, errors })));
+		runningToolsPromises.push(
+			isModSupported(fileUri)
+				.then((isMod) => goBuild(fileUri, isMod, goConfig, goConfig['buildOnSave'] === 'workspace'))
+				.then((errors) => ({ diagnosticCollection: buildDiagnosticCollection, errors }))
+		);
 	}
 
 	if (!!goConfig['testOnSave']) {
@@ -102,13 +107,21 @@
 	}
 
 	if (!!goConfig['lintOnSave'] && goConfig['lintOnSave'] !== 'off') {
-		runningToolsPromises.push(goLint(fileUri, goConfig, goConfig['lintOnSave'])
-			.then((errors) => ({ diagnosticCollection: lintDiagnosticCollection, errors })));
+		runningToolsPromises.push(
+			goLint(fileUri, goConfig, goConfig['lintOnSave']).then((errors) => ({
+				diagnosticCollection: lintDiagnosticCollection,
+				errors
+			}))
+		);
 	}
 
 	if (!disableBuildAndVet && !!goConfig['vetOnSave'] && goConfig['vetOnSave'] !== 'off') {
-		runningToolsPromises.push(goVet(fileUri, goConfig, goConfig['vetOnSave'] === 'workspace')
-			.then((errors) => ({ diagnosticCollection: vetDiagnosticCollection, errors })));
+		runningToolsPromises.push(
+			goVet(fileUri, goConfig, goConfig['vetOnSave'] === 'workspace').then((errors) => ({
+				diagnosticCollection: vetDiagnosticCollection,
+				errors
+			}))
+		);
 	}
 
 	if (!!goConfig['coverOnSave']) {
diff --git a/src/goCodeAction.ts b/src/goCodeAction.ts
index c87471c..c7edbb7 100644
--- a/src/goCodeAction.ts
+++ b/src/goCodeAction.ts
@@ -9,8 +9,12 @@
 import { listPackages } from './goImport';
 
 export class GoCodeActionProvider implements vscode.CodeActionProvider {
-	public provideCodeActions(document: vscode.TextDocument, range: vscode.Range, context: vscode.CodeActionContext, token: vscode.CancellationToken): Thenable<vscode.Command[]> {
-
+	public provideCodeActions(
+		document: vscode.TextDocument,
+		range: vscode.Range,
+		context: vscode.CodeActionContext,
+		token: vscode.CancellationToken
+	): Thenable<vscode.Command[]> {
 		const promises = context.diagnostics.map((diag) => {
 			// When a name is not found but could refer to a package, offer to add import
 			if (diag.message.indexOf('undefined: ') === 0) {
diff --git a/src/goCover.ts b/src/goCover.ts
index 9fa91b9..45b22d4 100644
--- a/src/goCover.ts
+++ b/src/goCover.ts
@@ -22,7 +22,7 @@
 	uncoveredHighlightDecorator: vscode.TextEditorDecorationType;
 };
 let decoratorConfig: {
-	[key: string]: any
+	[key: string]: any;
 	type: string;
 	coveredHighlightColor: string;
 	uncoveredHighlightColor: string;
@@ -58,10 +58,18 @@
 		goConfig.update('coverageDecorator', { type: inspectResult.globalValue }, vscode.ConfigurationTarget.Global);
 	}
 	if (typeof inspectResult.workspaceValue === 'string') {
-		goConfig.update('coverageDecorator', { type: inspectResult.workspaceValue }, vscode.ConfigurationTarget.Workspace);
+		goConfig.update(
+			'coverageDecorator',
+			{ type: inspectResult.workspaceValue },
+			vscode.ConfigurationTarget.Workspace
+		);
 	}
 	if (typeof inspectResult.workspaceFolderValue === 'string') {
-		goConfig.update('coverageDecorator', { type: inspectResult.workspaceValue }, vscode.ConfigurationTarget.WorkspaceFolder);
+		goConfig.update(
+			'coverageDecorator',
+			{ type: inspectResult.workspaceValue },
+			vscode.ConfigurationTarget.WorkspaceFolder
+		);
 	}
 
 	// Update the decorators
@@ -84,7 +92,7 @@
 	};
 
 	// Update from configuration
-	if (typeof (coverageDecoratorConfig) === 'string') {
+	if (typeof coverageDecoratorConfig === 'string') {
 		decoratorConfig.type = coverageDecoratorConfig;
 	} else {
 		for (const k in coverageDecoratorConfig) {
@@ -101,10 +109,18 @@
 	disposeDecorators();
 	decorators = {
 		type: decoratorConfig.type,
-		coveredGutterDecorator: vscode.window.createTextEditorDecorationType({ gutterIconPath: gutterSvgs[decoratorConfig.coveredGutterStyle] }),
-		uncoveredGutterDecorator: vscode.window.createTextEditorDecorationType({ gutterIconPath: gutterSvgs[decoratorConfig.uncoveredGutterStyle] }),
-		coveredHighlightDecorator: vscode.window.createTextEditorDecorationType({ backgroundColor: decoratorConfig.coveredHighlightColor }),
-		uncoveredHighlightDecorator: vscode.window.createTextEditorDecorationType({ backgroundColor: decoratorConfig.uncoveredHighlightColor })
+		coveredGutterDecorator: vscode.window.createTextEditorDecorationType({
+			gutterIconPath: gutterSvgs[decoratorConfig.coveredGutterStyle]
+		}),
+		uncoveredGutterDecorator: vscode.window.createTextEditorDecorationType({
+			gutterIconPath: gutterSvgs[decoratorConfig.uncoveredGutterStyle]
+		}),
+		coveredHighlightDecorator: vscode.window.createTextEditorDecorationType({
+			backgroundColor: decoratorConfig.coveredHighlightColor
+		}),
+		uncoveredHighlightDecorator: vscode.window.createTextEditorDecorationType({
+			backgroundColor: decoratorConfig.uncoveredHighlightColor
+		})
 	};
 }
 
@@ -245,11 +261,21 @@
 			isCoverageApplied = true;
 			const coverageData = coverageFiles[filename];
 			if (coverageOptions === 'showCoveredCodeOnly' || coverageOptions === 'showBothCoveredAndUncoveredCode') {
-				editor.setDecorations(decorators.type === 'gutter' ? decorators.coveredGutterDecorator : decorators.coveredHighlightDecorator, coverageData.coveredRange);
+				editor.setDecorations(
+					decorators.type === 'gutter'
+						? decorators.coveredGutterDecorator
+						: decorators.coveredHighlightDecorator,
+					coverageData.coveredRange
+				);
 			}
 
 			if (coverageOptions === 'showUncoveredCodeOnly' || coverageOptions === 'showBothCoveredAndUncoveredCode') {
-				editor.setDecorations(decorators.type === 'gutter' ? decorators.uncoveredGutterDecorator : decorators.uncoveredHighlightDecorator, coverageData.uncoveredRange);
+				editor.setDecorations(
+					decorators.type === 'gutter'
+						? decorators.uncoveredGutterDecorator
+						: decorators.uncoveredHighlightDecorator,
+					coverageData.uncoveredRange
+				);
 			}
 		}
 	}
@@ -323,6 +349,6 @@
 
 		const text = e.document.lineAt(change.range.start).text;
 		const idx = text.search('//');
-		return (idx > -1 && idx <= change.range.start.character);
+		return idx > -1 && idx <= change.range.start.character;
 	});
 }
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index 0b7769f..97fd0e3 100644
--- a/src/goDebugConfiguration.ts
+++ b/src/goDebugConfiguration.ts
@@ -14,8 +14,10 @@
 import { getBinPath, getCurrentGoPath, getGoConfig, getToolsEnvVars } from './util';

 

 export class GoDebugConfigurationProvider implements vscode.DebugConfigurationProvider {

-

-	public provideDebugConfigurations(folder: vscode.WorkspaceFolder | undefined, token?: vscode.CancellationToken): vscode.DebugConfiguration[] {

+	public provideDebugConfigurations(

+		folder: vscode.WorkspaceFolder | undefined,

+		token?: vscode.CancellationToken

+	): vscode.DebugConfiguration[] {

 		return [

 			{

 				name: 'Launch',

@@ -29,13 +31,18 @@
 		];

 	}

 

-	public resolveDebugConfiguration?(folder: vscode.WorkspaceFolder | undefined, debugConfiguration: vscode.DebugConfiguration, token?: vscode.CancellationToken): vscode.DebugConfiguration {

+	public resolveDebugConfiguration?(

+		folder: vscode.WorkspaceFolder | undefined,

+		debugConfiguration: vscode.DebugConfiguration,

+		token?: vscode.CancellationToken

+	): vscode.DebugConfiguration {

 		if (debugConfiguration) {

 			sendTelemetryEventForDebugConfiguration(debugConfiguration);

 		}

 

 		const activeEditor = vscode.window.activeTextEditor;

-		if (!debugConfiguration || !debugConfiguration.request) { // if 'request' is missing interpret this as a missing launch.json

+		if (!debugConfiguration || !debugConfiguration.request) {

+			// if 'request' is missing interpret this as a missing launch.json

 			if (!activeEditor || activeEditor.document.languageId !== 'go') {

 				return;

 			}

@@ -82,7 +89,10 @@
 		if (!debugConfiguration.hasOwnProperty('dlvLoadConfig') && dlvConfig.hasOwnProperty('dlvLoadConfig')) {

 			debugConfiguration['dlvLoadConfig'] = dlvConfig['dlvLoadConfig'];

 		}

-		if (!debugConfiguration.hasOwnProperty('showGlobalVariables') && dlvConfig.hasOwnProperty('showGlobalVariables')) {

+		if (

+			!debugConfiguration.hasOwnProperty('showGlobalVariables') &&

+			dlvConfig.hasOwnProperty('showGlobalVariables')

+		) {

 			debugConfiguration['showGlobalVariables'] = dlvConfig['showGlobalVariables'];

 		}

 		if (debugConfiguration.request === 'attach' && !debugConfiguration['cwd']) {

@@ -96,21 +106,31 @@
 		}

 

 		if (debugConfiguration['mode'] === 'auto') {

-			debugConfiguration['mode'] = (activeEditor && activeEditor.document.fileName.endsWith('_test.go')) ? 'test' : 'debug';

+			debugConfiguration['mode'] =

+				activeEditor && activeEditor.document.fileName.endsWith('_test.go') ? 'test' : 'debug';

 		}

-		debugConfiguration['currentFile'] = activeEditor && activeEditor.document.languageId === 'go' && activeEditor.document.fileName;

+		debugConfiguration['currentFile'] =

+			activeEditor && activeEditor.document.languageId === 'go' && activeEditor.document.fileName;

 

-		const neverAgain = { title: 'Don\'t Show Again' };

+		const neverAgain = { title: `Don't Show Again` };

 		const ignoreWarningKey = 'ignoreDebugLaunchRemoteWarning';

 		const ignoreWarning = getFromGlobalState(ignoreWarningKey);

-		if (ignoreWarning !== true && debugConfiguration.request === 'launch' && debugConfiguration['mode'] === 'remote') {

-			vscode.window.showWarningMessage('Request type of \'launch\' with mode \'remote\' is deprecated, please use request type \'attach\' with mode \'remote\' instead.', neverAgain).then((result) => {

-				if (result === neverAgain) {

-					updateGlobalState(ignoreWarningKey, true);

-				}

-			});

+		if (

+			ignoreWarning !== true &&

+			debugConfiguration.request === 'launch' &&

+			debugConfiguration['mode'] === 'remote'

+		) {

+			vscode.window

+				.showWarningMessage(

+					`Request type of 'launch' with mode 'remote' is deprecated, please use request type 'attach' with mode 'remote' instead.`,

+					neverAgain

+				)

+				.then((result) => {

+					if (result === neverAgain) {

+						updateGlobalState(ignoreWarningKey, true);

+					}

+				});

 		}

 		return debugConfiguration;

 	}

-

 }

diff --git a/src/goDeclaration.ts b/src/goDeclaration.ts
index eaea26c..5301af2 100644
--- a/src/goDeclaration.ts
+++ b/src/goDeclaration.ts
@@ -10,7 +10,19 @@
 import vscode = require('vscode');
 import { promptForMissingTool, promptForUpdatingTool } from './goInstallTools';
 import { getModFolderPath, promptToUpdateToolForModules } from './goModules';
-import { byteOffsetAt, getBinPath, getFileArchive, getGoConfig, getModuleCache, getToolsEnvVars, getWorkspaceFolderPath, goKeywords, isPositionInString, killProcess, runGodoc } from './util';
+import {
+	byteOffsetAt,
+	getBinPath,
+	getFileArchive,
+	getGoConfig,
+	getModuleCache,
+	getToolsEnvVars,
+	getWorkspaceFolderPath,
+	goKeywords,
+	isPositionInString,
+	killProcess,
+	runGodoc
+} from './util';
 
 const missingToolMsg = 'Missing tool: ';
 
@@ -46,7 +58,13 @@
 	desc: string;
 }
 
-export function definitionLocation(document: vscode.TextDocument, position: vscode.Position, goConfig: vscode.WorkspaceConfiguration, includeDocs: boolean, token: vscode.CancellationToken): Promise<GoDefinitionInformation> {
+export function definitionLocation(
+	document: vscode.TextDocument,
+	position: vscode.Position,
+	goConfig: vscode.WorkspaceConfiguration,
+	includeDocs: boolean,
+	token: vscode.CancellationToken
+): Promise<GoDefinitionInformation> {
 	const adjustedPos = adjustWordPosition(document, position);
 	if (!adjustedPos[0]) {
 		return Promise.resolve(null);
@@ -65,8 +83,10 @@
 			word,
 			includeDocs,
 			isMod: !!modFolderPath,
-			cwd: (modFolderPath && modFolderPath !== getModuleCache())
-				? modFolderPath : (getWorkspaceFolderPath(document.uri) || path.dirname(document.fileName))
+			cwd:
+				modFolderPath && modFolderPath !== getModuleCache()
+					? modFolderPath
+					: getWorkspaceFolderPath(document.uri) || path.dirname(document.fileName)
 		};
 		if (toolForDocs === 'godoc') {
 			return definitionLocation_godef(input, token);
@@ -77,11 +97,20 @@
 	});
 }
 
-export function adjustWordPosition(document: vscode.TextDocument, position: vscode.Position): [boolean, string, vscode.Position] {
+export function adjustWordPosition(
+	document: vscode.TextDocument,
+	position: vscode.Position
+): [boolean, string, vscode.Position] {
 	const wordRange = document.getWordRangeAtPosition(position);
 	const lineText = document.lineAt(position.line).text;
 	const word = wordRange ? document.getText(wordRange) : '';
-	if (!wordRange || lineText.startsWith('//') || isPositionInString(document, position) || word.match(/^\d+.?\d+$/) || goKeywords.indexOf(word) > 0) {
+	if (
+		!wordRange ||
+		lineText.startsWith('//') ||
+		isPositionInString(document, position) ||
+		word.match(/^\d+.?\d+$/) ||
+		goKeywords.indexOf(word) > 0
+	) {
 		return [false, null, null];
 	}
 	if (position.isEqual(wordRange.end) && position.isAfter(wordRange.start)) {
@@ -92,7 +121,11 @@
 }
 
 const godefImportDefinitionRegex = /^import \(.* ".*"\)$/;
-function definitionLocation_godef(input: GoDefinitionInput, token: vscode.CancellationToken, useReceivers: boolean = true): Promise<GoDefinitionInformation> {
+function definitionLocation_godef(
+	input: GoDefinitionInput,
+	token: vscode.CancellationToken,
+	useReceivers: boolean = true
+): Promise<GoDefinitionInformation> {
 	const godefTool = 'godef';
 	const godefPath = getBinPath(godefTool);
 	if (!path.isAbsolute(godefPath)) {
@@ -117,12 +150,16 @@
 					return reject(missingToolMsg + godefTool);
 				}
 				if (err) {
-					if (input.isMod
-						&& !input.includeDocs
-						&& stderr
-						&& stderr.startsWith(`godef: no declaration found for`)
+					if (
+						input.isMod &&
+						!input.includeDocs &&
+						stderr &&
+						stderr.startsWith(`godef: no declaration found for`)
 					) {
-						promptToUpdateToolForModules('godef', `To get the Go to Definition feature when using Go modules, please update your version of the "godef" tool.`);
+						promptToUpdateToolForModules(
+							'godef',
+							`To get the Go to Definition feature when using Go modules, please update your version of the "godef" tool.`
+						);
 						return reject(stderr);
 					}
 					if (stderr.indexOf('flag provided but not defined: -r') !== -1) {
@@ -145,7 +182,7 @@
 				const definitionInformation: GoDefinitionInformation = {
 					file,
 					line: +line - 1,
-					column: + col - 1,
+					column: +col - 1,
 					declarationlines: lines.slice(1),
 					toolUsed: 'godef',
 					doc: null,
@@ -155,15 +192,17 @@
 					return resolve(definitionInformation);
 				}
 				match = /^\w+ \(\*?(\w+)\)/.exec(lines[1]);
-				runGodoc(input.cwd, pkgPath, match ? match[1] : '', input.word, token).then((doc) => {
-					if (doc) {
-						definitionInformation.doc = doc;
-					}
-					resolve(definitionInformation);
-				}).catch((err) => {
-					console.log(err);
-					resolve(definitionInformation);
-				});
+				runGodoc(input.cwd, pkgPath, match ? match[1] : '', input.word, token)
+					.then((doc) => {
+						if (doc) {
+							definitionInformation.doc = doc;
+						}
+						resolve(definitionInformation);
+					})
+					.catch((err) => {
+						console.log(err);
+						resolve(definitionInformation);
+					});
 			} catch (e) {
 				reject(e);
 			}
@@ -174,7 +213,11 @@
 	});
 }
 
-function definitionLocation_gogetdoc(input: GoDefinitionInput, token: vscode.CancellationToken, useTags: boolean): Promise<GoDefinitionInformation> {
+function definitionLocation_gogetdoc(
+	input: GoDefinitionInput,
+	token: vscode.CancellationToken,
+	useTags: boolean
+): Promise<GoDefinitionInformation> {
 	const gogetdoc = getBinPath('gogetdoc');
 	if (!path.isAbsolute(gogetdoc)) {
 		return Promise.reject(missingToolMsg + 'gogetdoc');
@@ -187,10 +230,16 @@
 	}
 
 	return new Promise<GoDefinitionInformation>((resolve, reject) => {
-
-		const gogetdocFlagsWithoutTags = ['-u', '-json', '-modified', '-pos', input.document.fileName + ':#' + offset.toString()];
+		const gogetdocFlagsWithoutTags = [
+			'-u',
+			'-json',
+			'-modified',
+			'-pos',
+			input.document.fileName + ':#' + offset.toString()
+		];
 		const buildTags = getGoConfig(input.document.uri)['buildTags'];
-		const gogetdocFlags = (buildTags && useTags) ? [...gogetdocFlagsWithoutTags, '-tags', buildTags] : gogetdocFlagsWithoutTags;
+		const gogetdocFlags =
+			buildTags && useTags ? [...gogetdocFlagsWithoutTags, '-tags', buildTags] : gogetdocFlagsWithoutTags;
 		p = cp.execFile(gogetdoc, gogetdocFlags, { env, cwd: input.cwd }, (err, stdout, stderr) => {
 			try {
 				if (err && (<any>err).code === 'ENOENT') {
@@ -201,11 +250,11 @@
 					return definitionLocation_gogetdoc(input, token, false).then(resolve, reject);
 				}
 				if (err) {
-					if (input.isMod
-						&& !input.includeDocs
-						&& stdout.startsWith(`gogetdoc: couldn't get package for`)
-					) {
-						promptToUpdateToolForModules('gogetdoc', `To get the Go to Definition feature when using Go modules, please update your version of the "gogetdoc" tool.`);
+					if (input.isMod && !input.includeDocs && stdout.startsWith(`gogetdoc: couldn't get package for`)) {
+						promptToUpdateToolForModules(
+							'gogetdoc',
+							`To get the Go to Definition feature when using Go modules, please update your version of the "gogetdoc" tool.`
+						);
 						return resolve(null);
 					}
 					return reject(err.message || stderr);
@@ -229,7 +278,6 @@
 				definitionInfo.line = +match[2] - 1;
 				definitionInfo.column = +match[3] - 1;
 				return resolve(definitionInfo);
-
 			} catch (e) {
 				reject(e);
 			}
@@ -240,7 +288,10 @@
 	});
 }
 
-function definitionLocation_guru(input: GoDefinitionInput, token: vscode.CancellationToken): Promise<GoDefinitionInformation> {
+function definitionLocation_guru(
+	input: GoDefinitionInput,
+	token: vscode.CancellationToken
+): Promise<GoDefinitionInformation> {
 	const guru = getBinPath('guru');
 	if (!path.isAbsolute(guru)) {
 		return Promise.reject(missingToolMsg + 'guru');
@@ -252,37 +303,42 @@
 		token.onCancellationRequested(() => killProcess(p));
 	}
 	return new Promise<GoDefinitionInformation>((resolve, reject) => {
-		p = cp.execFile(guru, ['-json', '-modified', 'definition', input.document.fileName + ':#' + offset.toString()], { env }, (err, stdout, stderr) => {
-			try {
-				if (err && (<any>err).code === 'ENOENT') {
-					return reject(missingToolMsg + 'guru');
-				}
-				if (err) {
-					return reject(err.message || stderr);
-				}
-				const guruOutput = <GuruDefinitionOuput>JSON.parse(stdout.toString());
-				const match = /(.*):(\d+):(\d+)/.exec(guruOutput.objpos);
-				const definitionInfo: GoDefinitionInformation = {
-					file: null,
-					line: 0,
-					column: 0,
-					toolUsed: 'guru',
-					declarationlines: [guruOutput.desc],
-					doc: null,
-					name: null,
-				};
-				if (!match) {
+		p = cp.execFile(
+			guru,
+			['-json', '-modified', 'definition', input.document.fileName + ':#' + offset.toString()],
+			{ env },
+			(err, stdout, stderr) => {
+				try {
+					if (err && (<any>err).code === 'ENOENT') {
+						return reject(missingToolMsg + 'guru');
+					}
+					if (err) {
+						return reject(err.message || stderr);
+					}
+					const guruOutput = <GuruDefinitionOuput>JSON.parse(stdout.toString());
+					const match = /(.*):(\d+):(\d+)/.exec(guruOutput.objpos);
+					const definitionInfo: GoDefinitionInformation = {
+						file: null,
+						line: 0,
+						column: 0,
+						toolUsed: 'guru',
+						declarationlines: [guruOutput.desc],
+						doc: null,
+						name: null
+					};
+					if (!match) {
+						return resolve(definitionInfo);
+					}
+					const [_, file, line, col] = match;
+					definitionInfo.file = match[1];
+					definitionInfo.line = +match[2] - 1;
+					definitionInfo.column = +match[3] - 1;
 					return resolve(definitionInfo);
+				} catch (e) {
+					reject(e);
 				}
-				const [_, file, line, col] = match;
-				definitionInfo.file = match[1];
-				definitionInfo.line = +match[2] - 1;
-				definitionInfo.column = +match[3] - 1;
-				return resolve(definitionInfo);
-			} catch (e) {
-				reject(e);
 			}
-		});
+		);
 		if (p.pid) {
 			p.stdin.end(getFileArchive(input.document));
 		}
@@ -307,22 +363,29 @@
 		this.goConfig = goConfig;
 	}
 
-	public provideDefinition(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.Location> {
-		return definitionLocation(document, position, this.goConfig, false, token).then((definitionInfo) => {
-			if (definitionInfo == null || definitionInfo.file == null) {
-				return null;
+	public provideDefinition(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		token: vscode.CancellationToken
+	): Thenable<vscode.Location> {
+		return definitionLocation(document, position, this.goConfig, false, token).then(
+			(definitionInfo) => {
+				if (definitionInfo == null || definitionInfo.file == null) {
+					return null;
+				}
+				const definitionResource = vscode.Uri.file(definitionInfo.file);
+				const pos = new vscode.Position(definitionInfo.line, definitionInfo.column);
+				return new vscode.Location(definitionResource, pos);
+			},
+			(err) => {
+				const miss = parseMissingError(err);
+				if (miss[0]) {
+					promptForMissingTool(miss[1]);
+				} else if (err) {
+					return Promise.reject(err);
+				}
+				return Promise.resolve(null);
 			}
-			const definitionResource = vscode.Uri.file(definitionInfo.file);
-			const pos = new vscode.Position(definitionInfo.line, definitionInfo.column);
-			return new vscode.Location(definitionResource, pos);
-		}, (err) => {
-			const miss = parseMissingError(err);
-			if (miss[0]) {
-				promptForMissingTool(miss[1]);
-			} else if (err) {
-				return Promise.reject(err);
-			}
-			return Promise.resolve(null);
-		});
+		);
 	}
 }
diff --git a/src/goDoctor.ts b/src/goDoctor.ts
index 18a7089..362544d 100644
--- a/src/goDoctor.ts
+++ b/src/goDoctor.ts
@@ -49,12 +49,7 @@
 		return;
 	}
 
-	runGoDoctor(
-		newName,
-		activeEditor.selection,
-		activeEditor.document.fileName,
-		type
-	);
+	runGoDoctor(newName, activeEditor.selection, activeEditor.document.fileName, type);
 }
 
 /**
@@ -82,8 +77,9 @@
 			[
 				'-w',
 				'-pos',
-				`${selection.start.line + 1},${selection.start.character +
-				1}:${selection.end.line + 1},${selection.end.character}`,
+				`${selection.start.line + 1},${selection.start.character + 1}:${selection.end.line + 1},${
+					selection.end.character
+				}`,
 				'-file',
 				fileName,
 				type,
diff --git a/src/goExtraInfo.ts b/src/goExtraInfo.ts
index 090a9ec..d34da6d 100644
--- a/src/goExtraInfo.ts
+++ b/src/goExtraInfo.ts
@@ -27,24 +27,27 @@
 		if (goConfig['docsTool'] === 'guru') {
 			goConfig = Object.assign({}, goConfig, { docsTool: 'godoc' });
 		}
-		return definitionLocation(document, position, goConfig, true, token).then((definitionInfo) => {
-			if (definitionInfo == null) {
+		return definitionLocation(document, position, goConfig, true, token).then(
+			(definitionInfo) => {
+				if (definitionInfo == null) {
+					return null;
+				}
+				const lines = definitionInfo.declarationlines
+					.filter((line) => line !== '')
+					.map((line) => line.replace(/\t/g, '    '));
+				let text;
+				text = lines.join('\n').replace(/\n+$/, '');
+				const hoverTexts = new vscode.MarkdownString();
+				hoverTexts.appendCodeblock(text, 'go');
+				if (definitionInfo.doc != null) {
+					hoverTexts.appendMarkdown(definitionInfo.doc);
+				}
+				const hover = new Hover(hoverTexts);
+				return hover;
+			},
+			() => {
 				return null;
 			}
-			const lines = definitionInfo.declarationlines
-				.filter((line) => line !== '')
-				.map((line) => line.replace(/\t/g, '    '));
-			let text;
-			text = lines.join('\n').replace(/\n+$/, '');
-			const hoverTexts = new vscode.MarkdownString();
-			hoverTexts.appendCodeblock(text, 'go');
-			if (definitionInfo.doc != null) {
-				hoverTexts.appendMarkdown(definitionInfo.doc);
-			}
-			const hover = new Hover(hoverTexts);
-			return hover;
-		}, () => {
-			return null;
-		});
+		);
 	}
 }
diff --git a/src/goFillStruct.ts b/src/goFillStruct.ts
index c3f725f..ec68eaf 100644
--- a/src/goFillStruct.ts
+++ b/src/goFillStruct.ts
@@ -79,14 +79,18 @@
 
 				const indent = '\t'.repeat(tabsCount);
 
-				editor.edit((editBuilder) => {
-					output.forEach((structToFill) => {
-						const out = structToFill.code.replace(/\n/g, '\n' + indent);
-						const rangeToReplace = new vscode.Range(editor.document.positionAt(structToFill.start),
-							editor.document.positionAt(structToFill.end));
-						editBuilder.replace(rangeToReplace, out);
-					});
-				}).then(() => resolve());
+				editor
+					.edit((editBuilder) => {
+						output.forEach((structToFill) => {
+							const out = structToFill.code.replace(/\n/g, '\n' + indent);
+							const rangeToReplace = new vscode.Range(
+								editor.document.positionAt(structToFill.start),
+								editor.document.positionAt(structToFill.end)
+							);
+							editBuilder.replace(rangeToReplace, out);
+						});
+					})
+					.then(() => resolve());
 			} catch (e) {
 				reject(e);
 			}
diff --git a/src/goFormat.ts b/src/goFormat.ts
index c13e895..9b1c219 100644
--- a/src/goFormat.ts
+++ b/src/goFormat.ts
@@ -13,8 +13,11 @@
 import { getBinPath, getGoConfig, getToolsEnvVars, killTree } from './util';
 
 export class GoDocumentFormattingEditProvider implements vscode.DocumentFormattingEditProvider {
-
-	public provideDocumentFormattingEdits(document: vscode.TextDocument, options: vscode.FormattingOptions, token: vscode.CancellationToken): vscode.ProviderResult<vscode.TextEdit[]> {
+	public provideDocumentFormattingEdits(
+		document: vscode.TextDocument,
+		options: vscode.FormattingOptions,
+		token: vscode.CancellationToken
+	): vscode.ProviderResult<vscode.TextEdit[]> {
 		if (vscode.window.visibleTextEditors.every((e) => e.document.fileName !== document.fileName)) {
 			return [];
 		}
@@ -39,19 +42,27 @@
 			formatFlags.push('-style=indent=' + options.tabSize);
 		}
 
-		return this.runFormatter(formatTool, formatFlags, document, token).then((edits) => edits, (err) => {
-			if (typeof err === 'string' && err.startsWith('flag provided but not defined: -srcdir')) {
-				promptForUpdatingTool(formatTool);
-				return Promise.resolve([]);
+		return this.runFormatter(formatTool, formatFlags, document, token).then(
+			(edits) => edits,
+			(err) => {
+				if (typeof err === 'string' && err.startsWith('flag provided but not defined: -srcdir')) {
+					promptForUpdatingTool(formatTool);
+					return Promise.resolve([]);
+				}
+				if (err) {
+					console.log(err);
+					return Promise.reject('Check the console in dev tools to find errors when formatting.');
+				}
 			}
-			if (err) {
-				console.log(err);
-				return Promise.reject('Check the console in dev tools to find errors when formatting.');
-			}
-		});
+		);
 	}
 
-	private runFormatter(formatTool: string, formatFlags: string[], document: vscode.TextDocument, token: vscode.CancellationToken): Thenable<vscode.TextEdit[]> {
+	private runFormatter(
+		formatTool: string,
+		formatFlags: string[],
+		document: vscode.TextDocument,
+		token: vscode.CancellationToken
+	): Thenable<vscode.TextEdit[]> {
 		const formatCommandBinPath = getBinPath(formatTool);
 
 		return new Promise<vscode.TextEdit[]>((resolve, reject) => {
@@ -70,8 +81,8 @@
 			const p = cp.spawn(formatCommandBinPath, formatFlags, { env, cwd });
 			token.onCancellationRequested(() => !p.killed && killTree(p.pid));
 			p.stdout.setEncoding('utf8');
-			p.stdout.on('data', (data) => stdout += data);
-			p.stderr.on('data', (data) => stderr += data);
+			p.stdout.on('data', (data) => (stdout += data));
+			p.stderr.on('data', (data) => (stderr += data));
 			p.on('error', (err) => {
 				if (err && (<any>err).code === 'ENOENT') {
 					promptForMissingTool(formatTool);
@@ -87,7 +98,9 @@
 				// VS Code will calculate minimal edits to be applied
 				const fileStart = new vscode.Position(0, 0);
 				const fileEnd = document.lineAt(document.lineCount - 1).range.end;
-				const textEdits: vscode.TextEdit[] = [new vscode.TextEdit(new vscode.Range(fileStart, fileEnd), stdout)];
+				const textEdits: vscode.TextEdit[] = [
+					new vscode.TextEdit(new vscode.Range(fileStart, fileEnd), stdout)
+				];
 
 				const timeTaken = Date.now() - t0;
 				sendTelemetryEventForFormatting(formatTool, timeTaken);
diff --git a/src/goGenerateTests.ts b/src/goGenerateTests.ts
index 8039da5..7e8df75 100644
--- a/src/goGenerateTests.ts
+++ b/src/goGenerateTests.ts
@@ -70,8 +70,7 @@
 	if (!editor) {
 		return;
 	}
-	return generateTests({ dir: path.dirname(editor.document.uri.fsPath) },
-		getGoConfig(editor.document.uri));
+	return generateTests({ dir: path.dirname(editor.document.uri.fsPath) }, getGoConfig(editor.document.uri));
 }
 
 export function generateTestCurrentFile(): Promise<boolean> {
@@ -79,8 +78,7 @@
 	if (!editor) {
 		return;
 	}
-	return generateTests({ dir: editor.document.uri.fsPath },
-		getGoConfig(editor.document.uri));
+	return generateTests({ dir: editor.document.uri.fsPath }, getGoConfig(editor.document.uri));
 }
 
 export async function generateTestCurrentFunction(): Promise<boolean> {
@@ -91,7 +89,9 @@
 
 	const functions = await getFunctions(editor.document);
 	const selection = editor.selection;
-	const currentFunction: vscode.DocumentSymbol = functions.find((func) => selection && func.range.contains(selection.start));
+	const currentFunction: vscode.DocumentSymbol = functions.find(
+		(func) => selection && func.range.contains(selection.start)
+	);
 
 	if (!currentFunction) {
 		vscode.window.showInformationMessage('No function found at cursor.');
@@ -161,11 +161,14 @@
 
 				// Expected stdout is of the format "Generated TestMain\nGenerated Testhello\n"
 				if (stdout.startsWith(generatedWord)) {
-					const lines = stdout.split('\n').filter((element) => {
-						return element.startsWith(generatedWord);
-					}).map((element) => {
-						return element.substr(generatedWord.length);
-					});
+					const lines = stdout
+						.split('\n')
+						.filter((element) => {
+							return element.startsWith(generatedWord);
+						})
+						.map((element) => {
+							return element.substr(generatedWord.length);
+						});
 					message = `Generated ${lines.join(', ')}`;
 					testsGenerated = true;
 				}
diff --git a/src/goGetPackage.ts b/src/goGetPackage.ts
index 47978fb..5302159 100644
--- a/src/goGetPackage.ts
+++ b/src/goGetPackage.ts
@@ -25,7 +25,9 @@
 
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		return vscode.window.showErrorMessage(`Failed to run "go get" to get package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		return vscode.window.showErrorMessage(
+			`Failed to run "go get" to get package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 	}
 
 	const env = Object.assign({}, process.env, { GOPATH: getCurrentGoPath() });
diff --git a/src/goImpl.ts b/src/goImpl.ts
index dcb0fcf..f0d0d29 100644
--- a/src/goImpl.ts
+++ b/src/goImpl.ts
@@ -16,44 +16,51 @@
 
 export function implCursor() {
 	const cursor = vscode.window.activeTextEditor.selection;
-	return vscode.window.showInputBox({
-		placeHolder: 'f *File io.Closer',
-		prompt: 'Enter receiver and interface to implement.'
-	}).then((implInput) => {
-		if (typeof implInput === 'undefined') {
-			return;
-		}
-		const matches = implInput.match(inputRegex);
-		if (!matches) {
-			vscode.window.showInformationMessage(`Not parsable input: ${implInput}`);
-			return;
-		}
+	return vscode.window
+		.showInputBox({
+			placeHolder: 'f *File io.Closer',
+			prompt: 'Enter receiver and interface to implement.'
+		})
+		.then((implInput) => {
+			if (typeof implInput === 'undefined') {
+				return;
+			}
+			const matches = implInput.match(inputRegex);
+			if (!matches) {
+				vscode.window.showInformationMessage(`Not parsable input: ${implInput}`);
+				return;
+			}
 
-		// TODO: automatically detect type name at cursor
-		// if matches[1] is undefined then detect receiver type
-		// take first character and use as receiver name
+			// TODO: automatically detect type name at cursor
+			// if matches[1] is undefined then detect receiver type
+			// take first character and use as receiver name
 
-		runGoImpl([matches[1], matches[2]], cursor.start);
-	});
+			runGoImpl([matches[1], matches[2]], cursor.start);
+		});
 }
 
 function runGoImpl(args: string[], insertPos: vscode.Position) {
 	const goimpl = getBinPath('impl');
-	const p = cp.execFile(goimpl, args, { env: getToolsEnvVars(), cwd: dirname(vscode.window.activeTextEditor.document.fileName) }, (err, stdout, stderr) => {
-		if (err && (<any>err).code === 'ENOENT') {
-			promptForMissingTool('impl');
-			return;
-		}
+	const p = cp.execFile(
+		goimpl,
+		args,
+		{ env: getToolsEnvVars(), cwd: dirname(vscode.window.activeTextEditor.document.fileName) },
+		(err, stdout, stderr) => {
+			if (err && (<any>err).code === 'ENOENT') {
+				promptForMissingTool('impl');
+				return;
+			}
 
-		if (err) {
-			vscode.window.showInformationMessage(`Cannot stub interface: ${stderr}`);
-			return;
-		}
+			if (err) {
+				vscode.window.showInformationMessage(`Cannot stub interface: ${stderr}`);
+				return;
+			}
 
-		vscode.window.activeTextEditor.edit((editBuilder) => {
-			editBuilder.insert(insertPos, stdout);
-		});
-	});
+			vscode.window.activeTextEditor.edit((editBuilder) => {
+				editBuilder.insert(insertPos, stdout);
+			});
+		}
+	);
 	if (p.pid) {
 		p.stdin.end();
 	}
diff --git a/src/goImplementations.ts b/src/goImplementations.ts
index ed196be..e9d1348 100644
--- a/src/goImplementations.ts
+++ b/src/goImplementations.ts
@@ -10,7 +10,15 @@
 import vscode = require('vscode');
 import { promptForMissingTool } from './goInstallTools';
 import { envPath } from './goPath';
-import { byteOffsetAt, canonicalizeGOPATHPrefix, getBinPath, getGoConfig, getToolsEnvVars, getWorkspaceFolderPath, killTree } from './util';
+import {
+	byteOffsetAt,
+	canonicalizeGOPATHPrefix,
+	getBinPath,
+	getGoConfig,
+	getToolsEnvVars,
+	getWorkspaceFolderPath,
+	killTree
+} from './util';
 
 interface GoListOutput {
 	Dir: string;
@@ -33,7 +41,11 @@
 }
 
 export class GoImplementationProvider implements vscode.ImplementationProvider {
-	public provideImplementation(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.Definition> {
+	public provideImplementation(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		token: vscode.CancellationToken
+	): Thenable<vscode.Definition> {
 		// To keep `guru implements` fast we want to restrict the scope of the search to current workspace
 		// If no workspace is open, then no-op
 		const root = getWorkspaceFolderPath(document.uri);
@@ -44,7 +56,9 @@
 
 		const goRuntimePath = getBinPath('go');
 		if (!goRuntimePath) {
-			vscode.window.showErrorMessage(`Failed to run "go list" to get the scope to find implementations as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+			vscode.window.showErrorMessage(
+				`Failed to run "go list" to get the scope to find implementations as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+			);
 			return;
 		}
 
@@ -53,64 +67,72 @@
 				return resolve(null);
 			}
 			const env = getToolsEnvVars();
-			const listProcess = cp.execFile(goRuntimePath, ['list', '-e', '-json'], { cwd: root, env }, (err, stdout, stderr) => {
-				if (err) {
-					return reject(err);
-				}
-				const listOutput = <GoListOutput>JSON.parse(stdout.toString());
-				const filename = canonicalizeGOPATHPrefix(document.fileName);
-				const cwd = path.dirname(filename);
-				const offset = byteOffsetAt(document, position);
-				const goGuru = getBinPath('guru');
-				const buildTags = getGoConfig(document.uri)['buildTags'];
-				const args = buildTags ? ['-tags', buildTags] : [];
-				if (listOutput.Root && listOutput.ImportPath) {
-					args.push('-scope', `${listOutput.ImportPath}/...`);
-				}
-				args.push('-json', 'implements', `${filename}:#${offset.toString()}`);
-
-				const guruProcess = cp.execFile(goGuru, args, { env }, (err, stdout, stderr) => {
-					if (err && (<any>err).code === 'ENOENT') {
-						promptForMissingTool('guru');
-						return resolve(null);
-					}
-
+			const listProcess = cp.execFile(
+				goRuntimePath,
+				['list', '-e', '-json'],
+				{ cwd: root, env },
+				(err, stdout, stderr) => {
 					if (err) {
 						return reject(err);
 					}
-
-					const guruOutput = <GuruImplementsOutput>JSON.parse(stdout.toString());
-					const results: vscode.Location[] = [];
-					const addResults = (list: GuruImplementsRef[]) => {
-						list.forEach((ref: GuruImplementsRef) => {
-							const match = /^(.*):(\d+):(\d+)/.exec(ref.pos);
-							if (!match) {
-								return;
-							}
-							const [_, file, lineStartStr, colStartStr] = match;
-							const referenceResource = vscode.Uri.file(path.resolve(cwd, file));
-							const range = new vscode.Range(
-								+lineStartStr - 1, +colStartStr - 1, +lineStartStr - 1, +colStartStr
-							);
-							results.push(new vscode.Location(referenceResource, range));
-						});
-					};
-
-					// If we looked for implementation of method go to method implementations only
-					if (guruOutput.to_method) {
-						addResults(guruOutput.to_method);
-					} else if (guruOutput.to) {
-						addResults(guruOutput.to);
-					} else if (guruOutput.from) {
-						addResults(guruOutput.from);
-					} else if (guruOutput.fromptr) {
-						addResults(guruOutput.fromptr);
+					const listOutput = <GoListOutput>JSON.parse(stdout.toString());
+					const filename = canonicalizeGOPATHPrefix(document.fileName);
+					const cwd = path.dirname(filename);
+					const offset = byteOffsetAt(document, position);
+					const goGuru = getBinPath('guru');
+					const buildTags = getGoConfig(document.uri)['buildTags'];
+					const args = buildTags ? ['-tags', buildTags] : [];
+					if (listOutput.Root && listOutput.ImportPath) {
+						args.push('-scope', `${listOutput.ImportPath}/...`);
 					}
+					args.push('-json', 'implements', `${filename}:#${offset.toString()}`);
 
-					return resolve(results);
-				});
-				token.onCancellationRequested(() => killTree(guruProcess.pid));
-			});
+					const guruProcess = cp.execFile(goGuru, args, { env }, (err, stdout, stderr) => {
+						if (err && (<any>err).code === 'ENOENT') {
+							promptForMissingTool('guru');
+							return resolve(null);
+						}
+
+						if (err) {
+							return reject(err);
+						}
+
+						const guruOutput = <GuruImplementsOutput>JSON.parse(stdout.toString());
+						const results: vscode.Location[] = [];
+						const addResults = (list: GuruImplementsRef[]) => {
+							list.forEach((ref: GuruImplementsRef) => {
+								const match = /^(.*):(\d+):(\d+)/.exec(ref.pos);
+								if (!match) {
+									return;
+								}
+								const [_, file, lineStartStr, colStartStr] = match;
+								const referenceResource = vscode.Uri.file(path.resolve(cwd, file));
+								const range = new vscode.Range(
+									+lineStartStr - 1,
+									+colStartStr - 1,
+									+lineStartStr - 1,
+									+colStartStr
+								);
+								results.push(new vscode.Location(referenceResource, range));
+							});
+						};
+
+						// If we looked for implementation of method go to method implementations only
+						if (guruOutput.to_method) {
+							addResults(guruOutput.to_method);
+						} else if (guruOutput.to) {
+							addResults(guruOutput.to);
+						} else if (guruOutput.from) {
+							addResults(guruOutput.from);
+						} else if (guruOutput.fromptr) {
+							addResults(guruOutput.fromptr);
+						}
+
+						return resolve(results);
+					});
+					token.onCancellationRequested(() => killTree(guruProcess.pid));
+				}
+			);
 			token.onCancellationRequested(() => killTree(listProcess.pid));
 		});
 	}
diff --git a/src/goImport.ts b/src/goImport.ts
index bd19d65..7fa2408 100644
--- a/src/goImport.ts
+++ b/src/goImport.ts
@@ -17,9 +17,10 @@
 const missingToolMsg = 'Missing tool: ';
 
 export async function listPackages(excludeImportedPkgs: boolean = false): Promise<string[]> {
-	const importedPkgs = excludeImportedPkgs && vscode.window.activeTextEditor
-		? await getImports(vscode.window.activeTextEditor.document)
-		: [];
+	const importedPkgs =
+		excludeImportedPkgs && vscode.window.activeTextEditor
+			? await getImports(vscode.window.activeTextEditor.document)
+			: [];
 	const pkgMap = await getImportablePackages(vscode.window.activeTextEditor.document.fileName, true);
 	const stdLibs: string[] = [];
 	const nonStdLibs: string[] = [];
@@ -43,7 +44,11 @@
  * @returns Array of imported package paths wrapped in a promise
  */
 async function getImports(document: vscode.TextDocument): Promise<string[]> {
-	const options = { fileName: document.fileName, importsOption: GoOutlineImportsOptions.Only, document };
+	const options = {
+		fileName: document.fileName,
+		importsOption: GoOutlineImportsOptions.Only,
+		document
+	};
 	const symbols = await documentSymbols(options, null);
 	if (!symbols || !symbols.length) {
 		return [];
@@ -95,12 +100,16 @@
 		imports.forEach((element) => {
 			const currentLine = vscode.window.activeTextEditor.document.lineAt(element.start).text;
 			const updatedLine = currentLine.replace(/^\s*import\s*/, '\t');
-			edits.push(vscode.TextEdit.replace(new vscode.Range(element.start, 0, element.start, currentLine.length), updatedLine));
+			edits.push(
+				vscode.TextEdit.replace(
+					new vscode.Range(element.start, 0, element.start, currentLine.length),
+					updatedLine
+				)
+			);
 		});
 		edits.push(vscode.TextEdit.insert(new vscode.Position(imports[imports.length - 1].end + 1, 0), ')\n'));
 
 		return edits;
-
 	} else if (pkg && pkg.start >= 0) {
 		// There are no import declarations, but there is a package declaration
 		return [vscode.TextEdit.insert(new vscode.Position(pkg.start + 1, 0), '\nimport (\n\t"' + arg + '"\n)\n')];
@@ -110,8 +119,8 @@
 	}
 }
 
-export function addImport(arg: { importPath: string, from: string }) {
-	const p = (arg && arg.importPath) ? Promise.resolve(arg.importPath) : askUserForImport();
+export function addImport(arg: { importPath: string; from: string }) {
+	const p = arg && arg.importPath ? Promise.resolve(arg.importPath) : askUserForImport();
 	p.then((imp) => {
 		sendTelemetryEventForAddImportCmd(arg);
 		const edits = getTextEditForAddImport(imp);
@@ -157,7 +166,9 @@
 
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		vscode.window.showErrorMessage(`Failed to run "go list" to find the package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		vscode.window.showErrorMessage(
+			`Failed to run "go list" to find the package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	const env = getToolsEnvVars();
@@ -177,6 +188,10 @@
 			return;
 		}
 
-		vscode.workspace.updateWorkspaceFolders(vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders.length : 0, null, { uri: importPathUri });
+		vscode.workspace.updateWorkspaceFolders(
+			vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders.length : 0,
+			null,
+			{ uri: importPathUri }
+		);
 	});
 }
diff --git a/src/goInstall.ts b/src/goInstall.ts
index 8645a60..b4b0101 100644
--- a/src/goInstall.ts
+++ b/src/goInstall.ts
@@ -18,13 +18,17 @@
 		return;

 	}

 	if (editor.document.languageId !== 'go') {

-		vscode.window.showInformationMessage('File in the active editor is not a Go file, cannot find current package to install');

+		vscode.window.showInformationMessage(

+			'File in the active editor is not a Go file, cannot find current package to install'

+		);

 		return;

 	}

 

 	const goRuntimePath = getBinPath('go');

 	if (!goRuntimePath) {

-		vscode.window.showErrorMessage(`Failed to run "go install" to install the package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);

+		vscode.window.showErrorMessage(

+			`Failed to run "go install" to install the package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`

+		);

 		return;

 	}

 

@@ -47,7 +51,7 @@
 

 	// Find the right importPath instead of directly using `.`. Fixes https://github.com/Microsoft/vscode-go/issues/846

 	const currentGoWorkspace = getCurrentGoWorkspaceFromGOPATH(getCurrentGoPath(), cwd);

-	const importPath = (currentGoWorkspace && !isMod) ? cwd.substr(currentGoWorkspace.length + 1) : '.';

+	const importPath = currentGoWorkspace && !isMod ? cwd.substr(currentGoWorkspace.length + 1) : '.';

 	args.push(importPath);

 

 	outputChannel.clear();

diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index b51ab91..82171e7 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -12,8 +12,27 @@
 import { getLanguageServerToolPath } from './goLanguageServer';
 import { envPath, getToolFromToolPath } from './goPath';
 import { hideGoStatus, outputChannel, showGoStatus } from './goStatus';
-import { containsString, containsTool, disableModulesForWildcard, getConfiguredTools, getImportPath, getTool, hasModSuffix, isGocode, Tool } from './goTools';
-import { getBinPath, getCurrentGoPath, getGoConfig, getGoVersion, getTempFilePath, getToolsGopath, GoVersion, resolvePath } from './util';
+import {
+	containsString,
+	containsTool,
+	disableModulesForWildcard,
+	getConfiguredTools,
+	getImportPath,
+	getTool,
+	hasModSuffix,
+	isGocode,
+	Tool
+} from './goTools';
+import {
+	getBinPath,
+	getCurrentGoPath,
+	getGoConfig,
+	getGoVersion,
+	getTempFilePath,
+	getToolsGopath,
+	GoVersion,
+	resolvePath
+} from './util';
 
 // declinedUpdates tracks the tools that the user has declined to update.
 const declinedUpdates: Tool[] = [];
@@ -27,29 +46,37 @@
 
 	// Update existing tools by finding all tools the user has already installed.
 	if (updateExistingToolsOnly) {
-		installTools(allTools.filter((tool) => {
-			const toolPath = getBinPath(tool.name);
-			return toolPath && path.isAbsolute(toolPath);
-		}), goVersion);
+		installTools(
+			allTools.filter((tool) => {
+				const toolPath = getBinPath(tool.name);
+				return toolPath && path.isAbsolute(toolPath);
+			}),
+			goVersion
+		);
 		return;
 	}
 
 	// Otherwise, allow the user to select which tools to install or update.
-	vscode.window.showQuickPick(allTools.map((x) => {
-		const item: vscode.QuickPickItem = {
-			label: x.name,
-			description: x.description
-		};
-		return item;
-	}), {
-		canPickMany: true,
-		placeHolder: 'Select the tools to install/update.'
-	}).then((selectedTools) => {
-		if (!selectedTools) {
-			return;
-		}
-		installTools(selectedTools.map((x) => getTool(x.label)), goVersion);
-	});
+	vscode.window
+		.showQuickPick(
+			allTools.map((x) => {
+				const item: vscode.QuickPickItem = {
+					label: x.name,
+					description: x.description
+				};
+				return item;
+			}),
+			{
+				canPickMany: true,
+				placeHolder: 'Select the tools to install/update.'
+			}
+		)
+		.then((selectedTools) => {
+			if (!selectedTools) {
+				return;
+			}
+			installTools(selectedTools.map((x) => getTool(x.label)), goVersion);
+		});
 }
 
 /**
@@ -60,7 +87,9 @@
 export function installTools(missing: Tool[], goVersion: GoVersion): Promise<void> {
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		vscode.window.showErrorMessage(`Failed to run "go get" to install the packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		vscode.window.showErrorMessage(
+			`Failed to run "go get" to install the packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	if (!missing) {
@@ -75,7 +104,7 @@
 			http_proxy: httpProxy,
 			HTTP_PROXY: httpProxy,
 			https_proxy: httpProxy,
-			HTTPS_PROXY: httpProxy,
+			HTTPS_PROXY: httpProxy
 		});
 	}
 
@@ -112,7 +141,9 @@
 		return;
 	}
 
-	let installingMsg = `Installing ${missing.length} ${missing.length > 1 ? 'tools' : 'tool'} at ${toolsGopath}${path.sep}bin`;
+	let installingMsg = `Installing ${missing.length} ${missing.length > 1 ? 'tools' : 'tool'} at ${toolsGopath}${
+		path.sep
+	}bin`;
 
 	// If the user is on Go >= 1.11, tools should be installed with modules enabled.
 	// This ensures that users get the latest tagged version, rather than master,
@@ -134,102 +165,120 @@
 	// Install tools in a temporary directory, to avoid altering go.mod files.
 	const toolsTmpDir = fs.mkdtempSync(getTempFilePath('go-tools-'));
 
-	return missing.reduce((res: Promise<string[]>, tool: Tool) => {
-		return res.then((sofar) => new Promise<string[]>((resolve, reject) => {
-			// Disable modules for tools which are installed with the "..." wildcard.
-			// TODO: ... will be supported in Go 1.13, so enable these tools to use modules then.
-			const modulesOffForTool = modulesOff || disableModulesForWildcard(tool, goVersion);
-			let tmpGoModFile: string;
-			if (modulesOffForTool) {
-				envForTools['GO111MODULE'] = 'off';
-			} else {
-				envForTools['GO111MODULE'] = 'on';
-				// Write a temporary go.mod file to avoid version conflicts.
-				tmpGoModFile = path.join(toolsTmpDir, 'go.mod');
-				fs.writeFileSync(tmpGoModFile, 'module tools');
-			}
-
-			const opts = {
-				env: envForTools,
-				cwd: toolsTmpDir,
-			};
-
-			const callback = (err: Error, stdout: string, stderr: string) => {
-				// Make sure to delete the temporary go.mod file, if it exists.
-				if (tmpGoModFile && fs.existsSync(tmpGoModFile)) {
-					fs.unlinkSync(tmpGoModFile);
-				}
-				if (err) {
-					outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' FAILED');
-					const failureReason = tool.name + ';;' + err + stdout.toString() + stderr.toString();
-					resolve([...sofar, failureReason]);
-				} else {
-					outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' SUCCEEDED');
-					resolve([...sofar, null]);
-				}
-			};
-
-			let closeToolPromise = Promise.resolve(true);
-			const toolBinPath = getBinPath(tool.name);
-			if (path.isAbsolute(toolBinPath) && isGocode(tool)) {
-				closeToolPromise = new Promise<boolean>((innerResolve) => {
-					cp.execFile(toolBinPath, ['close'], {}, (err, stdout, stderr) => {
-						if (stderr && stderr.indexOf('rpc: can\'t find service Server.') > -1) {
-							outputChannel.appendLine('Installing gocode aborted as existing process cannot be closed. Please kill the running process for gocode and try again.');
-							return innerResolve(false);
+	return missing
+		.reduce((res: Promise<string[]>, tool: Tool) => {
+			return res.then(
+				(sofar) =>
+					new Promise<string[]>((resolve, reject) => {
+						// Disable modules for tools which are installed with the "..." wildcard.
+						// TODO: ... will be supported in Go 1.13, so enable these tools to use modules then.
+						const modulesOffForTool = modulesOff || disableModulesForWildcard(tool, goVersion);
+						let tmpGoModFile: string;
+						if (modulesOffForTool) {
+							envForTools['GO111MODULE'] = 'off';
+						} else {
+							envForTools['GO111MODULE'] = 'on';
+							// Write a temporary go.mod file to avoid version conflicts.
+							tmpGoModFile = path.join(toolsTmpDir, 'go.mod');
+							fs.writeFileSync(tmpGoModFile, 'module tools');
 						}
-						innerResolve(true);
-					});
-				});
+
+						const opts = {
+							env: envForTools,
+							cwd: toolsTmpDir
+						};
+
+						const callback = (err: Error, stdout: string, stderr: string) => {
+							// Make sure to delete the temporary go.mod file, if it exists.
+							if (tmpGoModFile && fs.existsSync(tmpGoModFile)) {
+								fs.unlinkSync(tmpGoModFile);
+							}
+							if (err) {
+								outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' FAILED');
+								const failureReason = tool.name + ';;' + err + stdout.toString() + stderr.toString();
+								resolve([...sofar, failureReason]);
+							} else {
+								outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' SUCCEEDED');
+								resolve([...sofar, null]);
+							}
+						};
+
+						let closeToolPromise = Promise.resolve(true);
+						const toolBinPath = getBinPath(tool.name);
+						if (path.isAbsolute(toolBinPath) && isGocode(tool)) {
+							closeToolPromise = new Promise<boolean>((innerResolve) => {
+								cp.execFile(toolBinPath, ['close'], {}, (err, stdout, stderr) => {
+									if (stderr && stderr.indexOf(`rpc: can't find service Server.`) > -1) {
+										outputChannel.appendLine(
+											'Installing gocode aborted as existing process cannot be closed. Please kill the running process for gocode and try again.'
+										);
+										return innerResolve(false);
+									}
+									innerResolve(true);
+								});
+							});
+						}
+
+						closeToolPromise.then((success) => {
+							if (!success) {
+								resolve([...sofar, null]);
+								return;
+							}
+							const args = ['get', '-v'];
+							// Only get tools at master if we are not using modules.
+							if (modulesOffForTool) {
+								args.push('-u');
+							}
+							// Tools with a "mod" suffix should not be installed,
+							// instead we run "go build -o" to rename them.
+							if (hasModSuffix(tool)) {
+								args.push('-d');
+							}
+							args.push(getImportPath(tool, goVersion));
+							cp.execFile(goRuntimePath, args, opts, (err, stdout, stderr) => {
+								if (stderr.indexOf('unexpected directory layout:') > -1) {
+									outputChannel.appendLine(
+										`Installing ${tool.name} failed with error "unexpected directory layout". Retrying...`
+									);
+									cp.execFile(goRuntimePath, args, opts, callback);
+								} else if (!err && hasModSuffix(tool)) {
+									const outputFile = path.join(
+										toolsGopath,
+										'bin',
+										process.platform === 'win32' ? `${tool.name}.exe` : tool.name
+									);
+									cp.execFile(
+										goRuntimePath,
+										['build', '-o', outputFile, getImportPath(tool, goVersion)],
+										opts,
+										callback
+									);
+								} else {
+									callback(err, stdout, stderr);
+								}
+							});
+						});
+					})
+			);
+		}, Promise.resolve([]))
+		.then((res) => {
+			outputChannel.appendLine(''); // Blank line for spacing
+			const failures = res.filter((x) => x != null);
+			if (failures.length === 0) {
+				if (containsString(missing, 'go-langserver') || containsString(missing, 'gopls')) {
+					outputChannel.appendLine('Reload VS Code window to use the Go language server');
+				}
+				outputChannel.appendLine('All tools successfully installed. You are ready to Go :).');
+				return;
 			}
 
-			closeToolPromise.then((success) => {
-				if (!success) {
-					resolve([...sofar, null]);
-					return;
-				}
-				const args = ['get', '-v'];
-				// Only get tools at master if we are not using modules.
-				if (modulesOffForTool) {
-					args.push('-u');
-				}
-				// Tools with a "mod" suffix should not be installed,
-				// instead we run "go build -o" to rename them.
-				if (hasModSuffix(tool)) {
-					args.push('-d');
-				}
-				args.push(getImportPath(tool, goVersion));
-				cp.execFile(goRuntimePath, args, opts, (err, stdout, stderr) => {
-					if (stderr.indexOf('unexpected directory layout:') > -1) {
-						outputChannel.appendLine(`Installing ${tool.name} failed with error "unexpected directory layout". Retrying...`);
-						cp.execFile(goRuntimePath, args, opts, callback);
-					} else if (!err && hasModSuffix(tool)) {
-						const outputFile = path.join(toolsGopath, 'bin', process.platform === 'win32' ? `${tool.name}.exe` : tool.name);
-						cp.execFile(goRuntimePath, ['build', '-o', outputFile, getImportPath(tool, goVersion)], opts, callback);
-					} else {
-						callback(err, stdout, stderr);
-					}
-				});
+			outputChannel.appendLine(failures.length + ' tools failed to install.\n');
+			failures.forEach((failure, index, failures) => {
+				const reason = failure.split(';;');
+				outputChannel.appendLine(reason[0] + ':');
+				outputChannel.appendLine(reason[1]);
 			});
-		}));
-	}, Promise.resolve([])).then((res) => {
-		outputChannel.appendLine(''); // Blank line for spacing
-		const failures = res.filter((x) => x != null);
-		if (failures.length === 0) {
-			if (containsString(missing, 'go-langserver') || containsString(missing, 'gopls')) {
-				outputChannel.appendLine('Reload VS Code window to use the Go language server');
-			}
-			outputChannel.appendLine('All tools successfully installed. You\'re ready to Go :).');
-			return;
-		}
-
-		outputChannel.appendLine(failures.length + ' tools failed to install.\n');
-		failures.forEach((failure, index, failures) => {
-			const reason = failure.split(';;');
-			outputChannel.appendLine(reason[0] + ':');
-			outputChannel.appendLine(reason[1]);
 		});
-	});
 }
 
 export async function promptForMissingTool(toolName: string) {
@@ -246,10 +295,12 @@
 		let outdatedErrorMsg;
 		switch (tool.name) {
 			case 'golint':
-				outdatedErrorMsg = 'golint no longer supports go1.8 or below, update your settings to use golangci-lint as go.lintTool and install golangci-lint';
+				outdatedErrorMsg =
+					'golint no longer supports go1.8 or below, update your settings to use golangci-lint as go.lintTool and install golangci-lint';
 				break;
 			case 'gotests':
-				outdatedErrorMsg = 'Generate unit tests feature is not supported as gotests tool needs go1.9 or higher.';
+				outdatedErrorMsg =
+					'Generate unit tests feature is not supported as gotests tool needs go1.9 or higher.';
 				break;
 		}
 		if (outdatedErrorMsg) {
@@ -268,7 +319,10 @@
 		// Offer the option to install all tools.
 		installOptions.push('Install All');
 	}
-	const msg = `The "${tool.name}" command is not available. Run "go get -v ${getImportPath(tool, goVersion)}" to install.`;
+	const msg = `The "${tool.name}" command is not available. Run "go get -v ${getImportPath(
+		tool,
+		goVersion
+	)}" to install.`;
 	vscode.window.showInformationMessage(msg, ...installOptions).then((selected) => {
 		switch (selected) {
 			case 'Install':
@@ -320,7 +374,9 @@
 	// If GOPATH is still not set, then use the one from `go env`
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		vscode.window.showErrorMessage(`Failed to run "go env" to find GOPATH as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		vscode.window.showErrorMessage(
+			`Failed to run "go env" to find GOPATH as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	const goRuntimeBasePath = path.dirname(goRuntimePath);
@@ -332,10 +388,11 @@
 	} else if (process.platform === 'win32' && process.env.hasOwnProperty('Path')) {
 		pathEnvVar = 'Path';
 	}
-	if (goRuntimeBasePath
-		&& pathEnvVar
-		&& process.env[pathEnvVar]
-		&& (<string>process.env[pathEnvVar]).split(path.delimiter).indexOf(goRuntimeBasePath) === -1
+	if (
+		goRuntimeBasePath &&
+		pathEnvVar &&
+		process.env[pathEnvVar] &&
+		(<string>process.env[pathEnvVar]).split(path.delimiter).indexOf(goRuntimeBasePath) === -1
 	) {
 		process.env[pathEnvVar] += path.delimiter + goRuntimeBasePath;
 	}
@@ -380,26 +437,27 @@
 
 	const usingSourceGraph = getToolFromToolPath(getLanguageServerToolPath()) === 'go-langserver';
 	if (usingSourceGraph && goVersion.gt('1.10')) {
-		const promptMsg = 'The language server from Sourcegraph is no longer under active development and it does not support Go modules as well. Please install and use the language server from Google or disable the use of language servers altogether.';
+		const promptMsg =
+			'The language server from Sourcegraph is no longer under active development and it does not support Go modules as well. Please install and use the language server from Google or disable the use of language servers altogether.';
 		const disableLabel = 'Disable language server';
 		const installLabel = 'Install';
-		vscode.window.showInformationMessage(promptMsg, installLabel, disableLabel)
-			.then((selected) => {
-				if (selected === installLabel) {
-					installTools([getTool('gopls')], goVersion)
-						.then(() => {
-							vscode.window.showInformationMessage('Reload VS Code window to enable the use of Go language server');
-						});
-				} else if (selected === disableLabel) {
-					const goConfig = getGoConfig();
-					const inspectLanguageServerSetting = goConfig.inspect('useLanguageServer');
-					if (inspectLanguageServerSetting.globalValue === true) {
-						goConfig.update('useLanguageServer', false, vscode.ConfigurationTarget.Global);
-					} else if (inspectLanguageServerSetting.workspaceFolderValue === true) {
-						goConfig.update('useLanguageServer', false, vscode.ConfigurationTarget.WorkspaceFolder);
-					}
+		vscode.window.showInformationMessage(promptMsg, installLabel, disableLabel).then((selected) => {
+			if (selected === installLabel) {
+				installTools([getTool('gopls')], goVersion).then(() => {
+					vscode.window.showInformationMessage(
+						'Reload VS Code window to enable the use of Go language server'
+					);
+				});
+			} else if (selected === disableLabel) {
+				const goConfig = getGoConfig();
+				const inspectLanguageServerSetting = goConfig.inspect('useLanguageServer');
+				if (inspectLanguageServerSetting.globalValue === true) {
+					goConfig.update('useLanguageServer', false, vscode.ConfigurationTarget.Global);
+				} else if (inspectLanguageServerSetting.workspaceFolderValue === true) {
+					goConfig.update('useLanguageServer', false, vscode.ConfigurationTarget.WorkspaceFolder);
 				}
-			});
+			}
+		});
 	}
 
 	function promptForInstall(missing: Tool[], goVersion: GoVersion) {
@@ -418,24 +476,35 @@
 				missing.forEach((x) => outputChannel.appendLine(x.name));
 			}
 		};
-		vscode.window.showInformationMessage('Failed to find some of the Go analysis tools. Would you like to install them?', installItem, showItem).then((selection) => {
-			if (selection) {
-				selection.command();
-			} else {
-				hideGoStatus();
-			}
-		});
+		vscode.window
+			.showInformationMessage(
+				'Failed to find some of the Go analysis tools. Would you like to install them?',
+				installItem,
+				showItem
+			)
+			.then((selection) => {
+				if (selection) {
+					selection.command();
+				} else {
+					hideGoStatus();
+				}
+			});
 	}
 }
 
 function getMissingTools(goVersion: GoVersion): Promise<Tool[]> {
 	const keys = getConfiguredTools(goVersion);
-	return Promise.all<Tool>(keys.map((tool) => new Promise<Tool>((resolve, reject) => {
-		const toolPath = getBinPath(tool.name);
-		fs.exists(toolPath, (exists) => {
-			resolve(exists ? null : tool);
-		});
-	}))).then((res) => {
+	return Promise.all<Tool>(
+		keys.map(
+			(tool) =>
+				new Promise<Tool>((resolve, reject) => {
+					const toolPath = getBinPath(tool.name);
+					fs.exists(toolPath, (exists) => {
+						resolve(exists ? null : tool);
+					});
+				})
+		)
+	).then((res) => {
 		return res.filter((x) => x != null);
 	});
 }
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index 0c0b3f0..d55ca17 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -11,7 +11,23 @@
 import semver = require('semver');
 import util = require('util');
 import vscode = require('vscode');
-import { FormattingOptions, HandleDiagnosticsSignature, LanguageClient, ProvideCompletionItemsSignature, ProvideDefinitionSignature, ProvideDocumentFormattingEditsSignature, ProvideDocumentHighlightsSignature, ProvideDocumentLinksSignature, ProvideDocumentSymbolsSignature, ProvideHoverSignature, ProvideReferencesSignature, ProvideRenameEditsSignature, ProvideSignatureHelpSignature, ProvideWorkspaceSymbolsSignature, RevealOutputChannelOn } from 'vscode-languageclient';
+import {
+	FormattingOptions,
+	HandleDiagnosticsSignature,
+	LanguageClient,
+	ProvideCompletionItemsSignature,
+	ProvideDefinitionSignature,
+	ProvideDocumentFormattingEditsSignature,
+	ProvideDocumentHighlightsSignature,
+	ProvideDocumentLinksSignature,
+	ProvideDocumentSymbolsSignature,
+	ProvideHoverSignature,
+	ProvideReferencesSignature,
+	ProvideRenameEditsSignature,
+	ProvideSignatureHelpSignature,
+	ProvideWorkspaceSymbolsSignature,
+	RevealOutputChannelOn
+} from 'vscode-languageclient';
 import { ProvideImplementationSignature } from 'vscode-languageclient/lib/implementation';
 import { ProvideTypeDefinitionSignature } from 'vscode-languageclient/lib/typeDefinition';
 import WebRequest = require('web-request');
@@ -76,31 +92,45 @@
 		{
 			command: path,
 			args: ['-mode=stdio', ...config.flags],
-			options: { env },
+			options: { env }
 		},
 		{
 			initializationOptions: {},
 			documentSelector: ['go', 'go.mod', 'go.sum'],
 			uriConverters: {
 				// Apply file:/// scheme to all file paths.
-				code2Protocol: (uri: vscode.Uri): string => (uri.scheme ? uri : uri.with({ scheme: 'file' })).toString(),
-				protocol2Code: (uri: string) => vscode.Uri.parse(uri),
+				code2Protocol: (uri: vscode.Uri): string =>
+					(uri.scheme ? uri : uri.with({ scheme: 'file' })).toString(),
+				protocol2Code: (uri: string) => vscode.Uri.parse(uri)
 			},
 			revealOutputChannelOn: RevealOutputChannelOn.Never,
 			middleware: {
-				provideDocumentFormattingEdits: (document: vscode.TextDocument, options: FormattingOptions, token: vscode.CancellationToken, next: ProvideDocumentFormattingEditsSignature) => {
+				provideDocumentFormattingEdits: (
+					document: vscode.TextDocument,
+					options: FormattingOptions,
+					token: vscode.CancellationToken,
+					next: ProvideDocumentFormattingEditsSignature
+				) => {
 					if (!config.features.format) {
 						return [];
 					}
 					return next(document, options, token);
 				},
-				handleDiagnostics: (uri: vscode.Uri, diagnostics: vscode.Diagnostic[], next: HandleDiagnosticsSignature) => {
+				handleDiagnostics: (
+					uri: vscode.Uri,
+					diagnostics: vscode.Diagnostic[],
+					next: HandleDiagnosticsSignature
+				) => {
 					if (!config.features.diagnostics) {
 						return null;
 					}
 					return next(uri, diagnostics);
 				},
-				provideDocumentLinks: (document: vscode.TextDocument, token: vscode.CancellationToken, next: ProvideDocumentLinksSignature) => {
+				provideDocumentLinks: (
+					document: vscode.TextDocument,
+					token: vscode.CancellationToken,
+					next: ProvideDocumentLinksSignature
+				) => {
 					if (!config.features.documentLink) {
 						return null;
 					}
@@ -113,7 +143,9 @@
 	c.onReady().then(() => {
 		const capabilities = c.initializeResult && c.initializeResult.capabilities;
 		if (!capabilities) {
-			return vscode.window.showErrorMessage('The language server is not able to serve any features at the moment.');
+			return vscode.window.showErrorMessage(
+				'The language server is not able to serve any features at the moment.'
+			);
 		}
 
 		// Fallback to default providers for unsupported or disabled features.
@@ -121,10 +153,12 @@
 		if (!capabilities.completionProvider) {
 			const provider = new GoCompletionItemProvider(ctx.globalState);
 			ctx.subscriptions.push(provider);
-			ctx.subscriptions.push(vscode.languages.registerCompletionItemProvider(GO_MODE, provider, '.', '\"'));
+			ctx.subscriptions.push(vscode.languages.registerCompletionItemProvider(GO_MODE, provider, '.', '"'));
 		}
 		if (!config.features.format || !capabilities.documentFormattingProvider) {
-			ctx.subscriptions.push(vscode.languages.registerDocumentFormattingEditProvider(GO_MODE, new GoDocumentFormattingEditProvider()));
+			ctx.subscriptions.push(
+				vscode.languages.registerDocumentFormattingEditProvider(GO_MODE, new GoDocumentFormattingEditProvider())
+			);
 		}
 
 		if (!capabilities.renameProvider) {
@@ -132,7 +166,9 @@
 		}
 
 		if (!capabilities.typeDefinitionProvider) {
-			ctx.subscriptions.push(vscode.languages.registerTypeDefinitionProvider(GO_MODE, new GoTypeDefinitionProvider()));
+			ctx.subscriptions.push(
+				vscode.languages.registerTypeDefinitionProvider(GO_MODE, new GoTypeDefinitionProvider())
+			);
 		}
 
 		if (!capabilities.hoverProvider) {
@@ -148,11 +184,15 @@
 		}
 
 		if (!capabilities.documentSymbolProvider) {
-			ctx.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(GO_MODE, new GoDocumentSymbolProvider()));
+			ctx.subscriptions.push(
+				vscode.languages.registerDocumentSymbolProvider(GO_MODE, new GoDocumentSymbolProvider())
+			);
 		}
 
 		if (!capabilities.signatureHelpProvider) {
-			ctx.subscriptions.push(vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ','));
+			ctx.subscriptions.push(
+				vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ',')
+			);
 		}
 
 		if (!capabilities.workspaceSymbolProvider) {
@@ -160,22 +200,26 @@
 		}
 
 		if (!capabilities.implementationProvider) {
-			ctx.subscriptions.push(vscode.languages.registerImplementationProvider(GO_MODE, new GoImplementationProvider()));
+			ctx.subscriptions.push(
+				vscode.languages.registerImplementationProvider(GO_MODE, new GoImplementationProvider())
+			);
 		}
 	});
 
 	let languageServerDisposable = c.start();
 	ctx.subscriptions.push(languageServerDisposable);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.languageserver.restart', async () => {
-		if (c.diagnostics) {
-			c.diagnostics.clear();
-		}
-		await c.stop();
-		languageServerDisposable.dispose();
-		languageServerDisposable = c.start();
-		ctx.subscriptions.push(languageServerDisposable);
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.languageserver.restart', async () => {
+			if (c.diagnostics) {
+				c.diagnostics.clear();
+			}
+			await c.stop();
+			languageServerDisposable.dispose();
+			languageServerDisposable = c.start();
+			ctx.subscriptions.push(languageServerDisposable);
+		})
+	);
 
 	// gopls is the only language server that provides live diagnostics on type,
 	// so use gotype if it's not enabled.
@@ -201,7 +245,10 @@
 		}
 	}
 
-	if (e.affectsConfiguration('go.languageServerFlags') || e.affectsConfiguration('go.languageServerExperimentalFeatures')) {
+	if (
+		e.affectsConfiguration('go.languageServerFlags') ||
+		e.affectsConfiguration('go.languageServerExperimentalFeatures')
+	) {
 		reloadMessage = 'Reload VS Code window for the changes in language server settings to take effect';
 	}
 
@@ -228,7 +275,7 @@
 			diagnostics: goConfig['languageServerExperimentalFeatures']['diagnostics'],
 			format: goConfig['languageServerExperimentalFeatures']['format'],
 			documentLink: goConfig['languageServerExperimentalFeatures']['documentLink'],
-			highlight: goConfig['languageServerExperimentalFeatures']['highlight'],
+			highlight: goConfig['languageServerExperimentalFeatures']['highlight']
 		},
 		checkForUpdates: goConfig['useGoProxyToCheckForToolUpdates']
 	};
@@ -250,7 +297,9 @@
 
 	// Check that all workspace folders are configured with the same GOPATH.
 	if (!allFoldersHaveSameGopath()) {
-		vscode.window.showInformationMessage('The Go language server is currently not supported in a multi-root set-up with different GOPATHs.');
+		vscode.window.showInformationMessage(
+			'The Go language server is currently not supported in a multi-root set-up with different GOPATHs.'
+		);
 		return;
 	}
 
@@ -279,13 +328,14 @@
 	}
 	// Only gopls and go-langserver are supported.
 	if (languageServerOfChoice !== 'gopls' && languageServerOfChoice !== 'go-langserver') {
-		vscode.window.showErrorMessage(`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window`);
+		vscode.window.showErrorMessage(
+			`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window`
+		);
 		return;
 	}
 	// Otherwise, prompt the user to install the language server.
 	promptForMissingTool(languageServerOfChoice);
 	vscode.window.showInformationMessage('Reload VS Code window after installing the Go language server.');
-
 }
 
 function allFoldersHaveSameGopath(): boolean {
@@ -300,15 +350,19 @@
 function registerUsualProviders(ctx: vscode.ExtensionContext) {
 	const provider = new GoCompletionItemProvider(ctx.globalState);
 	ctx.subscriptions.push(provider);
-	ctx.subscriptions.push(vscode.languages.registerCompletionItemProvider(GO_MODE, provider, '.', '\"'));
+	ctx.subscriptions.push(vscode.languages.registerCompletionItemProvider(GO_MODE, provider, '.', '"'));
 	ctx.subscriptions.push(vscode.languages.registerHoverProvider(GO_MODE, new GoHoverProvider()));
 	ctx.subscriptions.push(vscode.languages.registerDefinitionProvider(GO_MODE, new GoDefinitionProvider()));
 	ctx.subscriptions.push(vscode.languages.registerReferenceProvider(GO_MODE, new GoReferenceProvider()));
 	ctx.subscriptions.push(vscode.languages.registerDocumentSymbolProvider(GO_MODE, new GoDocumentSymbolProvider()));
 	ctx.subscriptions.push(vscode.languages.registerWorkspaceSymbolProvider(new GoWorkspaceSymbolProvider()));
-	ctx.subscriptions.push(vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ','));
+	ctx.subscriptions.push(
+		vscode.languages.registerSignatureHelpProvider(GO_MODE, new GoSignatureHelpProvider(), '(', ',')
+	);
 	ctx.subscriptions.push(vscode.languages.registerImplementationProvider(GO_MODE, new GoImplementationProvider()));
-	ctx.subscriptions.push(vscode.languages.registerDocumentFormattingEditProvider(GO_MODE, new GoDocumentFormattingEditProvider()));
+	ctx.subscriptions.push(
+		vscode.languages.registerDocumentFormattingEditProvider(GO_MODE, new GoDocumentFormattingEditProvider())
+	);
 	ctx.subscriptions.push(vscode.languages.registerTypeDefinitionProvider(GO_MODE, new GoTypeDefinitionProvider()));
 	ctx.subscriptions.push(vscode.languages.registerRenameProvider(GO_MODE, new GoRenameProvider()));
 	vscode.workspace.onDidChangeTextDocument(parseLiveFile, null, ctx.subscriptions);
@@ -424,7 +478,7 @@
 	for (const version of data.trim().split('\n')) {
 		const parsed = semver.parse(version, {
 			includePrerelease: true,
-			loose: true,
+			loose: true
 		});
 		versions.push(parsed);
 	}
@@ -505,7 +559,7 @@
 		let data: string;
 		try {
 			data = await WebRequest.json<string>(url, {
-				throwResponseError: true,
+				throwResponseError: true
 			});
 		} catch (e) {
 			return null;
diff --git a/src/goLint.ts b/src/goLint.ts
index ca17cdb..d014566 100644
--- a/src/goLint.ts
+++ b/src/goLint.ts
@@ -7,7 +7,16 @@
 import vscode = require('vscode');
 import { lintDiagnosticCollection } from './goMain';
 import { diagnosticsStatusBarItem, outputChannel } from './goStatus';
-import { getGoConfig, getToolsEnvVars, getToolsGopath, getWorkspaceFolderPath, handleDiagnosticErrors, ICheckResult, resolvePath, runTool } from './util';
+import {
+	getGoConfig,
+	getToolsEnvVars,
+	getToolsGopath,
+	getWorkspaceFolderPath,
+	handleDiagnosticErrors,
+	ICheckResult,
+	resolvePath,
+	runTool
+} from './util';
 /**
  * Runs linter on the current file, package or workspace.
  */
@@ -18,7 +27,9 @@
 		return;
 	}
 	if (editor.document.languageId !== 'go' && scope !== 'workspace') {
-		vscode.window.showInformationMessage('File in the active editor is not a Go file, cannot find current package to lint');
+		vscode.window.showInformationMessage(
+			'File in the active editor is not a Go file, cannot find current package to lint'
+		);
 		return;
 	}
 
@@ -47,7 +58,11 @@
  * @param goConfig Configuration for the Go extension.
  * @param scope Scope in which to run the linter.
  */
-export function goLint(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfiguration, scope?: string): Promise<ICheckResult[]> {
+export function goLint(
+	fileUri: vscode.Uri,
+	goConfig: vscode.WorkspaceConfiguration,
+	scope?: string
+): Promise<ICheckResult[]> {
 	epoch++;
 	const closureEpoch = epoch;
 	if (tokenSource) {
@@ -60,7 +75,7 @@
 
 	const currentWorkspace = getWorkspaceFolderPath(fileUri);
 
-	const cwd = (scope === 'workspace' && currentWorkspace) ? currentWorkspace : path.dirname(fileUri.fsPath);
+	const cwd = scope === 'workspace' && currentWorkspace ? currentWorkspace : path.dirname(fileUri.fsPath);
 
 	if (!path.isAbsolute(cwd)) {
 		return Promise.resolve([]);
@@ -118,21 +133,14 @@
 	}
 
 	running = true;
-	const lintPromise = runTool(
-		args,
-		cwd,
-		'warning',
-		false,
-		lintTool,
-		lintEnv,
-		false,
-		tokenSource.token
-	).then((result) => {
-		if (closureEpoch === epoch) {
-			running = false;
+	const lintPromise = runTool(args, cwd, 'warning', false, lintTool, lintEnv, false, tokenSource.token).then(
+		(result) => {
+			if (closureEpoch === epoch) {
+				running = false;
+			}
+			return result;
 		}
-		return result;
-	});
+	);
 
 	return lintPromise;
 }
diff --git a/src/goLiveErrors.ts b/src/goLiveErrors.ts
index c1401e1..4363228 100644
--- a/src/goLiveErrors.ts
+++ b/src/goLiveErrors.ts
@@ -22,15 +22,19 @@
 let runner: NodeJS.Timer;
 
 export function goLiveErrorsEnabled() {
-	const goConfig = <GoLiveErrorsConfig>(getGoConfig()['liveErrors']);
+	const goConfig = <GoLiveErrorsConfig>getGoConfig()['liveErrors'];
 	if (goConfig === null || goConfig === undefined || !goConfig.enabled) {
 		return false;
 	}
 	const files = vscode.workspace.getConfiguration('files', null);
 	const autoSave = files['autoSave'];
 	const autoSaveDelay = files['autoSaveDelay'];
-	if (autoSave !== null && autoSave !== undefined &&
-		autoSave === 'afterDelay' && autoSaveDelay < goConfig.delay * 1.5) {
+	if (
+		autoSave !== null &&
+		autoSave !== undefined &&
+		autoSave === 'afterDelay' &&
+		autoSaveDelay < goConfig.delay * 1.5
+	) {
 		return false;
 	}
 	return goConfig.enabled;
diff --git a/src/goMain.ts b/src/goMain.ts
index cfadb93..3377c39 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -10,7 +10,13 @@
 import { buildCode } from './goBuild';
 import { check, notifyIfGeneratedFile, removeTestStatus } from './goCheck';
 import { GoCodeActionProvider } from './goCodeAction';
-import { applyCodeCoverage, initCoverageDecorators, removeCodeCoverageOnFileChange, toggleCoverageCurrentPackage, updateCodeCoverageDecorators } from './goCover';
+import {
+	applyCodeCoverage,
+	initCoverageDecorators,
+	removeCodeCoverageOnFileChange,
+	toggleCoverageCurrentPackage,
+	updateCodeCoverageDecorators
+} from './goCover';
 import { GoDebugConfigurationProvider } from './goDebugConfiguration';
 import { extractFunction, extractVariable } from './goDoctor';
 import { runFillStruct } from './goFillStruct';
@@ -19,7 +25,13 @@
 import { implCursor } from './goImpl';
 import { addImport, addImportToWorkspace } from './goImport';
 import { installCurrentPackage } from './goInstall';
-import { installAllTools, installTools, offerToInstallTools, promptForMissingTool, updateGoPathGoRootFromConfig } from './goInstallTools';
+import {
+	installAllTools,
+	installTools,
+	offerToInstallTools,
+	promptForMissingTool,
+	updateGoPathGoRootFromConfig
+} from './goInstallTools';
 import { registerLanguageFeatures } from './goLanguageServer';
 import { lintCode } from './goLint';
 import { GO_MODE } from './goMode';
@@ -35,7 +47,19 @@
 import { getFromGlobalState, setGlobalState, updateGlobalState } from './stateUtils';
 import { disposeTelemetryReporter, sendTelemetryEventForConfig } from './telemetry';
 import { cancelRunningTests, showTestOutput } from './testUtils';
-import { cleanupTempDir, getBinPath, getCurrentGoPath, getExtensionCommands, getGoConfig, getGoVersion, getToolsEnvVars, getToolsGopath, getWorkspaceFolderPath, handleDiagnosticErrors, isGoPathSet } from './util';
+import {
+	cleanupTempDir,
+	getBinPath,
+	getCurrentGoPath,
+	getExtensionCommands,
+	getGoConfig,
+	getGoVersion,
+	getToolsEnvVars,
+	getToolsGopath,
+	getWorkspaceFolderPath,
+	handleDiagnosticErrors,
+	isGoPathSet
+} from './util';
 
 export let buildDiagnosticCollection: vscode.DiagnosticCollection;
 export let lintDiagnosticCollection: vscode.DiagnosticCollection;
@@ -50,7 +74,7 @@
 			goroot: string;
 			version: string;
 		}
-		const toolsGoInfo: { [id: string]: GoInfo; } = ctx.globalState.get('toolsGoInfo') || {};
+		const toolsGoInfo: { [id: string]: GoInfo } = ctx.globalState.get('toolsGoInfo') || {};
 		const toolsGopath = getToolsGopath() || getCurrentGoPath();
 		if (!toolsGoInfo[toolsGopath]) {
 			toolsGoInfo[toolsGopath] = { goroot: null, version: null };
@@ -58,11 +82,16 @@
 		const prevGoroot = toolsGoInfo[toolsGopath].goroot;
 		const currentGoroot: string = process.env['GOROOT'] && process.env['GOROOT'].toLowerCase();
 		if (prevGoroot && prevGoroot.toLowerCase() !== currentGoroot) {
-			vscode.window.showInformationMessage(`Your current goroot (${currentGoroot}) is different than before (${prevGoroot}), a few Go tools may need recompiling`, updateToolsCmdText).then((selected) => {
-				if (selected === updateToolsCmdText) {
-					installAllTools(true);
-				}
-			});
+			vscode.window
+				.showInformationMessage(
+					`Your current goroot (${currentGoroot}) is different than before (${prevGoroot}), a few Go tools may need recompiling`,
+					updateToolsCmdText
+				)
+				.then((selected) => {
+					if (selected === updateToolsCmdText) {
+						installAllTools(true);
+					}
+				});
 		} else {
 			const currentVersion = await getGoVersion();
 			if (currentVersion) {
@@ -71,11 +100,16 @@
 
 				if (prevVersion !== currVersionString) {
 					if (prevVersion) {
-						vscode.window.showInformationMessage('Your Go version is different than before, few Go tools may need re-compiling', updateToolsCmdText).then((selected) => {
-							if (selected === updateToolsCmdText) {
-								installAllTools(true);
-							}
-						});
+						vscode.window
+							.showInformationMessage(
+								'Your Go version is different than before, few Go tools may need re-compiling',
+								updateToolsCmdText
+							)
+							.then((selected) => {
+								if (selected === updateToolsCmdText) {
+									installAllTools(true);
+								}
+							});
 					}
 					toolsGoInfo[toolsGopath].version = currVersionString;
 				}
@@ -90,20 +124,28 @@
 		// It also registers the necessary language feature providers that the language server may not support.
 		await registerLanguageFeatures(ctx);
 
-		if (vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.languageId === 'go' && isGoPathSet()) {
+		if (
+			vscode.window.activeTextEditor &&
+			vscode.window.activeTextEditor.document.languageId === 'go' &&
+			isGoPathSet()
+		) {
 			// Check mod status so that cache is updated and then run build/lint/vet
 			isModSupported(vscode.window.activeTextEditor.document.uri).then(() => {
 				runBuilds(vscode.window.activeTextEditor.document, getGoConfig());
 			});
 		}
-
 	});
 
 	initCoverageDecorators(ctx);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.open.modulewiki', async () => {
-		vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://github.com/microsoft/vscode-go/wiki/Go-modules-support-in-Visual-Studio-Code'));
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.open.modulewiki', async () => {
+			vscode.commands.executeCommand(
+				'vscode.open',
+				vscode.Uri.parse('https://github.com/microsoft/vscode-go/wiki/Go-modules-support-in-Visual-Studio-Code')
+			);
+		})
+	);
 	showHideStatus(vscode.window.activeTextEditor);
 
 	const testCodeLensProvider = new GoRunTestCodeLensProvider();
@@ -125,218 +167,281 @@
 	addOnChangeActiveTextEditorListeners(ctx);
 	addOnSaveTextDocumentListeners(ctx);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.gopath', () => {
-		const gopath = getCurrentGoPath();
-		let msg = `${gopath} is the current GOPATH.`;
-		const wasInfered = getGoConfig()['inferGopath'];
-		const root = getWorkspaceFolderPath(vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri);
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.gopath', () => {
+			const gopath = getCurrentGoPath();
+			let msg = `${gopath} is the current GOPATH.`;
+			const wasInfered = getGoConfig()['inferGopath'];
+			const root = getWorkspaceFolderPath(
+				vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri
+			);
 
-		// not only if it was configured, but if it was successful.
-		if (wasInfered && root && root.indexOf(gopath) === 0) {
-			const inferredFrom = vscode.window.activeTextEditor ? 'current folder' : 'workspace root';
-			msg += ` It is inferred from ${inferredFrom}`;
-		}
-
-		vscode.window.showInformationMessage(msg);
-		return gopath;
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.add.tags', (args) => {
-		addTags(args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.remove.tags', (args) => {
-		removeTags(args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.fill.struct', () => {
-		runFillStruct(vscode.window.activeTextEditor);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.impl.cursor', () => {
-		implCursor();
-	}));
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.godoctor.extract', () => {
-		extractFunction();
-	}));
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.godoctor.var', () => {
-		extractVariable();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.cursor', (args) => {
-		const goConfig = getGoConfig();
-		testAtCursor(goConfig, 'test', args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.debug.cursor', (args) => {
-		const goConfig = getGoConfig();
-		testAtCursor(goConfig, 'debug', args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.benchmark.cursor', (args) => {
-		const goConfig = getGoConfig();
-		testAtCursor(goConfig, 'benchmark', args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.package', (args) => {
-		const goConfig = getGoConfig();
-		const isBenchmark = false;
-		testCurrentPackage(goConfig, isBenchmark, args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.benchmark.package', (args) => {
-		const goConfig = getGoConfig();
-		const isBenchmark = true;
-		testCurrentPackage(goConfig, isBenchmark, args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.file', (args) => {
-		const goConfig = getGoConfig();
-		const isBenchmark = false;
-		testCurrentFile(goConfig, isBenchmark, args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.benchmark.file', (args) => {
-		const goConfig = getGoConfig();
-		const isBenchmark = true;
-		testCurrentFile(goConfig, isBenchmark, args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.workspace', (args) => {
-		const goConfig = getGoConfig();
-		testWorkspace(goConfig, args);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.previous', () => {
-		testPrevious();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.coverage', () => {
-		toggleCoverageCurrentPackage();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.showOutput', () => {
-		showTestOutput();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.cancel', () => {
-		cancelRunningTests();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.import.add', (arg) => {
-		return addImport(arg);
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.add.package.workspace', () => {
-		addImportToWorkspace();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.tools.install', async (args) => {
-		if (Array.isArray(args) && args.length) {
-			const goVersion = await getGoVersion();
-			installTools(args, goVersion);
-			return;
-		}
-		installAllTools();
-	}));
-
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.browse.packages', () => {
-		browsePackages();
-	}));
-
-	ctx.subscriptions.push(vscode.workspace.onDidChangeConfiguration((e: vscode.ConfigurationChangeEvent) => {
-		if (!e.affectsConfiguration('go')) {
-			return;
-		}
-		const updatedGoConfig = getGoConfig();
-		sendTelemetryEventForConfig(updatedGoConfig);
-		updateGoPathGoRootFromConfig();
-
-		// If there was a change in "toolsGopath" setting, then clear cache for go tools
-		if (getToolsGopath() !== getToolsGopath(false)) {
-			clearCacheForTools();
-		}
-
-		if (updatedGoConfig['enableCodeLens']) {
-			testCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['runtest']);
-			referencesCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['references']);
-		}
-
-		if (e.affectsConfiguration('go.formatTool')) {
-			checkToolExists(updatedGoConfig['formatTool']);
-		}
-		if (e.affectsConfiguration('go.lintTool')) {
-			checkToolExists(updatedGoConfig['lintTool']);
-		}
-		if (e.affectsConfiguration('go.docsTool')) {
-			checkToolExists(updatedGoConfig['docsTool']);
-		}
-		if (e.affectsConfiguration('go.coverageDecorator')) {
-			updateCodeCoverageDecorators(updatedGoConfig['coverageDecorator']);
-		}
-		if (e.affectsConfiguration('go.toolsEnvVars')) {
-			const env = getToolsEnvVars();
-			if (GO111MODULE !== env['GO111MODULE']) {
-				const reloadMsg = 'Reload VS Code window so that the Go tools can respect the change to GO111MODULE';
-				vscode.window.showInformationMessage(reloadMsg, 'Reload').then((selected) => {
-					if (selected === 'Reload') {
-						vscode.commands.executeCommand('workbench.action.reloadWindow');
-					}
-				});
+			// not only if it was configured, but if it was successful.
+			if (wasInfered && root && root.indexOf(gopath) === 0) {
+				const inferredFrom = vscode.window.activeTextEditor ? 'current folder' : 'workspace root';
+				msg += ` It is inferred from ${inferredFrom}`;
 			}
-		}
-	}));
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.generate.package', () => {
-		goGenerateTests.generateTestCurrentPackage();
-	}));
+			vscode.window.showInformationMessage(msg);
+			return gopath;
+		})
+	);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.generate.file', () => {
-		goGenerateTests.generateTestCurrentFile();
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.add.tags', (args) => {
+			addTags(args);
+		})
+	);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.test.generate.function', () => {
-		goGenerateTests.generateTestCurrentFunction();
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.remove.tags', (args) => {
+			removeTags(args);
+		})
+	);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.toggle.test.file', () => {
-		goGenerateTests.toggleTestFile();
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.fill.struct', () => {
+			runFillStruct(vscode.window.activeTextEditor);
+		})
+	);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.debug.startSession', (config) => {
-		let workspaceFolder;
-		if (vscode.window.activeTextEditor) {
-			workspaceFolder = vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri);
-		}
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.impl.cursor', () => {
+			implCursor();
+		})
+	);
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.godoctor.extract', () => {
+			extractFunction();
+		})
+	);
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.godoctor.var', () => {
+			extractVariable();
+		})
+	);
 
-		return vscode.debug.startDebugging(workspaceFolder, config);
-	}));
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.cursor', (args) => {
+			const goConfig = getGoConfig();
+			testAtCursor(goConfig, 'test', args);
+		})
+	);
 
-	ctx.subscriptions.push(vscode.commands.registerCommand('go.show.commands', () => {
-		const extCommands = getExtensionCommands();
-		extCommands.push({
-			command: 'editor.action.goToDeclaration',
-			title: 'Go to Definition'
-		});
-		extCommands.push({
-			command: 'editor.action.goToImplementation',
-			title: 'Go to Implementation'
-		});
-		extCommands.push({
-			command: 'workbench.action.gotoSymbol',
-			title: 'Go to Symbol in File...'
-		});
-		extCommands.push({
-			command: 'workbench.action.showAllSymbols',
-			title: 'Go to Symbol in Workspace...'
-		});
-		vscode.window.showQuickPick(extCommands.map((x) => x.title)).then((cmd) => {
-			const selectedCmd = extCommands.find((x) => x.title === cmd);
-			if (selectedCmd) {
-				vscode.commands.executeCommand(selectedCmd.command);
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.debug.cursor', (args) => {
+			const goConfig = getGoConfig();
+			testAtCursor(goConfig, 'debug', args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.benchmark.cursor', (args) => {
+			const goConfig = getGoConfig();
+			testAtCursor(goConfig, 'benchmark', args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.package', (args) => {
+			const goConfig = getGoConfig();
+			const isBenchmark = false;
+			testCurrentPackage(goConfig, isBenchmark, args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.benchmark.package', (args) => {
+			const goConfig = getGoConfig();
+			const isBenchmark = true;
+			testCurrentPackage(goConfig, isBenchmark, args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.file', (args) => {
+			const goConfig = getGoConfig();
+			const isBenchmark = false;
+			testCurrentFile(goConfig, isBenchmark, args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.benchmark.file', (args) => {
+			const goConfig = getGoConfig();
+			const isBenchmark = true;
+			testCurrentFile(goConfig, isBenchmark, args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.workspace', (args) => {
+			const goConfig = getGoConfig();
+			testWorkspace(goConfig, args);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.previous', () => {
+			testPrevious();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.coverage', () => {
+			toggleCoverageCurrentPackage();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.showOutput', () => {
+			showTestOutput();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.cancel', () => {
+			cancelRunningTests();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.import.add', (arg) => {
+			return addImport(arg);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.add.package.workspace', () => {
+			addImportToWorkspace();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.tools.install', async (args) => {
+			if (Array.isArray(args) && args.length) {
+				const goVersion = await getGoVersion();
+				installTools(args, goVersion);
+				return;
 			}
-		});
-	}));
+			installAllTools();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.browse.packages', () => {
+			browsePackages();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.workspace.onDidChangeConfiguration((e: vscode.ConfigurationChangeEvent) => {
+			if (!e.affectsConfiguration('go')) {
+				return;
+			}
+			const updatedGoConfig = getGoConfig();
+			sendTelemetryEventForConfig(updatedGoConfig);
+			updateGoPathGoRootFromConfig();
+
+			// If there was a change in "toolsGopath" setting, then clear cache for go tools
+			if (getToolsGopath() !== getToolsGopath(false)) {
+				clearCacheForTools();
+			}
+
+			if (updatedGoConfig['enableCodeLens']) {
+				testCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['runtest']);
+				referencesCodeLensProvider.setEnabled(updatedGoConfig['enableCodeLens']['references']);
+			}
+
+			if (e.affectsConfiguration('go.formatTool')) {
+				checkToolExists(updatedGoConfig['formatTool']);
+			}
+			if (e.affectsConfiguration('go.lintTool')) {
+				checkToolExists(updatedGoConfig['lintTool']);
+			}
+			if (e.affectsConfiguration('go.docsTool')) {
+				checkToolExists(updatedGoConfig['docsTool']);
+			}
+			if (e.affectsConfiguration('go.coverageDecorator')) {
+				updateCodeCoverageDecorators(updatedGoConfig['coverageDecorator']);
+			}
+			if (e.affectsConfiguration('go.toolsEnvVars')) {
+				const env = getToolsEnvVars();
+				if (GO111MODULE !== env['GO111MODULE']) {
+					const reloadMsg =
+						'Reload VS Code window so that the Go tools can respect the change to GO111MODULE';
+					vscode.window.showInformationMessage(reloadMsg, 'Reload').then((selected) => {
+						if (selected === 'Reload') {
+							vscode.commands.executeCommand('workbench.action.reloadWindow');
+						}
+					});
+				}
+			}
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.generate.package', () => {
+			goGenerateTests.generateTestCurrentPackage();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.generate.file', () => {
+			goGenerateTests.generateTestCurrentFile();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.test.generate.function', () => {
+			goGenerateTests.generateTestCurrentFunction();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.toggle.test.file', () => {
+			goGenerateTests.toggleTestFile();
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.debug.startSession', (config) => {
+			let workspaceFolder;
+			if (vscode.window.activeTextEditor) {
+				workspaceFolder = vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri);
+			}
+
+			return vscode.debug.startDebugging(workspaceFolder, config);
+		})
+	);
+
+	ctx.subscriptions.push(
+		vscode.commands.registerCommand('go.show.commands', () => {
+			const extCommands = getExtensionCommands();
+			extCommands.push({
+				command: 'editor.action.goToDeclaration',
+				title: 'Go to Definition'
+			});
+			extCommands.push({
+				command: 'editor.action.goToImplementation',
+				title: 'Go to Implementation'
+			});
+			extCommands.push({
+				command: 'workbench.action.gotoSymbol',
+				title: 'Go to Symbol in File...'
+			});
+			extCommands.push({
+				command: 'workbench.action.showAllSymbols',
+				title: 'Go to Symbol in Workspace...'
+			});
+			vscode.window.showQuickPick(extCommands.map((x) => x.title)).then((cmd) => {
+				const selectedCmd = extCommands.find((x) => x.title === cmd);
+				if (selectedCmd) {
+					vscode.commands.executeCommand(selectedCmd.command);
+				}
+			});
+		})
+	);
 
 	ctx.subscriptions.push(vscode.commands.registerCommand('go.get.package', goGetPackage));
 
@@ -359,7 +464,7 @@
 	ctx.subscriptions.push(vscode.commands.registerCommand('go.install.package', installCurrentPackage));
 
 	vscode.languages.setLanguageConfiguration(GO_MODE.language, {
-		wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
+		wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
 	});
 
 	sendTelemetryEventForConfig(getGoConfig());
@@ -389,27 +494,35 @@
 }
 
 function addOnSaveTextDocumentListeners(ctx: vscode.ExtensionContext) {
-	vscode.workspace.onDidSaveTextDocument((document) => {
-		if (document.languageId !== 'go') {
-			return;
-		}
-		if (vscode.debug.activeDebugSession) {
-			const neverAgain = { title: 'Don\'t Show Again' };
-			const ignoreActiveDebugWarningKey = 'ignoreActiveDebugWarningKey';
-			const ignoreActiveDebugWarning = getFromGlobalState(ignoreActiveDebugWarningKey);
-			if (!ignoreActiveDebugWarning) {
-				vscode.window.showWarningMessage('A debug session is currently active. Changes to your Go files may result in unexpected behaviour.', neverAgain).then((result) => {
-					if (result === neverAgain) {
-						updateGlobalState(ignoreActiveDebugWarningKey, true);
-					}
-				});
+	vscode.workspace.onDidSaveTextDocument(
+		(document) => {
+			if (document.languageId !== 'go') {
+				return;
 			}
-		}
-		if (vscode.window.visibleTextEditors.some((e) => e.document.fileName === document.fileName)) {
-			runBuilds(document, getGoConfig(document.uri));
-		}
-
-	}, null, ctx.subscriptions);
+			if (vscode.debug.activeDebugSession) {
+				const neverAgain = { title: `Don't Show Again` };
+				const ignoreActiveDebugWarningKey = 'ignoreActiveDebugWarningKey';
+				const ignoreActiveDebugWarning = getFromGlobalState(ignoreActiveDebugWarningKey);
+				if (!ignoreActiveDebugWarning) {
+					vscode.window
+						.showWarningMessage(
+							'A debug session is currently active. Changes to your Go files may result in unexpected behaviour.',
+							neverAgain
+						)
+						.then((result) => {
+							if (result === neverAgain) {
+								updateGlobalState(ignoreActiveDebugWarningKey, true);
+							}
+						});
+				}
+			}
+			if (vscode.window.visibleTextEditors.some((e) => e.document.fileName === document.fileName)) {
+				runBuilds(document, getGoConfig(document.uri));
+			}
+		},
+		null,
+		ctx.subscriptions
+	);
 }
 
 function addOnChangeTextDocumentListeners(ctx: vscode.ExtensionContext) {
diff --git a/src/goModifytags.ts b/src/goModifytags.ts
index 73e910e..c3ad33b 100644
--- a/src/goModifytags.ts
+++ b/src/goModifytags.ts
@@ -49,7 +49,6 @@
 		}
 		runGomodifytags(args);
 	});
-
 }
 
 export function removeTags(commandArgs: GoTagsConfig) {
@@ -86,7 +85,10 @@
 		return;
 	}
 	const args = ['-modified', '-file', editor.document.fileName, '-format', 'json'];
-	if (editor.selection.start.line === editor.selection.end.line && editor.selection.start.character === editor.selection.end.character) {
+	if (
+		editor.selection.start.line === editor.selection.end.line &&
+		editor.selection.start.character === editor.selection.end.character
+	) {
 		// Add tags to the whole struct
 		const offset = byteOffsetAt(editor.document, editor.selection.start);
 		args.push('-offset');
@@ -103,24 +105,32 @@
 function getTagsAndOptions(config: GoTagsConfig, commandArgs: GoTagsConfig): Thenable<string[]> {
 	const tags = commandArgs && commandArgs.hasOwnProperty('tags') ? commandArgs['tags'] : config['tags'];
 	const options = commandArgs && commandArgs.hasOwnProperty('options') ? commandArgs['options'] : config['options'];
-	const promptForTags = commandArgs && commandArgs.hasOwnProperty('promptForTags') ? commandArgs['promptForTags'] : config['promptForTags'];
-	const transformValue: string = commandArgs && commandArgs.hasOwnProperty('transform') ? commandArgs['transform'] : config['transform'];
+	const promptForTags =
+		commandArgs && commandArgs.hasOwnProperty('promptForTags')
+			? commandArgs['promptForTags']
+			: config['promptForTags'];
+	const transformValue: string =
+		commandArgs && commandArgs.hasOwnProperty('transform') ? commandArgs['transform'] : config['transform'];
 
 	if (!promptForTags) {
 		return Promise.resolve([tags, options, transformValue]);
 	}
 
-	return vscode.window.showInputBox({
-		value: tags,
-		prompt: 'Enter comma separated tag names'
-	}).then((inputTags) => {
-		return vscode.window.showInputBox({
-			value: options,
-			prompt: 'Enter comma separated options'
-		}).then((inputOptions) => {
-			return [inputTags, inputOptions, transformValue];
+	return vscode.window
+		.showInputBox({
+			value: tags,
+			prompt: 'Enter comma separated tag names'
+		})
+		.then((inputTags) => {
+			return vscode.window
+				.showInputBox({
+					value: options,
+					prompt: 'Enter comma separated options'
+				})
+				.then((inputOptions) => {
+					return [inputTags, inputOptions, transformValue];
+				});
 		});
-	});
 }
 
 function runGomodifytags(args: string[]) {
diff --git a/src/goModules.ts b/src/goModules.ts
index 8723c2a..55afeb5 100644
--- a/src/goModules.ts
+++ b/src/goModules.ts
@@ -18,7 +18,9 @@
 async function runGoModEnv(folderPath: string): Promise<string> {
 	const goExecutable = getBinPath('go');
 	if (!goExecutable) {
-		console.warn(`Failed to run "go env GOMOD" to find mod file as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		console.warn(
+			`Failed to run "go env GOMOD" to find mod file as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	const env = getToolsEnvVars();
@@ -39,7 +41,7 @@
 	return getModFolderPath(fileuri).then((modPath) => !!modPath);
 }
 
-export const packagePathToGoModPathMap: {[key: string]: string} = {};
+export const packagePathToGoModPathMap: { [key: string]: string } = {};
 
 export async function getModFolderPath(fileuri: vscode.Uri): Promise<string> {
 	const pkgPath = path.dirname(fileuri.fsPath);
@@ -67,10 +69,13 @@
 
 		if (goConfig['inferGopath'] === true) {
 			goConfig.update('inferGopath', false, vscode.ConfigurationTarget.WorkspaceFolder);
-			vscode.window.showInformationMessage('The "inferGopath" setting is disabled for this workspace because Go modules are being used.');
+			vscode.window.showInformationMessage(
+				'The "inferGopath" setting is disabled for this workspace because Go modules are being used.'
+			);
 		}
 		if (goConfig['useLanguageServer'] === false) {
-			const promptMsg = 'For better performance using Go modules, you can try the experimental Go language server, gopls.';
+			const promptMsg =
+				'For better performance using Go modules, you can try the experimental Go language server, gopls.';
 			const choseToUpdateLS = await promptToUpdateToolForModules('gopls', promptMsg, goConfig);
 			promptFormatTool = promptFormatTool && !choseToUpdateLS;
 		} else if (promptFormatTool) {
@@ -79,7 +84,8 @@
 		}
 
 		if (promptFormatTool) {
-			const promptMsgForFormatTool = '`goreturns` doesnt support auto-importing missing imports when using Go modules yet. Please update the "formatTool" setting to `goimports`.';
+			const promptMsgForFormatTool =
+				'`goreturns` doesnt support auto-importing missing imports when using Go modules yet. Please update the "formatTool" setting to `goimports`.';
 			await promptToUpdateToolForModules('switchFormatToolToGoimports', promptMsgForFormatTool, goConfig);
 		}
 	}
@@ -97,7 +103,11 @@
 }
 
 const promptedToolsForCurrentSession = new Set<string>();
-export async function promptToUpdateToolForModules(tool: string, promptMsg: string, goConfig?: vscode.WorkspaceConfiguration): Promise<boolean> {
+export async function promptToUpdateToolForModules(
+	tool: string,
+	promptMsg: string,
+	goConfig?: vscode.WorkspaceConfiguration
+): Promise<boolean> {
 	if (promptedToolsForCurrentSession.has(tool)) {
 		return false;
 	}
@@ -106,11 +116,7 @@
 		return false;
 	}
 	const goVersion = await getGoVersion();
-	const selected = await vscode.window.showInformationMessage(
-		promptMsg,
-		'Update',
-		'Later',
-		`Don't show again`);
+	const selected = await vscode.window.showInformationMessage(promptMsg, 'Update', 'Later', `Don't show again`);
 	let choseToUpdate = false;
 	switch (selected) {
 		case 'Update':
@@ -121,8 +127,7 @@
 			if (tool === 'switchFormatToolToGoimports') {
 				goConfig.update('formatTool', 'goimports', vscode.ConfigurationTarget.Global);
 			} else {
-			installTools([getTool(tool)], goVersion)
-				.then(() => {
+				installTools([getTool(tool)], goVersion).then(() => {
 					if (tool === 'gopls') {
 						if (goConfig.get('useLanguageServer') === false) {
 							goConfig.update('useLanguageServer', true, vscode.ConfigurationTarget.Global);
@@ -174,7 +179,9 @@
 
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		console.warn(`Failed to run "go list" to find current package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		console.warn(
+			`Failed to run "go list" to find current package as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	return new Promise<string>((resolve) => {
@@ -186,7 +193,11 @@
 
 		childProcess.on('close', () => {
 			// Ignore lines that are empty or those that have logs about updating the module cache
-			const pkgs = chunks.join('').toString().split('\n').filter((line) => line && line.indexOf(' ') === -1);
+			const pkgs = chunks
+				.join('')
+				.toString()
+				.split('\n')
+				.filter((line) => line && line.indexOf(' ') === -1);
 			if (pkgs.length !== 1) {
 				resolve();
 				return;
diff --git a/src/goOutline.ts b/src/goOutline.ts
index 3bcd46a..13aaafe 100644
--- a/src/goOutline.ts
+++ b/src/goOutline.ts
@@ -8,7 +8,14 @@
 import cp = require('child_process');
 import vscode = require('vscode');
 import { promptForMissingTool, promptForUpdatingTool } from './goInstallTools';
-import { getBinPath, getFileArchive, getGoConfig, getToolsEnvVars, killProcess, makeMemoizedByteOffsetConverter } from './util';
+import {
+	getBinPath,
+	getFileArchive,
+	getGoConfig,
+	getToolsEnvVars,
+	killProcess,
+	makeMemoizedByteOffsetConverter
+} from './util';
 
 // Keep in sync with https://github.com/ramya-rao-a/go-outline
 export interface GoOutlineRange {
@@ -50,18 +57,25 @@
 	 * Document to be parsed. If not provided, saved contents of the given fileName is used
 	 */
 	document?: vscode.TextDocument;
-
 }
 
-export async function documentSymbols(options: GoOutlineOptions, token: vscode.CancellationToken): Promise<vscode.DocumentSymbol[]> {
+export async function documentSymbols(
+	options: GoOutlineOptions,
+	token: vscode.CancellationToken
+): Promise<vscode.DocumentSymbol[]> {
 	const decls = await runGoOutline(options, token);
-	return convertToCodeSymbols(options.document,
+	return convertToCodeSymbols(
+		options.document,
 		decls,
 		options.importsOption !== GoOutlineImportsOptions.Exclude,
-		makeMemoizedByteOffsetConverter(Buffer.from(options.document.getText())));
+		makeMemoizedByteOffsetConverter(Buffer.from(options.document.getText()))
+	);
 }
 
-export function runGoOutline(options: GoOutlineOptions, token: vscode.CancellationToken): Promise<GoOutlineDeclaration[]> {
+export function runGoOutline(
+	options: GoOutlineOptions,
+	token: vscode.CancellationToken
+): Promise<GoOutlineDeclaration[]> {
 	return new Promise<GoOutlineDeclaration[]>((resolve, reject) => {
 		const gooutline = getBinPath('go-outline');
 		const gooutlineFlags = ['-f', options.fileName];
@@ -120,15 +134,15 @@
 	type: vscode.SymbolKind.TypeParameter,
 	function: vscode.SymbolKind.Function,
 	struct: vscode.SymbolKind.Struct,
-	interface: vscode.SymbolKind.Interface,
+	interface: vscode.SymbolKind.Interface
 };
 
 function convertToCodeSymbols(
 	document: vscode.TextDocument,
 	decls: GoOutlineDeclaration[],
 	includeImports: boolean,
-	byteOffsetToDocumentOffset: (byteOffset: number) => number): vscode.DocumentSymbol[] {
-
+	byteOffsetToDocumentOffset: (byteOffset: number) => number
+): vscode.DocumentSymbol[] {
 	const symbols: vscode.DocumentSymbol[] = [];
 	(decls || []).forEach((decl) => {
 		if (!includeImports && decl.type === 'import') {
@@ -138,25 +152,23 @@
 			return;
 		}
 
-		const label = decl.receiverType
-			? `(${decl.receiverType}).${decl.label}`
-			: decl.label;
+		const label = decl.receiverType ? `(${decl.receiverType}).${decl.label}` : decl.label;
 
 		const start = byteOffsetToDocumentOffset(decl.start - 1);
 		const end = byteOffsetToDocumentOffset(decl.end - 1);
 		const startPosition = document.positionAt(start);
 		const endPosition = document.positionAt(end);
 		const symbolRange = new vscode.Range(startPosition, endPosition);
-		const selectionRange = startPosition.line === endPosition.line ?
-			symbolRange :
-			new vscode.Range(startPosition, document.lineAt(startPosition.line).range.end);
+		const selectionRange =
+			startPosition.line === endPosition.line
+				? symbolRange
+				: new vscode.Range(startPosition, document.lineAt(startPosition.line).range.end);
 
 		if (decl.type === 'type') {
 			const line = document.lineAt(document.positionAt(start));
 			const regexStruct = new RegExp(`^\\s*type\\s+${decl.label}\\s+struct\\b`);
 			const regexInterface = new RegExp(`^\\s*type\\s+${decl.label}\\s+interface\\b`);
-			decl.type = regexStruct.test(line.text) ? 'struct' :
-						regexInterface.test(line.text) ? 'interface' : 'type';
+			decl.type = regexStruct.test(line.text) ? 'struct' : regexInterface.test(line.text) ? 'interface' : 'type';
 		}
 
 		const symbolInfo = new vscode.DocumentSymbol(
@@ -164,20 +176,29 @@
 			decl.type,
 			goKindToCodeKind[decl.type],
 			symbolRange,
-			selectionRange);
+			selectionRange
+		);
 
 		symbols.push(symbolInfo);
 		if (decl.children) {
-			symbolInfo.children = convertToCodeSymbols(document, decl.children, includeImports, byteOffsetToDocumentOffset);
+			symbolInfo.children = convertToCodeSymbols(
+				document,
+				decl.children,
+				includeImports,
+				byteOffsetToDocumentOffset
+			);
 		}
 	});
 	return symbols;
 }
 
 export class GoDocumentSymbolProvider implements vscode.DocumentSymbolProvider {
-	constructor(private includeImports?: boolean) { }
+	constructor(private includeImports?: boolean) {}
 
-	public provideDocumentSymbols(document: vscode.TextDocument, token: vscode.CancellationToken): Thenable<vscode.DocumentSymbol[]> {
+	public provideDocumentSymbols(
+		document: vscode.TextDocument,
+		token: vscode.CancellationToken
+	): Thenable<vscode.DocumentSymbol[]> {
 		if (typeof this.includeImports !== 'boolean') {
 			const gotoSymbolConfig = getGoConfig(document.uri)['gotoSymbol'];
 			this.includeImports = gotoSymbolConfig ? gotoSymbolConfig['includeImports'] : false;
diff --git a/src/goPackages.ts b/src/goPackages.ts
index 73799ed..be33cc1 100644
--- a/src/goPackages.ts
+++ b/src/goPackages.ts
@@ -52,7 +52,7 @@
 		let err: any;
 		cmd.stdout.on('data', (d) => chunks.push(d));
 		cmd.stderr.on('data', (d) => errchunks.push(d));
-		cmd.on('error', (e) => err = e);
+		cmd.on('error', (e) => (err = e));
 		cmd.on('close', () => {
 			const pkgs = new Map<string, PackageInfo>();
 			if (err && err.code === 'ENOENT') {
@@ -67,7 +67,9 @@
 					return gopkgs().then((result) => resolve(result));
 				}
 
-				console.log(`Running gopkgs failed with "${errorMsg}"\nCheck if you can run \`gopkgs -format {{.Name}};{{.ImportPath}}\` in a terminal successfully.`);
+				console.log(
+					`Running gopkgs failed with "${errorMsg}"\nCheck if you can run \`gopkgs -format {{.Name}};{{.ImportPath}}\` in a terminal successfully.`
+				);
 				return resolve(pkgs);
 			}
 			const goroot = process.env['GOROOT'];
@@ -140,7 +142,7 @@
  */
 export async function getAllPackages(workDir: string): Promise<Map<string, PackageInfo>> {
 	const cache = allPkgsCache.get(workDir);
-	const useCache = cache && (new Date().getTime() - cache.lastHit) < cacheTimeout;
+	const useCache = cache && new Date().getTime() - cache.lastHit < cacheTimeout;
 	if (useCache) {
 		cache.lastHit = new Date().getTime();
 		return Promise.resolve(cache.entry);
@@ -149,7 +151,9 @@
 	const pkgs = await getAllPackagesNoCache(workDir);
 	if (!pkgs || pkgs.size === 0) {
 		if (!gopkgsNotified) {
-			vscode.window.showInformationMessage('Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.');
+			vscode.window.showInformationMessage(
+				'Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.'
+			);
 			gopkgsNotified = true;
 		}
 	}
@@ -175,9 +179,8 @@
 	const workDir = foundPkgRootDir || fileDirPath;
 	const cache = allPkgsCache.get(workDir);
 
-	const getAllPackagesPromise: Promise<Map<string, PackageInfo>> = useCache && cache
-		? Promise.race([getAllPackages(workDir), cache.entry])
-		: getAllPackages(workDir);
+	const getAllPackagesPromise: Promise<Map<string, PackageInfo>> =
+		useCache && cache ? Promise.race([getAllPackages(workDir), cache.entry]) : getAllPackages(workDir);
 
 	return Promise.all([isVendorSupported(), getAllPackagesPromise]).then(([vendorSupported, pkgs]) => {
 		const pkgMap = new Map<string, PackageInfo>();
@@ -200,7 +203,10 @@
 				// try to guess package root dir
 				const vendorIndex = pkgPath.indexOf('/vendor/');
 				if (vendorIndex !== -1) {
-					foundPkgRootDir = path.join(currentWorkspace, pkgPath.substring(0, vendorIndex).replace('/', path.sep));
+					foundPkgRootDir = path.join(
+						currentWorkspace,
+						pkgPath.substring(0, vendorIndex).replace('/', path.sep)
+					);
 					pkgRootDirs.set(fileDirPath, foundPkgRootDir);
 				}
 			}
@@ -256,18 +262,27 @@
 export function getNonVendorPackages(folderPath: string): Promise<Map<string, string>> {
 	const goRuntimePath = getBinPath('go');
 	if (!goRuntimePath) {
-		console.warn(`Failed to run "go list" to find packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		console.warn(
+			`Failed to run "go list" to find packages as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return;
 	}
 	return new Promise<Map<string, string>>((resolve, reject) => {
-		const childProcess = cp.spawn(goRuntimePath, ['list', '-f', 'ImportPath: {{.ImportPath}} FolderPath: {{.Dir}}', './...'], { cwd: folderPath, env: getToolsEnvVars() });
+		const childProcess = cp.spawn(
+			goRuntimePath,
+			['list', '-f', 'ImportPath: {{.ImportPath}} FolderPath: {{.Dir}}', './...'],
+			{ cwd: folderPath, env: getToolsEnvVars() }
+		);
 		const chunks: any[] = [];
 		childProcess.stdout.on('data', (stdout) => {
 			chunks.push(stdout);
 		});
 
 		childProcess.on('close', async (status) => {
-			const lines = chunks.join('').toString().split('\n');
+			const lines = chunks
+				.join('')
+				.toString()
+				.split('\n');
 			const result = new Map<string, string>();
 
 			const version = await getGoVersion();
@@ -291,7 +306,8 @@
 
 // This will check whether it's regular package or internal package
 // Regular package will always allowed
-// Internal package only allowed if the package doing the import is within the tree rooted at the parent of "internal" directory
+// Internal package only allowed if the package doing the import is within the
+// tree rooted at the parent of "internal" directory
 // see: https://golang.org/doc/go1.4#internalpackages
 // see: https://golang.org/s/go14internal
 function isAllowToImportPackage(toDirPath: string, currentWorkspace: string, pkgPath: string) {
diff --git a/src/goPath.ts b/src/goPath.ts
index 5f172d3..63a96ae 100644
--- a/src/goPath.ts
+++ b/src/goPath.ts
@@ -12,7 +12,7 @@
 import os = require('os');
 import path = require('path');
 
-let binPathCache: { [bin: string]: string; } = {};
+let binPathCache: { [bin: string]: string } = {};
 
 export const envPath = process.env['PATH'] || (process.platform === 'win32' ? process.env['Path'] : null);
 
@@ -40,7 +40,7 @@
 		return alternateTool;
 	}
 
-	const binname = (alternateTool && !path.isAbsolute(alternateTool)) ? alternateTool : toolName;
+	const binname = alternateTool && !path.isAbsolute(alternateTool) ? alternateTool : toolName;
 	for (const preferred of preferredGopaths) {
 		if (typeof preferred === 'string') {
 			// Search in the preferred GOPATH workspace's bin folder
@@ -177,8 +177,11 @@
 	// under any of the workspaces in $GOPATH
 	for (const workspace of workspaces) {
 		const possibleCurrentWorkspace = path.join(workspace, 'src');
-		if (currentFileDirPath.startsWith(possibleCurrentWorkspace)
-			|| (process.platform === 'win32' && currentFileDirPath.toLowerCase().startsWith(possibleCurrentWorkspace.toLowerCase()))) {
+		if (
+			currentFileDirPath.startsWith(possibleCurrentWorkspace) ||
+			(process.platform === 'win32' &&
+				currentFileDirPath.toLowerCase().startsWith(possibleCurrentWorkspace.toLowerCase()))
+		) {
 			// In case of nested workspaces, (example: both /Users/me and /Users/me/src/a/b/c are in $GOPATH)
 			// both parent & child workspace in the nested workspaces pair can make it inside the above if block
 			// Therefore, the below check will take longer (more specific to current file) of the two
@@ -192,7 +195,9 @@
 
 // Workaround for issue in https://github.com/Microsoft/vscode/issues/9448#issuecomment-244804026
 export function fixDriveCasingInWindows(pathToFix: string): string {
-	return (process.platform === 'win32' && pathToFix) ? pathToFix.substr(0, 1).toUpperCase() + pathToFix.substr(1) : pathToFix;
+	return process.platform === 'win32' && pathToFix
+		? pathToFix.substr(0, 1).toUpperCase() + pathToFix.substr(1)
+		: pathToFix;
 }
 
 /**
diff --git a/src/goPlayground.ts b/src/goPlayground.ts
index c3e5162..94226f5 100644
--- a/src/goPlayground.ts
+++ b/src/goPlayground.ts
@@ -29,16 +29,17 @@
 	outputChannel.appendLine('Upload to the Go Playground in progress...\n');
 
 	const selection = editor.selection;
-	const code = selection.isEmpty
-		? editor.document.getText()
-		: editor.document.getText(selection);
-	goPlay(code, getGoConfig(editor.document.uri).get('playground')).then((result) => {
-		outputChannel.append(result);
-	}, (e: string) => {
-		if (e) {
-			outputChannel.append(e);
+	const code = selection.isEmpty ? editor.document.getText() : editor.document.getText(selection);
+	goPlay(code, getGoConfig(editor.document.uri).get('playground')).then(
+		(result) => {
+			outputChannel.append(result);
+		},
+		(e: string) => {
+			if (e) {
+				outputChannel.append(e);
+			}
 		}
-	});
+	);
 };
 
 export function goPlay(code: string, goConfig: vscode.WorkspaceConfiguration): Thenable<string> {
diff --git a/src/goReferences.ts b/src/goReferences.ts
index 1108abe..8e7bb17 100644
--- a/src/goReferences.ts
+++ b/src/goReferences.ts
@@ -9,15 +9,32 @@
 import path = require('path');
 import vscode = require('vscode');
 import { promptForMissingTool } from './goInstallTools';
-import { byteOffsetAt, canonicalizeGOPATHPrefix, getBinPath, getFileArchive, getGoConfig, getToolsEnvVars, killTree } from './util';
+import {
+	byteOffsetAt,
+	canonicalizeGOPATHPrefix,
+	getBinPath,
+	getFileArchive,
+	getGoConfig,
+	getToolsEnvVars,
+	killTree
+} from './util';
 
 export class GoReferenceProvider implements vscode.ReferenceProvider {
-
-	public provideReferences(document: vscode.TextDocument, position: vscode.Position, options: { includeDeclaration: boolean }, token: vscode.CancellationToken): Thenable<vscode.Location[]> {
+	public provideReferences(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		options: { includeDeclaration: boolean },
+		token: vscode.CancellationToken
+	): Thenable<vscode.Location[]> {
 		return this.doFindReferences(document, position, options, token);
 	}
 
-	private doFindReferences(document: vscode.TextDocument, position: vscode.Position, options: { includeDeclaration: boolean }, token: vscode.CancellationToken): Thenable<vscode.Location[]> {
+	private doFindReferences(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		options: { includeDeclaration: boolean },
+		token: vscode.CancellationToken
+	): Thenable<vscode.Location[]> {
 		return new Promise<vscode.Location[]>((resolve, reject) => {
 			// get current word
 			const wordRange = document.getWordRangeAtPosition(position);
@@ -61,14 +78,19 @@
 						const referenceResource = vscode.Uri.file(path.resolve(cwd, file));
 
 						if (!options.includeDeclaration) {
-							if (document.uri.fsPath === referenceResource.fsPath &&
-								position.line === Number(lineStartStr) - 1) {
+							if (
+								document.uri.fsPath === referenceResource.fsPath &&
+								position.line === Number(lineStartStr) - 1
+							) {
 								continue;
 							}
 						}
 
 						const range = new vscode.Range(
-							+lineStartStr - 1, +colStartStr - 1, +lineEndStr - 1, +colEndStr
+							+lineStartStr - 1,
+							+colStartStr - 1,
+							+lineEndStr - 1,
+							+colEndStr
 						);
 						results.push(new vscode.Location(referenceResource, range));
 					}
@@ -80,10 +102,7 @@
 			if (process.pid) {
 				process.stdin.end(getFileArchive(document));
 			}
-			token.onCancellationRequested(() =>
-				killTree(process.pid)
-			);
+			token.onCancellationRequested(() => killTree(process.pid));
 		});
 	}
-
 }
diff --git a/src/goReferencesCodelens.ts b/src/goReferencesCodelens.ts
index 8bc545f..a24ad55 100644
--- a/src/goReferencesCodelens.ts
+++ b/src/goReferencesCodelens.ts
@@ -16,10 +16,7 @@
 const methodRegex = /^func\s+\(\s*\w+\s+\*?\w+\s*\)\s+/;
 
 class ReferencesCodeLens extends CodeLens {
-	constructor(
-		public document: TextDocument,
-		range: Range
-	) {
+	constructor(public document: TextDocument, range: Range) {
 		super(range);
 	}
 }
@@ -66,26 +63,30 @@
 			includeDeclaration: false
 		};
 		const referenceProvider = new GoReferenceProvider();
-		return referenceProvider.provideReferences(codeLens.document, codeLens.range.start, options, token).then((references) => {
-			codeLens.command = {
-				title: references.length === 1
-					? '1 reference'
-					: references.length + ' references',
-				command: 'editor.action.showReferences',
-				arguments: [codeLens.document.uri, codeLens.range.start, references]
-			};
-			return codeLens;
-		}, (err) => {
-			console.log(err);
-			codeLens.command = {
-				title: 'Error finding references',
-				command: ''
-			};
-			return codeLens;
-		});
+		return referenceProvider.provideReferences(codeLens.document, codeLens.range.start, options, token).then(
+			(references) => {
+				codeLens.command = {
+					title: references.length === 1 ? '1 reference' : references.length + ' references',
+					command: 'editor.action.showReferences',
+					arguments: [codeLens.document.uri, codeLens.range.start, references]
+				};
+				return codeLens;
+			},
+			(err) => {
+				console.log(err);
+				codeLens.command = {
+					title: 'Error finding references',
+					command: ''
+				};
+				return codeLens;
+			}
+		);
 	}
 
-	private async provideDocumentSymbols(document: TextDocument, token: CancellationToken): Promise<vscode.DocumentSymbol[]> {
+	private async provideDocumentSymbols(
+		document: TextDocument,
+		token: CancellationToken
+	): Promise<vscode.DocumentSymbol[]> {
 		const symbolProvider = new GoDocumentSymbolProvider();
 		const isTestFile = document.fileName.endsWith('_test.go');
 		const symbols = await symbolProvider.provideDocumentSymbols(document, token);
@@ -94,7 +95,12 @@
 				return true;
 			}
 			if (symbol.kind === vscode.SymbolKind.Function) {
-				if (isTestFile && (symbol.name.startsWith('Test') || symbol.name.startsWith('Example') || symbol.name.startsWith('Benchmark'))) {
+				if (
+					isTestFile &&
+					(symbol.name.startsWith('Test') ||
+						symbol.name.startsWith('Example') ||
+						symbol.name.startsWith('Benchmark'))
+				) {
 					return false;
 				}
 				return true;
diff --git a/src/goRename.ts b/src/goRename.ts
index cac7aa7..518e269 100644
--- a/src/goRename.ts
+++ b/src/goRename.ts
@@ -13,14 +13,23 @@
 import { byteOffsetAt, canonicalizeGOPATHPrefix, getBinPath, getGoConfig, getToolsEnvVars, killProcess } from './util';
 
 export class GoRenameProvider implements vscode.RenameProvider {
-
-	public provideRenameEdits(document: vscode.TextDocument, position: vscode.Position, newName: string, token: vscode.CancellationToken): Thenable<vscode.WorkspaceEdit> {
+	public provideRenameEdits(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		newName: string,
+		token: vscode.CancellationToken
+	): Thenable<vscode.WorkspaceEdit> {
 		return vscode.workspace.saveAll(false).then(() => {
 			return this.doRename(document, position, newName, token);
 		});
 	}
 
-	private doRename(document: vscode.TextDocument, position: vscode.Position, newName: string, token: vscode.CancellationToken): Thenable<vscode.WorkspaceEdit> {
+	private doRename(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		newName: string,
+		token: vscode.CancellationToken
+	): Thenable<vscode.WorkspaceEdit> {
 		return new Promise<vscode.WorkspaceEdit>((resolve, reject) => {
 			const filename = canonicalizeGOPATHPrefix(document.fileName);
 			const range = document.getWordRangeAtPosition(position);
@@ -28,7 +37,7 @@
 			const offset = byteOffsetAt(document, pos);
 			const env = getToolsEnvVars();
 			const gorename = getBinPath('gorename');
-			const buildTags = getGoConfig(document.uri)['buildTags'] ;
+			const buildTags = getGoConfig(document.uri)['buildTags'];
 			const gorenameArgs = ['-offset', filename + ':#' + offset, '-to', newName];
 			if (buildTags) {
 				gorenameArgs.push('-tags', buildTags);
@@ -43,7 +52,7 @@
 				token.onCancellationRequested(() => killProcess(p));
 			}
 
-			p = cp.execFile(gorename, gorenameArgs, {env}, (err, stdout, stderr) => {
+			p = cp.execFile(gorename, gorenameArgs, { env }, (err, stdout, stderr) => {
 				try {
 					if (err && (<any>err).code === 'ENOENT') {
 						promptForMissingTool('gorename');
@@ -76,5 +85,4 @@
 			});
 		});
 	}
-
 }
diff --git a/src/goRunTestCodelens.ts b/src/goRunTestCodelens.ts
index 4f777a9..749a72d 100644
--- a/src/goRunTestCodelens.ts
+++ b/src/goRunTestCodelens.ts
@@ -68,19 +68,30 @@
 				command: 'go.test.file'
 			})
 		];
-		if (symbols[0].children.some((sym) => sym.kind === vscode.SymbolKind.Function && this.benchmarkRegex.test(sym.name))) {
-			packageCodeLens.push(new CodeLens(range, {
-				title: 'run package benchmarks',
-				command: 'go.benchmark.package'
-			}), new CodeLens(range, {
-				title: 'run file benchmarks',
-				command: 'go.benchmark.file'
-			}));
+		if (
+			symbols[0].children.some(
+				(sym) => sym.kind === vscode.SymbolKind.Function && this.benchmarkRegex.test(sym.name)
+			)
+		) {
+			packageCodeLens.push(
+				new CodeLens(range, {
+					title: 'run package benchmarks',
+					command: 'go.benchmark.package'
+				}),
+				new CodeLens(range, {
+					title: 'run file benchmarks',
+					command: 'go.benchmark.file'
+				})
+			);
 		}
 		return packageCodeLens;
 	}
 
-	private async getCodeLensForFunctions(vsConfig: vscode.WorkspaceConfiguration, document: TextDocument, token: CancellationToken): Promise<CodeLens[]> {
+	private async getCodeLensForFunctions(
+		vsConfig: vscode.WorkspaceConfiguration,
+		document: TextDocument,
+		token: CancellationToken
+	): Promise<CodeLens[]> {
 		const codelens: CodeLens[] = [];
 
 		const testPromise = getTestFunctions(document, token).then((testFunctions) => {
@@ -121,7 +132,6 @@
 
 				codelens.push(new CodeLens(func.range, debugTestCmd));
 			});
-
 		});
 
 		await Promise.all([testPromise, benchmarkPromise]);
diff --git a/src/goSignature.ts b/src/goSignature.ts
index 5ab33dc..fde70d3 100755
--- a/src/goSignature.ts
+++ b/src/goSignature.ts
@@ -5,16 +5,27 @@
 
 'use strict';
 
-import { CancellationToken, ParameterInformation, Position, SignatureHelp, SignatureHelpProvider, SignatureInformation, TextDocument, WorkspaceConfiguration } from 'vscode';
+import {
+	CancellationToken,
+	ParameterInformation,
+	Position,
+	SignatureHelp,
+	SignatureHelpProvider,
+	SignatureInformation,
+	TextDocument,
+	WorkspaceConfiguration
+} from 'vscode';
 import { definitionLocation } from './goDeclaration';
 import { getGoConfig, getParametersAndReturnType, isPositionInComment, isPositionInString } from './util';
 
 export class GoSignatureHelpProvider implements SignatureHelpProvider {
+	constructor(private goConfig?: WorkspaceConfiguration) {}
 
-	constructor(private goConfig?: WorkspaceConfiguration) {
-	}
-
-	public async provideSignatureHelp(document: TextDocument, position: Position, token: CancellationToken): Promise<SignatureHelp> {
+	public async provideSignatureHelp(
+		document: TextDocument,
+		position: Position,
+		token: CancellationToken
+	): Promise<SignatureHelp> {
 		let goConfig = this.goConfig || getGoConfig(document.uri);
 
 		const theCall = this.walkBackwardsToBeginningOfCall(document, position);
@@ -60,7 +71,9 @@
 				si = new SignatureInformation(declarationText, res.doc);
 				sig = declarationText.substring(res.name.length);
 			}
-			si.parameters = getParametersAndReturnType(sig).params.map((paramText) => new ParameterInformation(paramText));
+			si.parameters = getParametersAndReturnType(sig).params.map(
+				(paramText) => new ParameterInformation(paramText)
+			);
 			result.signatures = [si];
 			result.activeSignature = 0;
 			result.activeParameter = Math.min(theCall.commas.length, si.parameters.length - 1);
@@ -84,13 +97,15 @@
 	/**
 	 * Goes through the function params' lines and gets the number of commas and the start position of the call.
 	 */
-	private walkBackwardsToBeginningOfCall(document: TextDocument, position: Position): { openParen: Position, commas: Position[] } | null {
+	private walkBackwardsToBeginningOfCall(
+		document: TextDocument,
+		position: Position
+	): { openParen: Position; commas: Position[] } | null {
 		let parenBalance = 0;
 		let maxLookupLines = 30;
 		const commas = [];
 
-		for (let lineNr = position.line; lineNr >= 0 && maxLookupLines >= 0; lineNr-- , maxLookupLines--) {
-
+		for (let lineNr = position.line; lineNr >= 0 && maxLookupLines >= 0; lineNr--, maxLookupLines--) {
 			const line = document.lineAt(lineNr);
 
 			// Stop processing if we're inside a comment
@@ -99,9 +114,10 @@
 			}
 
 			// if its current line, get the text until the position given, otherwise get the full line.
-			const [currentLine, characterPosition] = lineNr === position.line
-				? [line.text.substring(0, position.character), position.character]
-				: [line.text, line.text.length - 1];
+			const [currentLine, characterPosition] =
+				lineNr === position.line
+					? [line.text.substring(0, position.character), position.character]
+					: [line.text, line.text.length - 1];
 
 			for (let char = characterPosition; char >= 0; char--) {
 				switch (currentLine[char]) {
@@ -119,7 +135,7 @@
 						break;
 					case ',':
 						const commaPos = new Position(lineNr, char);
-						if ((parenBalance === 0) && !isPositionInString(document, commaPos)) {
+						if (parenBalance === 0 && !isPositionInString(document, commaPos)) {
 							commas.push(commaPos);
 						}
 						break;
diff --git a/src/goStatus.ts b/src/goStatus.ts
index e7fc24c..bfb6fc6 100644
--- a/src/goStatus.ts
+++ b/src/goStatus.ts
@@ -16,7 +16,8 @@
 let statusBarEntry: vscode.StatusBarItem;
 const statusBarItemModule = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
 statusBarItemModule.text = '$(megaphone) Go Modules';
-statusBarItemModule.tooltip = 'Modules is enabled for this project. Click to learn more about Modules support in VS Code.';
+statusBarItemModule.tooltip =
+	'Modules is enabled for this project. Click to learn more about Modules support in VS Code.';
 statusBarItemModule.command = 'go.open.modulewiki';
 
 export function showHideStatus(editor: vscode.TextEditor) {
diff --git a/src/goSuggest.ts b/src/goSuggest.ts
index 87d46e5..2397a99 100644
--- a/src/goSuggest.ts
+++ b/src/goSuggest.ts
@@ -13,7 +13,21 @@
 import { isModSupported } from './goModules';
 import { getImportablePackages, PackageInfo } from './goPackages';
 import { getCurrentGoWorkspaceFromGOPATH } from './goPath';
-import { byteOffsetAt, getBinPath, getCurrentGoPath, getGoConfig, getParametersAndReturnType, getToolsEnvVars, goBuiltinTypes, goKeywords, guessPackageNameFromFile, isPositionInComment, isPositionInString, parseFilePrelude, runGodoc } from './util';
+import {
+	byteOffsetAt,
+	getBinPath,
+	getCurrentGoPath,
+	getGoConfig,
+	getParametersAndReturnType,
+	getToolsEnvVars,
+	goBuiltinTypes,
+	goKeywords,
+	guessPackageNameFromFile,
+	isPositionInComment,
+	isPositionInString,
+	parseFilePrelude,
+	runGodoc
+} from './util';
 
 function vscodeKindFromGoCodeClass(kind: string, type: string): vscode.CompletionItemKind {
 	switch (kind) {
@@ -72,22 +86,33 @@
 		this.globalState = globalState;
 	}
 
-	public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable<vscode.CompletionList> {
-		return this.provideCompletionItemsInternal(document, position, token, getGoConfig(document.uri)).then((result) => {
-			if (!result) {
-				return new vscode.CompletionList([], false);
+	public provideCompletionItems(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		token: vscode.CancellationToken
+	): Thenable<vscode.CompletionList> {
+		return this.provideCompletionItemsInternal(document, position, token, getGoConfig(document.uri)).then(
+			(result) => {
+				if (!result) {
+					return new vscode.CompletionList([], false);
+				}
+				if (Array.isArray(result)) {
+					return new vscode.CompletionList(result, false);
+				}
+				return result;
 			}
-			if (Array.isArray(result)) {
-				return new vscode.CompletionList(result, false);
-			}
-			return result;
-		});
+		);
 	}
 
-	public resolveCompletionItem(item: vscode.CompletionItem, token: vscode.CancellationToken): vscode.ProviderResult<vscode.CompletionItem> {
-		if (!(item instanceof ExtendedCompletionItem)
-			|| item.kind === vscode.CompletionItemKind.Module
-			|| this.excludeDocs) {
+	public resolveCompletionItem(
+		item: vscode.CompletionItem,
+		token: vscode.CancellationToken
+	): vscode.ProviderResult<vscode.CompletionItem> {
+		if (
+			!(item instanceof ExtendedCompletionItem) ||
+			item.kind === vscode.CompletionItemKind.Module ||
+			this.excludeDocs
+		) {
 			return;
 		}
 
@@ -96,13 +121,21 @@
 			return;
 		}
 
-		return runGodoc(path.dirname(item.fileName), item.package || path.dirname(item.fileName), item.receiver, item.label, token).then((doc) => {
-			item.documentation = new vscode.MarkdownString(doc);
-			return item;
-		}).catch((err) => {
-			console.log(err);
-			return item;
-		});
+		return runGodoc(
+			path.dirname(item.fileName),
+			item.package || path.dirname(item.fileName),
+			item.receiver,
+			item.label,
+			token
+		)
+			.then((doc) => {
+				item.documentation = new vscode.MarkdownString(doc);
+				return item;
+			})
+			.catch((err) => {
+				console.log(err);
+				return item;
+			});
 	}
 
 	public async provideCompletionItemsInternal(
@@ -128,7 +161,8 @@
 				const filename = document.fileName;
 				const lineText = document.lineAt(position.line).text;
 				const lineTillCurrentPosition = lineText.substr(0, position.character);
-				const autocompleteUnimportedPackages = config['autocompleteUnimportedPackages'] === true && !lineText.match(/^(\s)*(import|package)(\s)+/);
+				const autocompleteUnimportedPackages =
+					config['autocompleteUnimportedPackages'] === true && !lineText.match(/^(\s)*(import|package)(\s)+/);
 
 				// triggering completions in comments on exported members
 				const commentCompletion = getCommentCompletion(document, position);
@@ -141,7 +175,7 @@
 				}
 
 				const inString = isPositionInString(document, position);
-				if (!inString && lineTillCurrentPosition.endsWith('\"')) {
+				if (!inString && lineTillCurrentPosition.endsWith('"')) {
 					return resolve([]);
 				}
 
@@ -154,28 +188,53 @@
 				let inputText = document.getText();
 				const includeUnimportedPkgs = autocompleteUnimportedPackages && !inString && currentWord.length > 0;
 
-				return this.runGoCode(document, filename, inputText, offset, inString, position, lineText, currentWord, includeUnimportedPkgs, config).then((suggestions) => {
+				return this.runGoCode(
+					document,
+					filename,
+					inputText,
+					offset,
+					inString,
+					position,
+					lineText,
+					currentWord,
+					includeUnimportedPkgs,
+					config
+				).then((suggestions) => {
 					// gocode does not suggest keywords, so we have to do it
 					suggestions.push(...getKeywordCompletions(currentWord));
 
 					// If no suggestions and cursor is at a dot, then check if preceeding word is a package name
 					// If yes, then import the package in the inputText and run gocode again to get suggestions
 					if ((!suggestions || suggestions.length === 0) && lineTillCurrentPosition.endsWith('.')) {
-
 						const pkgPath = this.getPackagePathFromLine(lineTillCurrentPosition);
 						if (pkgPath.length === 1) {
 							// Now that we have the package path, import it right after the "package" statement
-							const { imports, pkg } = parseFilePrelude(vscode.window.activeTextEditor.document.getText());
+							const { imports, pkg } = parseFilePrelude(
+								vscode.window.activeTextEditor.document.getText()
+							);
 							const posToAddImport = document.offsetAt(new vscode.Position(pkg.start + 1, 0));
 							const textToAdd = `import "${pkgPath[0]}"\n`;
-							inputText = inputText.substr(0, posToAddImport) + textToAdd + inputText.substr(posToAddImport);
+							inputText =
+								inputText.substr(0, posToAddImport) + textToAdd + inputText.substr(posToAddImport);
 							offset += textToAdd.length;
 
 							// Now that we have the package imported in the inputText, run gocode again
-							return this.runGoCode(document, filename, inputText, offset, inString, position, lineText, currentWord, false, config).then((newsuggestions) => {
+							return this.runGoCode(
+								document,
+								filename,
+								inputText,
+								offset,
+								inString,
+								position,
+								lineText,
+								currentWord,
+								false,
+								config
+							).then((newsuggestions) => {
 								// Since the new suggestions are due to the package that we imported,
 								// add additionalTextEdits to do the same in the actual document in the editor
-								// We use additionalTextEdits instead of command so that 'useCodeSnippetsOnFunctionSuggest' feature continues to work
+								// We use additionalTextEdits instead of command so that 'useCodeSnippetsOnFunctionSuggest'
+								// feature continues to work
 								newsuggestions.forEach((item) => {
 									item.additionalTextEdits = getTextEditForAddImport(pkgPath[0]);
 								});
@@ -214,7 +273,18 @@
 		}
 	}
 
-	private runGoCode(document: vscode.TextDocument, filename: string, inputText: string, offset: number, inString: boolean, position: vscode.Position, lineText: string, currentWord: string, includeUnimportedPkgs: boolean, config: vscode.WorkspaceConfiguration): Thenable<vscode.CompletionItem[]> {
+	private runGoCode(
+		document: vscode.TextDocument,
+		filename: string,
+		inputText: string,
+		offset: number,
+		inString: boolean,
+		position: vscode.Position,
+		lineText: string,
+		currentWord: string,
+		includeUnimportedPkgs: boolean,
+		config: vscode.WorkspaceConfiguration
+	): Thenable<vscode.CompletionItem[]> {
 		return new Promise<vscode.CompletionItem[]>((resolve, reject) => {
 			const gocodeName = this.isGoMod ? 'gocode-gomod' : 'gocode';
 			const gocode = getBinPath(gocodeName);
@@ -244,8 +314,8 @@
 
 			// Spawn `gocode` process
 			const p = cp.spawn(gocode, [...this.gocodeFlags, 'autocomplete', filename, '' + offset], { env });
-			p.stdout.on('data', (data) => stdout += data);
-			p.stderr.on('data', (data) => stderr += data);
+			p.stdout.on('data', (data) => (stdout += data));
+			p.stderr.on('data', (data) => (stderr += data));
 			p.on('error', (err) => {
 				if (err && (<any>err).code === 'ENOENT') {
 					promptForMissingTool(gocodeName);
@@ -256,8 +326,10 @@
 			p.on('close', (code) => {
 				try {
 					if (code !== 0) {
-						if (stderr.indexOf('rpc: can\'t find service Server.AutoComplete') > -1 && !this.killMsgShown) {
-							vscode.window.showErrorMessage('Auto-completion feature failed as an older gocode process is still running. Please kill the running process for gocode and try again.');
+						if (stderr.indexOf(`rpc: can't find service Server.AutoComplete`) > -1 && !this.killMsgShown) {
+							vscode.window.showErrorMessage(
+								'Auto-completion feature failed as an older gocode process is still running. Please kill the running process for gocode and try again.'
+							);
 							this.killMsgShown = true;
 						}
 						if (stderr.startsWith('flag provided but not defined:')) {
@@ -298,19 +370,20 @@
 										position.line,
 										lineText.substring(0, position.character).lastIndexOf('"') + 1,
 										position.line,
-										position.character),
+										position.character
+									),
 									suggest.name
 								);
 							}
-							if ((config['useCodeSnippetsOnFunctionSuggest'] || config['useCodeSnippetsOnFunctionSuggestWithoutType'])
-								&& (
-									(suggest.class === 'func' && lineText.substr(position.character, 2) !== '()') // Avoids met() -> method()()
-									|| (
-										suggest.class === 'var'
-										&& suggest.type.startsWith('func(')
-										&& lineText.substr(position.character, 1) !== ')' // Avoids snippets when typing params in a func call
-										&& lineText.substr(position.character, 1) !== ',' // Avoids snippets when typing params in a func call
-									))) {
+							if (
+								(config['useCodeSnippetsOnFunctionSuggest'] ||
+									config['useCodeSnippetsOnFunctionSuggestWithoutType']) &&
+								((suggest.class === 'func' && lineText.substr(position.character, 2) !== '()') || // Avoids met() -> method()()
+									(suggest.class === 'var' &&
+									suggest.type.startsWith('func(') &&
+									lineText.substr(position.character, 1) !== ')' && // Avoids snippets when typing params in a func call
+										lineText.substr(position.character, 1) !== ',')) // Avoids snippets when typing params in a func call
+							) {
 								const { params, returnType } = getParametersAndReturnType(suggest.type.substring(4));
 								const paramSnippets = [];
 								for (let i = 0; i < params.length; i++) {
@@ -326,9 +399,15 @@
 										paramSnippets.push('${' + (i + 1) + ':' + param + '}');
 									}
 								}
-								item.insertText = new vscode.SnippetString(suggest.name + '(' + paramSnippets.join(', ') + ')');
+								item.insertText = new vscode.SnippetString(
+									suggest.name + '(' + paramSnippets.join(', ') + ')'
+								);
 							}
-							if (config['useCodeSnippetsOnFunctionSuggest'] && suggest.class === 'type' && suggest.type.startsWith('func(')) {
+							if (
+								config['useCodeSnippetsOnFunctionSuggest'] &&
+								suggest.class === 'type' &&
+								suggest.type.startsWith('func(')
+							) {
 								const { params, returnType } = getParametersAndReturnType(suggest.type.substring(4));
 								const paramSnippets = [];
 								for (let i = 0; i < params.length; i++) {
@@ -340,21 +419,43 @@
 											param = 'arg' + (i + 1) + ' ' + param;
 										}
 										const arg = param.substr(0, param.indexOf(' '));
-										paramSnippets.push('${' + (i + 1) + ':' + arg + '}' + param.substr(param.indexOf(' '), param.length));
+										paramSnippets.push(
+											'${' +
+												(i + 1) +
+												':' +
+												arg +
+												'}' +
+												param.substr(param.indexOf(' '), param.length)
+										);
 									}
 								}
-								item.insertText = new vscode.SnippetString(suggest.name + '(func(' + paramSnippets.join(', ') + ') {\n	$' + (params.length + 1) + '\n})' + returnType);
+								item.insertText = new vscode.SnippetString(
+									suggest.name +
+										'(func(' +
+										paramSnippets.join(', ') +
+										') {\n	$' +
+										(params.length + 1) +
+										'\n})' +
+										returnType
+								);
 							}
 
-							if (wordAtPosition && wordAtPosition.start.character === 0 &&
-								suggest.class === 'type' && !goBuiltinTypes.has(suggest.name)) {
-								const auxItem = new vscode.CompletionItem(suggest.name + ' method', vscode.CompletionItemKind.Snippet);
+							if (
+								wordAtPosition &&
+								wordAtPosition.start.character === 0 &&
+								suggest.class === 'type' &&
+								!goBuiltinTypes.has(suggest.name)
+							) {
+								const auxItem = new vscode.CompletionItem(
+									suggest.name + ' method',
+									vscode.CompletionItemKind.Snippet
+								);
 								auxItem.label = 'func (*' + suggest.name + ')';
 								auxItem.filterText = suggest.name;
 								auxItem.detail = 'Method snippet';
 								auxItem.sortText = 'b';
 								const prefix = 'func (' + suggest.name[0].toLowerCase() + ' *' + suggest.name + ')';
-								const snippet = prefix + ' ${1:methodName}(${2}) ${3} \{\n\t$0\n\}';
+								const snippet = prefix + ' ${1:methodName}(${2}) ${3} {\n\t$0\n}';
 								auxItem.insertText = new vscode.SnippetString(snippet);
 								suggestions.push(auxItem);
 							}
@@ -367,7 +468,9 @@
 
 					// Add importable packages matching currentword to suggestions
 					if (includeUnimportedPkgs && !this.isGoMod && !areCompletionsForPackageSymbols) {
-						suggestions = suggestions.concat(getPackageCompletions(document, currentWord, this.pkgsList, packageSuggestions));
+						suggestions = suggestions.concat(
+							getPackageCompletions(document, currentWord, this.pkgsList, packageSuggestions)
+						);
 					}
 
 					resolve(suggestions);
@@ -387,12 +490,16 @@
 		if (this.previousFile !== currentFile && this.previousFileDir !== path.dirname(currentFile)) {
 			this.previousFile = currentFile;
 			this.previousFileDir = path.dirname(currentFile);
-			checkModSupport = isModSupported(fileuri).then((result) => this.isGoMod = result);
+			checkModSupport = isModSupported(fileuri).then((result) => (this.isGoMod = result));
 		}
-		const setPkgsList = getImportablePackages(currentFile, true).then((pkgMap) => { this.pkgsList = pkgMap; });
+		const setPkgsList = getImportablePackages(currentFile, true).then((pkgMap) => {
+			this.pkgsList = pkgMap;
+		});
 
 		if (!this.setGocodeOptions) {
-			return Promise.all([checkModSupport, setPkgsList]).then(() => { return; });
+			return Promise.all([checkModSupport, setPkgsList]).then(() => {
+				return;
+			});
 		}
 
 		const setGocodeProps = new Promise<void>((resolve, reject) => {
@@ -401,12 +508,21 @@
 
 			cp.execFile(gocode, ['set'], { env }, (err, stdout, stderr) => {
 				if (err && stdout.startsWith('gocode: unknown subcommand:')) {
-					if (goConfig['gocodePackageLookupMode'] === 'gb' && this.globalState && !this.globalState.get(gocodeNoSupportForgbMsgKey)) {
-						vscode.window.showInformationMessage('The go.gocodePackageLookupMode setting for gb will not be honored as github.com/mdempskey/gocode doesnt support it yet.', 'Don\'t show again').then((selected) => {
-							if (selected === 'Don\'t show again') {
-								this.globalState.update(gocodeNoSupportForgbMsgKey, true);
-							}
-						});
+					if (
+						goConfig['gocodePackageLookupMode'] === 'gb' &&
+						this.globalState &&
+						!this.globalState.get(gocodeNoSupportForgbMsgKey)
+					) {
+						vscode.window
+							.showInformationMessage(
+								'The go.gocodePackageLookupMode setting for gb will not be honored as github.com/mdempskey/gocode doesnt support it yet.',
+								`Don't show again`
+							)
+							.then((selected) => {
+								if (selected === `Don't show again`) {
+									this.globalState.update(gocodeNoSupportForgbMsgKey, true);
+								}
+							});
 					}
 					this.setGocodeOptions = false;
 					return resolve();
@@ -528,7 +644,12 @@
  * @param allPkgMap Map of all available packages and their import paths
  * @param importedPackages List of imported packages. Used to prune imported packages out of available packages
  */
-function getPackageCompletions(document: vscode.TextDocument, currentWord: string, allPkgMap: Map<string, PackageInfo>, importedPackages: string[] = []): vscode.CompletionItem[] {
+function getPackageCompletions(
+	document: vscode.TextDocument,
+	currentWord: string,
+	allPkgMap: Map<string, PackageInfo>,
+	importedPackages: string[] = []
+): vscode.CompletionItem[] {
 	const cwd = path.dirname(document.fileName);
 	const goWorkSpace = getCurrentGoWorkspaceFromGOPATH(getCurrentGoPath(), cwd);
 	const workSpaceFolder = vscode.workspace.getWorkspaceFolder(document.uri);
@@ -539,7 +660,6 @@
 	allPkgMap.forEach((info: PackageInfo, pkgPath: string) => {
 		const pkgName = info.name;
 		if (pkgName.startsWith(currentWord) && importedPackages.indexOf(pkgName) === -1) {
-
 			const item = new vscode.CompletionItem(pkgName, vscode.CompletionItemKind.Keyword);
 			item.detail = pkgPath;
 			item.documentation = 'Imports the package';
@@ -577,7 +697,10 @@
 	return suggestions;
 }
 
-export async function getCompletionsWithoutGoCode(document: vscode.TextDocument, position: vscode.Position): Promise<vscode.CompletionItem[]> {
+export async function getCompletionsWithoutGoCode(
+	document: vscode.TextDocument,
+	position: vscode.Position
+): Promise<vscode.CompletionItem[]> {
 	// Completions for the package statement based on the file name
 	const pkgStatementCompletions = await getPackageStatementCompletions(document);
 	if (pkgStatementCompletions && pkgStatementCompletions.length) {
@@ -586,7 +709,8 @@
 
 	const lineText = document.lineAt(position.line).text;
 	const config = getGoConfig(document.uri);
-	const autocompleteUnimportedPackages = config['autocompleteUnimportedPackages'] === true && !lineText.match(/^(\s)*(import|package)(\s)+/);
+	const autocompleteUnimportedPackages =
+		config['autocompleteUnimportedPackages'] === true && !lineText.match(/^(\s)*(import|package)(\s)+/);
 
 	const commentCompletion = getCommentCompletion(document, position);
 	if (commentCompletion) {
@@ -616,5 +740,4 @@
 	const pkgMap = await getImportablePackages(document.fileName, true);
 	const packageCompletions = getPackageCompletions(document, currentWord, pkgMap);
 	return packageCompletions.concat(completionItems);
-
 }
diff --git a/src/goSymbol.ts b/src/goSymbol.ts
index fd4d0eb..2ac6d3c 100644
--- a/src/goSymbol.ts
+++ b/src/goSymbol.ts
@@ -21,17 +21,19 @@
 }
 
 export class GoWorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
-
 	private goKindToCodeKind: { [key: string]: vscode.SymbolKind } = {
 		package: vscode.SymbolKind.Package,
 		import: vscode.SymbolKind.Namespace,
 		var: vscode.SymbolKind.Variable,
 		type: vscode.SymbolKind.Interface,
 		func: vscode.SymbolKind.Function,
-		const: vscode.SymbolKind.Constant,
+		const: vscode.SymbolKind.Constant
 	};
 
-	public provideWorkspaceSymbols(query: string, token: vscode.CancellationToken): Thenable<vscode.SymbolInformation[]> {
+	public provideWorkspaceSymbols(
+		query: string,
+		token: vscode.CancellationToken
+	): Thenable<vscode.SymbolInformation[]> {
 		const convertToCodeSymbols = (decls: GoSymbolDeclaration[], symbols: vscode.SymbolInformation[]): void => {
 			decls.forEach((decl) => {
 				let kind: vscode.SymbolKind;
@@ -44,11 +46,14 @@
 					kind,
 					new vscode.Range(pos, pos),
 					vscode.Uri.file(decl.path),
-					'');
+					''
+				);
 				symbols.push(symbolInfo);
 			});
 		};
-		const root = getWorkspaceFolderPath(vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri);
+		const root = getWorkspaceFolderPath(
+			vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri
+		);
 		const goConfig = getGoConfig();
 
 		if (!root && !goConfig.gotoSymbol.includeGoroot) {
@@ -64,7 +69,13 @@
 	}
 }
 
-export function getWorkspaceSymbols(workspacePath: string, query: string, token: vscode.CancellationToken, goConfig?: vscode.WorkspaceConfiguration, ignoreFolderFeatureOn: boolean = true): Thenable<GoSymbolDeclaration[]> {
+export function getWorkspaceSymbols(
+	workspacePath: string,
+	query: string,
+	token: vscode.CancellationToken,
+	goConfig?: vscode.WorkspaceConfiguration,
+	ignoreFolderFeatureOn: boolean = true
+): Thenable<GoSymbolDeclaration[]> {
 	if (!goConfig) {
 		goConfig = getGoConfig();
 	}
@@ -72,7 +83,8 @@
 	const calls: Promise<GoSymbolDeclaration[]>[] = [];
 
 	const ignoreFolders: string[] = gotoSymbolConfig ? gotoSymbolConfig['ignoreFolders'] : [];
-	const baseArgs = (ignoreFolderFeatureOn && ignoreFolders && ignoreFolders.length > 0) ? ['-ignore', ignoreFolders.join(',')] : [];
+	const baseArgs =
+		ignoreFolderFeatureOn && ignoreFolders && ignoreFolders.length > 0 ? ['-ignore', ignoreFolders.join(',')] : [];
 
 	calls.push(callGoSymbols([...baseArgs, workspacePath, query], token));
 
diff --git a/src/goTest.ts b/src/goTest.ts
index 84c8843..0adb253 100644
--- a/src/goTest.ts
+++ b/src/goTest.ts
@@ -8,7 +8,17 @@
 import vscode = require('vscode');
 import { applyCodeCoverageToAllEditors } from './goCover';
 import { isModSupported } from './goModules';
-import { extractInstanceTestName, findAllTestSuiteRuns, getBenchmarkFunctions, getTestFlags, getTestFunctionDebugArgs, getTestFunctions, getTestTags, goTest, TestConfig } from './testUtils';
+import {
+	extractInstanceTestName,
+	findAllTestSuiteRuns,
+	getBenchmarkFunctions,
+	getTestFlags,
+	getTestFunctionDebugArgs,
+	getTestFunctions,
+	getTestTags,
+	goTest,
+	TestConfig
+} from './testUtils';
 import { getTempFilePath } from './util';
 
 // lastTestConfig holds a reference to the last executed TestConfig which allows
@@ -42,10 +52,12 @@
 			const testFunctions = await getFunctions(editor.document, null);
 			// We use functionName if it was provided as argument
 			// Otherwise find any test function containing the cursor.
-			const testFunctionName = args && args.functionName
-				? args.functionName
-				: testFunctions.filter((func) => func.range.contains(editor.selection.start))
-					.map((el) => el.name)[0];
+			const testFunctionName =
+				args && args.functionName
+					? args.functionName
+					: testFunctions
+							.filter((func) => func.range.contains(editor.selection.start))
+							.map((el) => el.name)[0];
 			if (!testFunctionName) {
 				vscode.window.showInformationMessage('No test function found at cursor.');
 				return;
@@ -67,11 +79,18 @@
 /**
  * Runs the test at cursor.
  */
-async function runTestAtCursor(editor: vscode.TextEditor, testFunctionName: string, testFunctions: vscode.DocumentSymbol[], goConfig: vscode.WorkspaceConfiguration, cmd: TestAtCursorCmd, args: any) {
-
-	const testConfigFns = cmd !== 'benchmark' && extractInstanceTestName(testFunctionName)
-		? [testFunctionName, ...findAllTestSuiteRuns(editor.document, testFunctions).map((t) => t.name)]
-		: [testFunctionName];
+async function runTestAtCursor(
+	editor: vscode.TextEditor,
+	testFunctionName: string,
+	testFunctions: vscode.DocumentSymbol[],
+	goConfig: vscode.WorkspaceConfiguration,
+	cmd: TestAtCursorCmd,
+	args: any
+) {
+	const testConfigFns = [testFunctionName];
+	if (cmd !== 'benchmark' && extractInstanceTestName(testFunctionName)) {
+		testConfigFns.push(...findAllTestSuiteRuns(editor.document, testFunctions).map((t) => t.name));
+	}
 
 	const isMod = await isModSupported(editor.document.uri);
 	const testConfig: TestConfig = {
@@ -91,8 +110,12 @@
 /**
  * Debugs the test at cursor.
  */
-async function debugTestAtCursor(editor: vscode.TextEditor, testFunctionName: string, testFunctions: vscode.DocumentSymbol[], goConfig: vscode.WorkspaceConfiguration) {
-
+async function debugTestAtCursor(
+	editor: vscode.TextEditor,
+	testFunctionName: string,
+	testFunctions: vscode.DocumentSymbol[],
+	goConfig: vscode.WorkspaceConfiguration
+) {
 	const args = getTestFunctionDebugArgs(editor.document, testFunctionName, testFunctions);
 	const tags = getTestTags(goConfig);
 	const buildFlags = tags ? ['-tags', tags] : [];
@@ -161,7 +184,10 @@
 		return;
 	}
 	let workspaceUri = vscode.workspace.workspaceFolders[0].uri;
-	if (vscode.window.activeTextEditor && vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri)) {
+	if (
+		vscode.window.activeTextEditor &&
+		vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri)
+	) {
 		workspaceUri = vscode.workspace.getWorkspaceFolder(vscode.window.activeTextEditor.document.uri).uri;
 	}
 
@@ -188,7 +214,11 @@
  * @param goConfig Configuration for the Go extension.
  * @param isBenchmark Boolean flag indicating if these are benchmark tests or not.
  */
-export async function testCurrentFile(goConfig: vscode.WorkspaceConfiguration, isBenchmark: boolean, args: string[]): Promise<boolean> {
+export async function testCurrentFile(
+	goConfig: vscode.WorkspaceConfiguration,
+	isBenchmark: boolean,
+	args: string[]
+): Promise<boolean> {
 	const editor = vscode.window.activeTextEditor;
 	if (!editor) {
 		vscode.window.showInformationMessage('No editor is active.');
@@ -202,25 +232,28 @@
 	const getFunctions = isBenchmark ? getBenchmarkFunctions : getTestFunctions;
 	const isMod = await isModSupported(editor.document.uri);
 
-	return editor.document.save().then(() => {
-		return getFunctions(editor.document, null).then((testFunctions) => {
-			const testConfig: TestConfig = {
-				goConfig,
-				dir: path.dirname(editor.document.fileName),
-				flags: getTestFlags(goConfig, args),
-				functions: testFunctions.map((sym) => sym.name),
-				isBenchmark,
-				isMod,
-				applyCodeCoverage: goConfig.get<boolean>('coverOnSingleTestFile')
-			};
-			// Remember this config as the last executed test.
-			lastTestConfig = testConfig;
-			return goTest(testConfig);
+	return editor.document
+		.save()
+		.then(() => {
+			return getFunctions(editor.document, null).then((testFunctions) => {
+				const testConfig: TestConfig = {
+					goConfig,
+					dir: path.dirname(editor.document.fileName),
+					flags: getTestFlags(goConfig, args),
+					functions: testFunctions.map((sym) => sym.name),
+					isBenchmark,
+					isMod,
+					applyCodeCoverage: goConfig.get<boolean>('coverOnSingleTestFile')
+				};
+				// Remember this config as the last executed test.
+				lastTestConfig = testConfig;
+				return goTest(testConfig);
+			});
+		})
+		.then(null, (err) => {
+			console.error(err);
+			return Promise.resolve(false);
 		});
-	}).then(null, (err) => {
-		console.error(err);
-		return Promise.resolve(false);
-	});
 }
 
 /**
diff --git a/src/goTools.ts b/src/goTools.ts
index 635cc79..9b30780 100644
--- a/src/goTools.ts
+++ b/src/goTools.ts
@@ -39,7 +39,7 @@
 	const isWildcard = importPath.endsWith('...');
 
 	// Only Go >= 1.13 supports installing wildcards in module mode.
-	return (isWildcard && goVersion.lt('1.13'));
+	return isWildcard && goVersion.lt('1.13');
 }
 
 export function containsTool(tools: Tool[], tool: Tool): boolean {
@@ -86,7 +86,7 @@
 		'impl',
 		'fillstruct',
 		'goplay',
-		'godoctor',
+		'godoctor'
 	]) {
 		maybeAddTool(name);
 	}
@@ -138,156 +138,156 @@
 		name: 'gocode',
 		importPath: 'github.com/mdempsky/gocode',
 		isImportant: true,
-		description: 'Auto-completion, does not work with modules',
+		description: 'Auto-completion, does not work with modules'
 	},
 	'gocode-gomod': {
 		name: 'gocode-gomod',
 		importPath: 'github.com/stamblerre/gocode',
 		isImportant: true,
-		description: 'Auto-completion, works with modules',
+		description: 'Auto-completion, works with modules'
 	},
 	'gopkgs': {
 		name: 'gopkgs',
 		importPath: 'github.com/uudashr/gopkgs/cmd/gopkgs',
 		isImportant: true,
-		description: 'Auto-completion of unimported packages & Add Import feature',
+		description: 'Auto-completion of unimported packages & Add Import feature'
 	},
 	'go-outline': {
 		name: 'go-outline',
 		importPath: 'github.com/ramya-rao-a/go-outline',
 		isImportant: true,
-		description: 'Go to symbol in file',
+		description: 'Go to symbol in file'
 	},
 	'go-symbols': {
 		name: 'go-symbols',
 		importPath: 'github.com/acroca/go-symbols',
 		isImportant: false,
-		description: 'Go to symbol in workspace',
+		description: 'Go to symbol in workspace'
 	},
 	'guru': {
 		name: 'guru',
 		importPath: 'golang.org/x/tools/cmd/guru',
 		isImportant: false,
-		description: 'Find all references and Go to implementation of symbols',
+		description: 'Find all references and Go to implementation of symbols'
 	},
 	'gorename': {
 		name: 'gorename',
 		importPath: 'golang.org/x/tools/cmd/gorename',
 		isImportant: false,
-		description: 'Rename symbols',
+		description: 'Rename symbols'
 	},
 	'gomodifytags': {
 		name: 'gomodifytags',
 		importPath: 'github.com/fatih/gomodifytags',
 		isImportant: false,
-		description: 'Modify tags on structs',
+		description: 'Modify tags on structs'
 	},
 	'goplay': {
 		name: 'goplay',
 		importPath: 'github.com/haya14busa/goplay/cmd/goplay',
 		isImportant: false,
-		description: 'The Go playground',
+		description: 'The Go playground'
 	},
 	'impl': {
 		name: 'impl',
 		importPath: 'github.com/josharian/impl',
 		isImportant: false,
-		description: 'Stubs for interfaces',
+		description: 'Stubs for interfaces'
 	},
 	'gotype-live': {
 		name: 'gotype-live',
 		importPath: 'github.com/tylerb/gotype-live',
 		isImportant: false,
-		description: 'Show errors as you type',
+		description: 'Show errors as you type'
 	},
 	'godef': {
 		name: 'godef',
 		importPath: 'github.com/rogpeppe/godef',
 		isImportant: true,
-		description: 'Go to definition',
+		description: 'Go to definition'
 	},
 	'gogetdoc': {
 		name: 'gogetdoc',
 		importPath: 'github.com/zmb3/gogetdoc',
 		isImportant: true,
-		description: 'Go to definition & text shown on hover',
+		description: 'Go to definition & text shown on hover'
 	},
 	'goimports': {
 		name: 'goimports',
 		importPath: 'golang.org/x/tools/cmd/goimports',
 		isImportant: true,
-		description: 'Formatter',
+		description: 'Formatter'
 	},
 	'goreturns': {
 		name: 'goreturns',
 		importPath: 'github.com/sqs/goreturns',
 		isImportant: true,
-		description: 'Formatter',
+		description: 'Formatter'
 	},
 	'goformat': {
 		name: 'goformat',
 		importPath: 'winterdrache.de/goformat/goformat',
 		isImportant: false,
-		description: 'Formatter',
+		description: 'Formatter'
 	},
 	'golint': {
 		name: 'golint',
 		importPath: 'golang.org/x/lint/golint',
 		isImportant: true,
-		description: 'Linter',
+		description: 'Linter'
 	},
 	'gotests': {
 		name: 'gotests',
 		importPath: 'github.com/cweill/gotests/...',
 		isImportant: false,
-		description: 'Generate unit tests',
+		description: 'Generate unit tests'
 	},
 	'staticcheck': {
 		name: 'staticcheck',
 		importPath: 'honnef.co/go/tools/...',
 		isImportant: true,
-		description: 'Linter',
+		description: 'Linter'
 	},
 	'golangci-lint': {
 		name: 'golangci-lint',
 		importPath: 'github.com/golangci/golangci-lint/cmd/golangci-lint',
 		isImportant: true,
-		description: 'Linter',
+		description: 'Linter'
 	},
 	'revive': {
 		name: 'revive',
 		importPath: 'github.com/mgechev/revive',
 		isImportant: true,
-		description: 'Linter',
+		description: 'Linter'
 	},
 	'go-langserver': {
 		name: 'go-langserver',
 		importPath: 'github.com/sourcegraph/go-langserver',
 		isImportant: false,
-		description: 'Language Server from Sourcegraph',
+		description: 'Language Server from Sourcegraph'
 	},
 	'gopls': {
 		name: 'gopls',
 		importPath: 'golang.org/x/tools/gopls',
 		isImportant: false,
-		description: 'Language Server from Google',
+		description: 'Language Server from Google'
 	},
 	'dlv': {
 		name: 'dlv',
 		importPath: 'github.com/go-delve/delve/cmd/dlv',
 		isImportant: false,
-		description: 'Debugging',
+		description: 'Debugging'
 	},
 	'fillstruct': {
 		name: 'fillstruct',
 		importPath: 'github.com/davidrjenni/reftools/cmd/fillstruct',
 		isImportant: false,
-		description: 'Fill structs with defaults',
+		description: 'Fill structs with defaults'
 	},
 	'godoctor': {
 		name: 'godoctor',
 		importPath: 'github.com/godoctor/godoctor',
 		isImportant: false,
-		description: 'Extract to functions and variables',
-	},
+		description: 'Extract to functions and variables'
+	}
 };
diff --git a/src/goTypeDefinition.ts b/src/goTypeDefinition.ts
index d19d134..b803d0f 100644
--- a/src/goTypeDefinition.ts
+++ b/src/goTypeDefinition.ts
@@ -10,7 +10,16 @@
 import vscode = require('vscode');
 import { adjustWordPosition, definitionLocation, parseMissingError } from './goDeclaration';
 import { promptForMissingTool } from './goInstallTools';
-import { byteOffsetAt, canonicalizeGOPATHPrefix, getBinPath, getFileArchive, getGoConfig, getToolsEnvVars, goBuiltinTypes, killTree } from './util';
+import {
+	byteOffsetAt,
+	canonicalizeGOPATHPrefix,
+	getBinPath,
+	getFileArchive,
+	getGoConfig,
+	getToolsEnvVars,
+	goBuiltinTypes,
+	killTree
+} from './util';
 
 interface GuruDescribeOutput {
 	desc: string;
@@ -32,7 +41,11 @@
 }
 
 export class GoTypeDefinitionProvider implements vscode.TypeDefinitionProvider {
-	public provideTypeDefinition(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): vscode.ProviderResult<vscode.Definition> {
+	public provideTypeDefinition(
+		document: vscode.TextDocument,
+		position: vscode.Position,
+		token: vscode.CancellationToken
+	): vscode.ProviderResult<vscode.Definition> {
 		const adjustedPos = adjustWordPosition(document, position);
 		if (!adjustedPos[0]) {
 			return Promise.resolve(null);
@@ -66,36 +79,41 @@
 
 					const guruOutput = <GuruDescribeOutput>JSON.parse(stdout.toString());
 					if (!guruOutput.value || !guruOutput.value.typespos) {
-						if (guruOutput.value
-							&& guruOutput.value.type
-							&& !goBuiltinTypes.has(guruOutput.value.type)
-							&& guruOutput.value.type !== 'invalid type') {
-							console.log('no typespos from guru\'s output - try to update guru tool');
+						if (
+							guruOutput.value &&
+							guruOutput.value.type &&
+							!goBuiltinTypes.has(guruOutput.value.type) &&
+							guruOutput.value.type !== 'invalid type'
+						) {
+							console.log(`no typespos from guru's output - try to update guru tool`);
 						}
 
 						// Fall back to position of declaration
-						return definitionLocation(document, position, null, false, token).then((definitionInfo) => {
-							if (definitionInfo == null || definitionInfo.file == null) {
-								return null;
+						return definitionLocation(document, position, null, false, token).then(
+							(definitionInfo) => {
+								if (definitionInfo == null || definitionInfo.file == null) {
+									return null;
+								}
+								const definitionResource = vscode.Uri.file(definitionInfo.file);
+								const pos = new vscode.Position(definitionInfo.line, definitionInfo.column);
+								resolve(new vscode.Location(definitionResource, pos));
+							},
+							(err) => {
+								const miss = parseMissingError(err);
+								if (miss[0]) {
+									promptForMissingTool(miss[1]);
+								} else if (err) {
+									return Promise.reject(err);
+								}
+								return Promise.resolve(null);
 							}
-							const definitionResource = vscode.Uri.file(definitionInfo.file);
-							const pos = new vscode.Position(definitionInfo.line, definitionInfo.column);
-							resolve(new vscode.Location(definitionResource, pos));
-						}, (err) => {
-							const miss = parseMissingError(err);
-							if (miss[0]) {
-								promptForMissingTool(miss[1]);
-							} else if (err) {
-								return Promise.reject(err);
-							}
-							return Promise.resolve(null);
-						});
+						);
 					}
 
 					const results: vscode.Location[] = [];
 					guruOutput.value.typespos.forEach((ref) => {
 						const match = /^(.*):(\d+):(\d+)/.exec(ref.objpos);
-						if (!match)  {
+						if (!match) {
 							return;
 						}
 						const [_, file, line, col] = match;
@@ -112,9 +130,7 @@
 			if (process.pid) {
 				process.stdin.end(getFileArchive(document));
 			}
-			token.onCancellationRequested(() =>
-				killTree(process.pid)
-			);
+			token.onCancellationRequested(() => killTree(process.pid));
 		});
 	}
 }
diff --git a/src/goVet.ts b/src/goVet.ts
index 724fd92..cd96c3e 100644
--- a/src/goVet.ts
+++ b/src/goVet.ts
@@ -7,7 +7,16 @@
 import vscode = require('vscode');

 import { vetDiagnosticCollection } from './goMain';

 import { diagnosticsStatusBarItem, outputChannel } from './goStatus';

-import { getGoConfig, getGoVersion, getToolsEnvVars, getWorkspaceFolderPath, handleDiagnosticErrors, ICheckResult, resolvePath, runTool } from './util';

+import {

+	getGoConfig,

+	getGoVersion,

+	getToolsEnvVars,

+	getWorkspaceFolderPath,

+	handleDiagnosticErrors,

+	ICheckResult,

+	resolvePath,

+	runTool

+} from './util';

 

 /**

  * Runs go vet in the current package or workspace.

@@ -19,7 +28,9 @@
 		return;

 	}

 	if (editor.document.languageId !== 'go' && !vetWorkspace) {

-		vscode.window.showInformationMessage('File in the active editor is not a Go file, cannot find current package to vet');

+		vscode.window.showInformationMessage(

+			'File in the active editor is not a Go file, cannot find current package to vet'

+		);

 		return;

 	}

 

@@ -48,7 +59,11 @@
  * @param goConfig Configuration for the Go extension.

  * @param vetWorkspace If true vets code in all workspace.

  */

-export async function goVet(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfiguration, vetWorkspace?: boolean): Promise<ICheckResult[]> {

+export async function goVet(

+	fileUri: vscode.Uri,

+	goConfig: vscode.WorkspaceConfiguration,

+	vetWorkspace?: boolean

+): Promise<ICheckResult[]> {

 	epoch++;

 	const closureEpoch = epoch;

 	if (tokenSource) {

@@ -60,7 +75,7 @@
 	tokenSource = new vscode.CancellationTokenSource();

 

 	const currentWorkspace = getWorkspaceFolderPath(fileUri);

-	const cwd = (vetWorkspace && currentWorkspace) ? currentWorkspace : path.dirname(fileUri.fsPath);

+	const cwd = vetWorkspace && currentWorkspace ? currentWorkspace : path.dirname(fileUri.fsPath);

 	if (!path.isAbsolute(cwd)) {

 		return Promise.resolve([]);

 	}

@@ -89,7 +104,7 @@
 		tagsArg.push(goConfig['buildTags']);

 	}

 

-	let vetArgs = ['vet', ...args, ...tagsArg, vetWorkspace ? './...' :  '.'];

+	let vetArgs = ['vet', ...args, ...tagsArg, vetWorkspace ? './...' : '.'];

 	if (goVersion.lt('1.10') && args.length) {

 		vetArgs = ['tool', 'vet', ...args, ...tagsArg, '.'];

 	}

@@ -97,16 +112,7 @@
 	outputChannel.appendLine(`Starting "go vet" under the folder ${cwd}`);

 

 	running = true;

-	return runTool(

-		vetArgs,

-		cwd,

-		'warning',

-		true,

-		null,

-		vetEnv,

-		false,

-		tokenSource.token

-	).then((result) => {

+	return runTool(vetArgs, cwd, 'warning', true, null, vetEnv, false, tokenSource.token).then((result) => {

 		if (closureEpoch === epoch) {

 			running = false;

 		}

diff --git a/src/telemetry.ts b/src/telemetry.ts
index 62773a5..14bcb97 100644
--- a/src/telemetry.ts
+++ b/src/telemetry.ts
@@ -17,7 +17,7 @@
 	sendTelemetryEvent('modules');
 }
 
-export function sendTelemetryEventForAddImportCmd(arg: { importPath: string, from: string }) {
+export function sendTelemetryEventForAddImportCmd(arg: { importPath: string; from: string }) {
 	/* __GDPR__
 		"addImportCmd" : {
 			"from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
@@ -145,7 +145,7 @@
 		liveErrors: JSON.stringify(goConfig['liveErrors']),
 		codeLens: JSON.stringify(goConfig['enableCodeLens']),
 		alternateTools: JSON.stringify(goConfig['alternateTools']),
-		useGoProxyToCheckForToolUpdates: goConfig['useGoProxyToCheckForToolUpdates'] + '',
+		useGoProxyToCheckForToolUpdates: goConfig['useGoProxyToCheckForToolUpdates'] + ''
 	});
 }
 
@@ -177,7 +177,13 @@
 
 let telemtryReporter: TelemetryReporter;
 
-function sendTelemetryEvent(eventName: string, properties?: { [key: string]: string }, measures?: { [key: string]: number }): void {
-	telemtryReporter = telemtryReporter ? telemtryReporter : new TelemetryReporter(extensionId, extensionVersion, aiKey);
+function sendTelemetryEvent(
+	eventName: string,
+	properties?: { [key: string]: string },
+	measures?: { [key: string]: number }
+): void {
+	telemtryReporter = telemtryReporter
+		? telemtryReporter
+		: new TelemetryReporter(extensionId, extensionVersion, aiKey);
 	telemtryReporter.sendTelemetryEvent(eventName, properties, measures);
 }
diff --git a/src/testUtils.ts b/src/testUtils.ts
index a0d185b..33cd6db 100644
--- a/src/testUtils.ts
+++ b/src/testUtils.ts
@@ -12,7 +12,15 @@
 import { GoDocumentSymbolProvider } from './goOutline';
 import { getNonVendorPackages } from './goPackages';
 import { envPath, getCurrentGoWorkspaceFromGOPATH, parseEnvFile } from './goPath';
-import { getBinPath, getCurrentGoPath, getGoVersion, getTempFilePath, getToolsEnvVars, LineBuffer, resolvePath } from './util';
+import {
+	getBinPath,
+	getCurrentGoPath,
+	getGoVersion,
+	getTempFilePath,
+	getToolsEnvVars,
+	LineBuffer,
+	resolvePath
+} from './util';
 
 const sendSignal = 'SIGKILL';
 const outputChannel = vscode.window.createOutputChannel('Go Tests');
@@ -86,8 +94,14 @@
 		}
 	}
 
-	Object.keys(fileEnv).forEach((key) => envVars[key] = typeof fileEnv[key] === 'string' ? resolvePath(fileEnv[key]) : fileEnv[key]);
-	Object.keys(testEnvConfig).forEach((key) => envVars[key] = typeof testEnvConfig[key] === 'string' ? resolvePath(testEnvConfig[key]) : testEnvConfig[key]);
+	Object.keys(fileEnv).forEach(
+		(key) => (envVars[key] = typeof fileEnv[key] === 'string' ? resolvePath(fileEnv[key]) : fileEnv[key])
+	);
+	Object.keys(testEnvConfig).forEach(
+		(key) =>
+			(envVars[key] =
+				typeof testEnvConfig[key] === 'string' ? resolvePath(testEnvConfig[key]) : testEnvConfig[key])
+	);
 
 	return envVars;
 }
@@ -95,7 +109,7 @@
 export function getTestFlags(goConfig: vscode.WorkspaceConfiguration, args?: any): string[] {
 	let testFlags: string[] = goConfig['testFlags'] || goConfig['buildFlags'] || [];
 	testFlags = testFlags.map((x) => resolvePath(x)); // Use copy of the flags, dont pass the actual object from config
-	return (args && args.hasOwnProperty('flags') && Array.isArray(args['flags'])) ? args['flags'] : testFlags;
+	return args && args.hasOwnProperty('flags') && Array.isArray(args['flags']) ? args['flags'] : testFlags;
 }
 
 export function getTestTags(goConfig: vscode.WorkspaceConfiguration): string {
@@ -108,16 +122,22 @@
  * @param the URI of a Go source file.
  * @return test function symbols for the source file.
  */
-export function getTestFunctions(doc: vscode.TextDocument, token: vscode.CancellationToken): Thenable<vscode.DocumentSymbol[]> {
+export function getTestFunctions(
+	doc: vscode.TextDocument,
+	token: vscode.CancellationToken
+): Thenable<vscode.DocumentSymbol[]> {
 	const documentSymbolProvider = new GoDocumentSymbolProvider(true);
 	return documentSymbolProvider
 		.provideDocumentSymbols(doc, token)
 		.then((symbols) => symbols[0].children)
 		.then((symbols) => {
-			const testify = symbols.some((sym) => sym.kind === vscode.SymbolKind.Namespace && sym.name === '"github.com/stretchr/testify/suite"');
-			return symbols.filter((sym) =>
-				sym.kind === vscode.SymbolKind.Function
-				&& (testFuncRegex.test(sym.name) || (testify && testMethodRegex.test(sym.name)))
+			const testify = symbols.some(
+				(sym) => sym.kind === vscode.SymbolKind.Namespace && sym.name === '"github.com/stretchr/testify/suite"'
+			);
+			return symbols.filter(
+				(sym) =>
+					sym.kind === vscode.SymbolKind.Function &&
+					(testFuncRegex.test(sym.name) || (testify && testMethodRegex.test(sym.name)))
 			);
 		});
 }
@@ -142,7 +162,11 @@
  * @param testFunctionName The test function to get the debug args
  * @param testFunctions The test functions found in the document
  */
-export function getTestFunctionDebugArgs(document: vscode.TextDocument, testFunctionName: string, testFunctions: vscode.DocumentSymbol[]): string[] {
+export function getTestFunctionDebugArgs(
+	document: vscode.TextDocument,
+	testFunctionName: string,
+	testFunctions: vscode.DocumentSymbol[]
+): string[] {
 	if (benchmarkRegex.test(testFunctionName)) {
 		return ['-test.bench', '^' + testFunctionName + '$', '-test.run', 'a^'];
 	}
@@ -162,7 +186,10 @@
  * @param doc Editor document
  * @param allTests All test functions
  */
-export function findAllTestSuiteRuns(doc: vscode.TextDocument, allTests: vscode.DocumentSymbol[]): vscode.DocumentSymbol[] {
+export function findAllTestSuiteRuns(
+	doc: vscode.TextDocument,
+	allTests: vscode.DocumentSymbol[]
+): vscode.DocumentSymbol[] {
 	// get non-instance test functions
 	const testFunctions = allTests.filter((t) => !testMethodRegex.test(t.name));
 	// filter further to ones containing suite.Run()
@@ -175,15 +202,16 @@
  * @param the URI of a Go source file.
  * @return benchmark function symbols for the source file.
  */
-export function getBenchmarkFunctions(doc: vscode.TextDocument, token: vscode.CancellationToken): Thenable<vscode.DocumentSymbol[]> {
+export function getBenchmarkFunctions(
+	doc: vscode.TextDocument,
+	token: vscode.CancellationToken
+): Thenable<vscode.DocumentSymbol[]> {
 	const documentSymbolProvider = new GoDocumentSymbolProvider();
 	return documentSymbolProvider
 		.provideDocumentSymbols(doc, token)
 		.then((symbols) => symbols[0].children)
 		.then((symbols) =>
-			symbols.filter((sym) =>
-				sym.kind === vscode.SymbolKind.Function
-				&& benchmarkRegex.test(sym.name))
+			symbols.filter((sym) => sym.kind === vscode.SymbolKind.Function && benchmarkRegex.test(sym.name))
 		);
 }
 
@@ -195,7 +223,6 @@
 export async function goTest(testconfig: TestConfig): Promise<boolean> {
 	const tmpCoverPath = getTempFilePath('go-code-cover');
 	const testResult = await new Promise<boolean>(async (resolve, reject) => {
-
 		// We do not want to clear it if tests are already running, as that could
 		// lose valuable output.
 		if (runningTestProcesses.length < 1) {
@@ -226,18 +253,28 @@
 		const goRuntimePath = getBinPath('go');
 
 		if (!goRuntimePath) {
-			vscode.window.showErrorMessage(`Failed to run "go test" as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+			vscode.window.showErrorMessage(
+				`Failed to run "go test" as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+			);
 			return Promise.resolve();
 		}
 
-		const currentGoWorkspace = testconfig.isMod ? '' : getCurrentGoWorkspaceFromGOPATH(getCurrentGoPath(), testconfig.dir);
+		const currentGoWorkspace = testconfig.isMod
+			? ''
+			: getCurrentGoWorkspaceFromGOPATH(getCurrentGoPath(), testconfig.dir);
 		let targets = targetArgs(testconfig);
-		const getCurrentPackagePromise = testconfig.isMod ? getCurrentPackage(testconfig.dir) : Promise.resolve(currentGoWorkspace ? testconfig.dir.substr(currentGoWorkspace.length + 1) : '');
+		let getCurrentPackagePromise = Promise.resolve('');
+		if (testconfig.isMod) {
+			getCurrentPackagePromise = getCurrentPackage(testconfig.dir);
+		} else if (currentGoWorkspace) {
+			getCurrentPackagePromise = Promise.resolve(testconfig.dir.substr(currentGoWorkspace.length + 1));
+		}
 		let pkgMapPromise: Promise<Map<string, string> | null> = Promise.resolve(null);
 		if (testconfig.includeSubDirectories) {
 			if (testconfig.isMod) {
 				targets = ['./...'];
-				pkgMapPromise = getNonVendorPackages(testconfig.dir); // We need the mapping to get absolute paths for the files in the test output
+				// We need the mapping to get absolute paths for the files in the test output
+				pkgMapPromise = getNonVendorPackages(testconfig.dir);
 			} else {
 				pkgMapPromise = getGoVersion().then((goVersion) => {
 					if (goVersion.gt('1.8')) {
@@ -252,110 +289,115 @@
 			}
 		}
 
-		Promise.all([pkgMapPromise, getCurrentPackagePromise]).then(([pkgMap, currentPackage]) => {
-			if (!pkgMap) {
-				pkgMap = new Map<string, string>();
-			}
-			// Use the package name to be in the args to enable running tests in symlinked directories
-			if (!testconfig.includeSubDirectories && currentPackage) {
-				targets.splice(0, 0, currentPackage);
-			}
-
-			const outTargets = args.slice(0);
-			if (targets.length > 4) {
-				outTargets.push('<long arguments omitted>');
-			} else {
-				outTargets.push(...targets);
-			}
-
-			args.push(...targets);
-
-			// ensure that user provided flags are appended last (allow use of -args ...)
-			// ignore user provided -run flag if we are already using it
-			if (args.indexOf('-run') > -1) {
-				removeRunFlag(testconfig.flags);
-			}
-			args.push(...testconfig.flags);
-
-			outTargets.push(...testconfig.flags);
-			outputChannel.appendLine(['Running tool:', goRuntimePath, ...outTargets].join(' '));
-			outputChannel.appendLine('');
-
-			const tp = cp.spawn(goRuntimePath, args, { env: testEnvVars, cwd: testconfig.dir });
-			const outBuf = new LineBuffer();
-			const errBuf = new LineBuffer();
-
-			const packageResultLineRE = /^(ok|FAIL)[ \t]+(.+?)[ \t]+([0-9\.]+s|\(cached\))/; // 1=ok/FAIL, 2=package, 3=time/(cached)
-			const testResultLines: string[] = [];
-
-			const processTestResultLine = (line: string) => {
-				if (!testconfig.includeSubDirectories) {
-					outputChannel.appendLine(expandFilePathInOutput(line, testconfig.dir));
-					return;
+		Promise.all([pkgMapPromise, getCurrentPackagePromise]).then(
+			([pkgMap, currentPackage]) => {
+				if (!pkgMap) {
+					pkgMap = new Map<string, string>();
 				}
-				testResultLines.push(line);
-				const result = line.match(packageResultLineRE);
-				if (result && (pkgMap.has(result[2]) || currentGoWorkspace)) {
-					const packageNameArr = result[2].split('/');
-					const baseDir = pkgMap.get(result[2]) || path.join(currentGoWorkspace, ...packageNameArr);
-					testResultLines.forEach((line) => outputChannel.appendLine(expandFilePathInOutput(line, baseDir)));
-					testResultLines.splice(0);
-				}
-			};
-
-			// go test emits test results on stdout, which contain file names relative to the package under test
-			outBuf.onLine((line) => processTestResultLine(line));
-			outBuf.onDone((last) => {
-				if (last) {
-					processTestResultLine(last);
+				// Use the package name to be in the args to enable running tests in symlinked directories
+				if (!testconfig.includeSubDirectories && currentPackage) {
+					targets.splice(0, 0, currentPackage);
 				}
 
-				// If there are any remaining test result lines, emit them to the output channel.
-				if (testResultLines.length > 0) {
-					testResultLines.forEach((line) => outputChannel.appendLine(line));
-				}
-			});
-
-			// go test emits build errors on stderr, which contain paths relative to the cwd
-			errBuf.onLine((line) => outputChannel.appendLine(expandFilePathInOutput(line, testconfig.dir)));
-			errBuf.onDone((last) => last && outputChannel.appendLine(expandFilePathInOutput(last, testconfig.dir)));
-
-			tp.stdout.on('data', (chunk) => outBuf.append(chunk.toString()));
-			tp.stderr.on('data', (chunk) => errBuf.append(chunk.toString()));
-
-			statusBarItem.show();
-
-			tp.on('close', (code, signal) => {
-				outBuf.done();
-				errBuf.done();
-
-				if (code) {
-					outputChannel.appendLine(`Error: ${testType} failed.`);
-				} else if (signal === sendSignal) {
-					outputChannel.appendLine(`Error: ${testType} terminated by user.`);
+				const outTargets = args.slice(0);
+				if (targets.length > 4) {
+					outTargets.push('<long arguments omitted>');
 				} else {
-					outputChannel.appendLine(`Success: ${testType} passed.`);
+					outTargets.push(...targets);
 				}
 
-				const index = runningTestProcesses.indexOf(tp, 0);
-				if (index > -1) {
-					runningTestProcesses.splice(index, 1);
+				args.push(...targets);
+
+				// ensure that user provided flags are appended last (allow use of -args ...)
+				// ignore user provided -run flag if we are already using it
+				if (args.indexOf('-run') > -1) {
+					removeRunFlag(testconfig.flags);
 				}
+				args.push(...testconfig.flags);
 
-				if (!runningTestProcesses.length) {
-					statusBarItem.hide();
-				}
+				outTargets.push(...testconfig.flags);
+				outputChannel.appendLine(['Running tool:', goRuntimePath, ...outTargets].join(' '));
+				outputChannel.appendLine('');
 
-				resolve(code === 0);
-			});
+				const tp = cp.spawn(goRuntimePath, args, { env: testEnvVars, cwd: testconfig.dir });
+				const outBuf = new LineBuffer();
+				const errBuf = new LineBuffer();
 
-			runningTestProcesses.push(tp);
+				// 1=ok/FAIL, 2=package, 3=time/(cached)
+				const packageResultLineRE = /^(ok|FAIL)[ \t]+(.+?)[ \t]+([0-9\.]+s|\(cached\))/;
+				const testResultLines: string[] = [];
 
-		}, (err) => {
-			outputChannel.appendLine(`Error: ${testType} failed.`);
-			outputChannel.appendLine(err);
-			resolve(false);
-		});
+				const processTestResultLine = (line: string) => {
+					if (!testconfig.includeSubDirectories) {
+						outputChannel.appendLine(expandFilePathInOutput(line, testconfig.dir));
+						return;
+					}
+					testResultLines.push(line);
+					const result = line.match(packageResultLineRE);
+					if (result && (pkgMap.has(result[2]) || currentGoWorkspace)) {
+						const packageNameArr = result[2].split('/');
+						const baseDir = pkgMap.get(result[2]) || path.join(currentGoWorkspace, ...packageNameArr);
+						testResultLines.forEach((line) =>
+							outputChannel.appendLine(expandFilePathInOutput(line, baseDir))
+						);
+						testResultLines.splice(0);
+					}
+				};
+
+				// go test emits test results on stdout, which contain file names relative to the package under test
+				outBuf.onLine((line) => processTestResultLine(line));
+				outBuf.onDone((last) => {
+					if (last) {
+						processTestResultLine(last);
+					}
+
+					// If there are any remaining test result lines, emit them to the output channel.
+					if (testResultLines.length > 0) {
+						testResultLines.forEach((line) => outputChannel.appendLine(line));
+					}
+				});
+
+				// go test emits build errors on stderr, which contain paths relative to the cwd
+				errBuf.onLine((line) => outputChannel.appendLine(expandFilePathInOutput(line, testconfig.dir)));
+				errBuf.onDone((last) => last && outputChannel.appendLine(expandFilePathInOutput(last, testconfig.dir)));
+
+				tp.stdout.on('data', (chunk) => outBuf.append(chunk.toString()));
+				tp.stderr.on('data', (chunk) => errBuf.append(chunk.toString()));
+
+				statusBarItem.show();
+
+				tp.on('close', (code, signal) => {
+					outBuf.done();
+					errBuf.done();
+
+					if (code) {
+						outputChannel.appendLine(`Error: ${testType} failed.`);
+					} else if (signal === sendSignal) {
+						outputChannel.appendLine(`Error: ${testType} terminated by user.`);
+					} else {
+						outputChannel.appendLine(`Success: ${testType} passed.`);
+					}
+
+					const index = runningTestProcesses.indexOf(tp, 0);
+					if (index > -1) {
+						runningTestProcesses.splice(index, 1);
+					}
+
+					if (!runningTestProcesses.length) {
+						statusBarItem.hide();
+					}
+
+					resolve(code === 0);
+				});
+
+				runningTestProcesses.push(tp);
+			},
+			(err) => {
+				outputChannel.appendLine(`Error: ${testType} failed.`);
+				outputChannel.appendLine(err);
+				resolve(false);
+			}
+		);
 	});
 	if (testconfig.applyCodeCoverage) {
 		await applyCodeCoverageToAllEditors(tmpCoverPath, testconfig.dir);
diff --git a/src/util.ts b/src/util.ts
index 102ade5..a625d09 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -12,7 +12,13 @@
 import { NearestNeighborDict, Node } from './avlTree';
 import { buildDiagnosticCollection, lintDiagnosticCollection, vetDiagnosticCollection } from './goMain';
 import { getCurrentPackage } from './goModules';
-import { envPath, fixDriveCasingInWindows, getBinPathWithPreferredGopath, getInferredGopath, resolveHomeDir } from './goPath';
+import {
+	envPath,
+	fixDriveCasingInWindows,
+	getBinPathWithPreferredGopath,
+	getInferredGopath,
+	resolveHomeDir
+} from './goPath';
 import { outputChannel } from './goStatus';
 import { extensionId, sendTelemetryEventForGoVersion, sendTelemetryEventForKillingProcess } from './telemetry';
 
@@ -179,7 +185,7 @@
 //     ["foo", "bar string", "baz string"]
 // Takes care of balancing parens so to not get confused by signatures like:
 //     (pattern string, handler func(ResponseWriter, *Request)) {
-export function getParametersAndReturnType(signature: string): { params: string[], returnType: string } {
+export function getParametersAndReturnType(signature: string): { params: string[]; returnType: string } {
 	const params: string[] = [];
 	let parenCount = 0;
 	let lastStart = 1;
@@ -226,8 +232,10 @@
 		// In case of nested workspaces, (example: both /Users/me and /Users/me/a/b/c are in $GOPATH)
 		// both parent & child workspace in the nested workspaces pair can make it inside the above if block
 		// Therefore, the below check will take longer (more specific to current file) of the two
-		if (filenameLowercase.substring(0, workspace.length) === workspace.toLowerCase()
-			&& (!currentWorkspace || workspace.length > currentWorkspace.length)) {
+		if (
+			filenameLowercase.substring(0, workspace.length) === workspace.toLowerCase() &&
+			(!currentWorkspace || workspace.length > currentWorkspace.length)
+		) {
 			currentWorkspace = workspace;
 		}
 	}
@@ -251,8 +259,8 @@
 	}
 
 	/* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
-		* integers. Since we want the results to be always positive, convert the
-		* signed int to an unsigned by doing an unsigned bitshift. */
+	 * integers. Since we want the results to be always positive, convert the
+	 * signed int to an unsigned by doing an unsigned bitshift. */
 	return hash >>> 0;
 }
 
@@ -276,7 +284,9 @@
 	const goRuntimePath = getBinPath('go');
 
 	if (!goRuntimePath) {
-		console.warn(`Failed to run "go version" as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`);
+		console.warn(
+			`Failed to run "go version" as the "go" binary cannot be found in either GOROOT(${process.env['GOROOT']}) or PATH(${envPath})`
+		);
 		return Promise.resolve(null);
 	}
 	if (goVersion && (goVersion.sv || goVersion.isDevel)) {
@@ -290,7 +300,9 @@
 				if (err || stderr) {
 					console.log(`Error when running the command "${goRuntimePath} version": `, err || stderr);
 				} else {
-					console.log(`Not able to determine version from the output of the command "${goRuntimePath} version": ${stdout}`);
+					console.log(
+						`Not able to determine version from the output of the command "${goRuntimePath} version": ${stdout}`
+					);
 				}
 			}
 			return resolve(goVersion);
@@ -314,7 +326,11 @@
 			vendorSupport = false;
 			break;
 		case 1:
-			vendorSupport = (goVersion.sv.minor > 6 || ((goVersion.sv.minor === 5 || goVersion.sv.minor === 6) && process.env['GO15VENDOREXPERIMENT'] === '1')) ? true : false;
+			vendorSupport =
+				goVersion.sv.minor > 6 ||
+				((goVersion.sv.minor === 5 || goVersion.sv.minor === 6) && process.env['GO15VENDOREXPERIMENT'] === '1')
+					? true
+					: false;
 			break;
 		default:
 			vendorSupport = true;
@@ -329,11 +345,16 @@
  */
 export function isGoPathSet(): boolean {
 	if (!getCurrentGoPath()) {
-		vscode.window.showInformationMessage('Set GOPATH environment variable and restart VS Code or set GOPATH in Workspace settings', 'Set GOPATH in Workspace Settings').then((selected) => {
-			if (selected === 'Set GOPATH in Workspace Settings') {
-				vscode.commands.executeCommand('workbench.action.openWorkspaceSettings');
-			}
-		});
+		vscode.window
+			.showInformationMessage(
+				'Set GOPATH environment variable and restart VS Code or set GOPATH in Workspace settings',
+				'Set GOPATH in Workspace Settings'
+			)
+			.then((selected) => {
+				if (selected === 'Set GOPATH in Workspace Settings') {
+					vscode.commands.executeCommand('workbench.action.openWorkspaceSettings');
+				}
+			});
 		return false;
 	}
 
@@ -371,7 +392,11 @@
 	if (toolsGopathForWorkspace.startsWith('~')) {
 		toolsGopathForWorkspace = path.join(os.homedir(), toolsGopathForWorkspace.substr(1));
 	}
-	if (toolsGopathForWorkspace && toolsGopathForWorkspace.trim() && !/\${workspaceFolder}|\${workspaceRoot}/.test(toolsGopathForWorkspace)) {
+	if (
+		toolsGopathForWorkspace &&
+		toolsGopathForWorkspace.trim() &&
+		!/\${workspaceFolder}|\${workspaceRoot}/.test(toolsGopathForWorkspace)
+	) {
 		return toolsGopathForWorkspace;
 	}
 
@@ -391,8 +416,8 @@
 
 	return getBinPathWithPreferredGopath(
 		tool,
-		(tool === 'go') ? [] : [getToolsGopath(), getCurrentGoPath()],
-		resolvePath(alternateToolPath),
+		tool === 'go' ? [] : [getToolsGopath(), getCurrentGoPath()],
+		resolvePath(alternateToolPath)
 	);
 }
 
@@ -409,7 +434,11 @@
 	const envVars = Object.assign({}, process.env, gopath ? { GOPATH: gopath } : {});
 
 	if (toolsEnvVars && typeof toolsEnvVars === 'object') {
-		Object.keys(toolsEnvVars).forEach((key) => envVars[key] = typeof toolsEnvVars[key] === 'string' ? resolvePath(toolsEnvVars[key]) : toolsEnvVars[key]);
+		Object.keys(toolsEnvVars).forEach(
+			(key) =>
+				(envVars[key] =
+					typeof toolsEnvVars[key] === 'string' ? resolvePath(toolsEnvVars[key]) : toolsEnvVars[key])
+		);
 	}
 
 	return envVars;
@@ -448,7 +477,7 @@
 	}
 
 	const configGopath = config['gopath'] ? resolvePath(substituteEnv(config['gopath']), currentRoot) : '';
-	currentGopath = inferredGopath ? inferredGopath : (configGopath || process.env['GOPATH']);
+	currentGopath = inferredGopath ? inferredGopath : configGopath || process.env['GOPATH'];
 	return currentGopath;
 }
 
@@ -463,14 +492,16 @@
 	if (!pkgJSON.contributes || !pkgJSON.contributes.commands) {
 		return;
 	}
-	const extensionCommands: any[] = vscode.extensions.getExtension(extensionId).packageJSON.contributes.commands.filter((x: any) => x.command !== 'go.show.commands');
+	const extensionCommands: any[] = vscode.extensions
+		.getExtension(extensionId)
+		.packageJSON.contributes.commands.filter((x: any) => x.command !== 'go.show.commands');
 	return extensionCommands;
 }
 
 export class LineBuffer {
 	private buf: string = '';
-	private lineListeners: { (line: string): void; }[] = [];
-	private lastListeners: { (last: string): void; }[] = [];
+	private lineListeners: { (line: string): void }[] = [];
+	private lastListeners: { (last: string): void }[] = [];
 
 	public append(chunk: string) {
 		this.buf += chunk;
@@ -521,7 +552,9 @@
 	}
 
 	if (!workspaceFolder && vscode.workspace.workspaceFolders) {
-		workspaceFolder = getWorkspaceFolderPath(vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri);
+		workspaceFolder = getWorkspaceFolderPath(
+			vscode.window.activeTextEditor && vscode.window.activeTextEditor.document.uri
+		);
 	}
 
 	if (workspaceFolder) {
@@ -569,7 +602,6 @@
  */
 export function guessPackageNameFromFile(filePath: string): Promise<string[]> {
 	return new Promise((resolve, reject) => {
-
 		const goFilename = path.basename(filePath);
 		if (goFilename === 'main.go') {
 			return resolve(['main']);
@@ -617,7 +649,16 @@
  * @param toolName The name of the Go tool to run. If none is provided, the go runtime itself is used
  * @param printUnexpectedOutput If true, then output that doesnt match expected format is printed to the output channel
  */
-export function runTool(args: string[], cwd: string, severity: string, useStdErr: boolean, toolName: string, env: any, printUnexpectedOutput: boolean, token?: vscode.CancellationToken): Promise<ICheckResult[]> {
+export function runTool(
+	args: string[],
+	cwd: string,
+	severity: string,
+	useStdErr: boolean,
+	toolName: string,
+	env: any,
+	printUnexpectedOutput: boolean,
+	token?: vscode.CancellationToken
+): Promise<ICheckResult[]> {
 	let cmd: string;
 	if (toolName) {
 		cmd = getBinPath(toolName);
@@ -678,7 +719,10 @@
 					// Building skips vendor folders,
 					// But vet and lint take in directories and not import paths, so no way to skip them
 					// So prune out the results from vendor folders here.
-					if (!path.isAbsolute(file) && (file.startsWith(`vendor${path.sep}`) || file.indexOf(`${path.sep}vendor${path.sep}`) > -1)) {
+					if (
+						!path.isAbsolute(file) &&
+						(file.startsWith(`vendor${path.sep}`) || file.indexOf(`${path.sep}vendor${path.sep}`) > -1)
+					) {
 						continue;
 					}
 
@@ -707,8 +751,11 @@
 	});
 }
 
-export function handleDiagnosticErrors(document: vscode.TextDocument, errors: ICheckResult[], diagnosticCollection: vscode.DiagnosticCollection) {
-
+export function handleDiagnosticErrors(
+	document: vscode.TextDocument,
+	errors: ICheckResult[],
+	diagnosticCollection: vscode.DiagnosticCollection
+) {
 	diagnosticCollection.clear();
 
 	const diagnosticMap: Map<string, vscode.Diagnostic[]> = new Map();
@@ -717,7 +764,12 @@
 		let startColumn = 0;
 		let endColumn = 1;
 		if (document && document.uri.toString() === canonicalFile) {
-			const range = new vscode.Range(error.line - 1, 0, error.line - 1, document.lineAt(error.line - 1).range.end.character + 1);
+			const range = new vscode.Range(
+				error.line - 1,
+				0,
+				error.line - 1,
+				document.lineAt(error.line - 1).range.end.character + 1
+			);
 			const text = document.getText(range);
 			const [_, leading, trailing] = /^(\s*).*(\s*)$/.exec(text);
 			if (!error.col) {
@@ -745,11 +797,17 @@
 		if (diagnosticCollection === buildDiagnosticCollection) {
 			// If there are lint/vet warnings on current file, remove the ones co-inciding with the new build errors
 			if (lintDiagnosticCollection.has(fileUri)) {
-				lintDiagnosticCollection.set(fileUri, deDupeDiagnostics(newDiagnostics, lintDiagnosticCollection.get(fileUri).slice()));
+				lintDiagnosticCollection.set(
+					fileUri,
+					deDupeDiagnostics(newDiagnostics, lintDiagnosticCollection.get(fileUri).slice())
+				);
 			}
 
 			if (vetDiagnosticCollection.has(fileUri)) {
-				vetDiagnosticCollection.set(fileUri, deDupeDiagnostics(newDiagnostics, vetDiagnosticCollection.get(fileUri).slice()));
+				vetDiagnosticCollection.set(
+					fileUri,
+					deDupeDiagnostics(newDiagnostics, vetDiagnosticCollection.get(fileUri).slice())
+				);
 			}
 		} else if (buildDiagnosticCollection.has(fileUri)) {
 			// If there are build errors on current file, ignore the new lint/vet warnings co-inciding with them
@@ -759,16 +817,22 @@
 	});
 }
 
-function deDupeDiagnostics(buildDiagnostics: vscode.Diagnostic[], otherDiagnostics: vscode.Diagnostic[]): vscode.Diagnostic[] {
+function deDupeDiagnostics(
+	buildDiagnostics: vscode.Diagnostic[],
+	otherDiagnostics: vscode.Diagnostic[]
+): vscode.Diagnostic[] {
 	const buildDiagnosticsLines = buildDiagnostics.map((x) => x.range.start.line);
 	return otherDiagnostics.filter((x) => buildDiagnosticsLines.indexOf(x.range.start.line) === -1);
 }
 
 function mapSeverityToVSCodeSeverity(sev: string): vscode.DiagnosticSeverity {
 	switch (sev) {
-		case 'error': return vscode.DiagnosticSeverity.Error;
-		case 'warning': return vscode.DiagnosticSeverity.Warning;
-		default: return vscode.DiagnosticSeverity.Error;
+		case 'error':
+			return vscode.DiagnosticSeverity.Error;
+		case 'warning':
+			return vscode.DiagnosticSeverity.Warning;
+		default:
+			return vscode.DiagnosticSeverity.Error;
 	}
 }
 
@@ -799,7 +863,6 @@
 					sendTelemetryEventForKillingProcess(e.message, matches);
 				}
 			}
-
 		}
 	}
 }
@@ -895,7 +958,13 @@
  * @param symbol Symbol for which docs need to be found
  * @param token Cancellation token
  */
-export function runGodoc(cwd: string, packagePath: string, receiver: string, symbol: string, token: vscode.CancellationToken) {
+export function runGodoc(
+	cwd: string,
+	packagePath: string,
+	receiver: string,
+	symbol: string,
+	token: vscode.CancellationToken
+) {
 	if (!packagePath) {
 		return Promise.reject(new Error('Package Path not provided'));
 	}
@@ -908,7 +977,9 @@
 		return Promise.reject(new Error('Cannot find "go" binary. Update PATH or GOROOT appropriately'));
 	}
 
-	const getCurrentPackagePromise = path.isAbsolute(packagePath) ? getCurrentPackage(packagePath) : Promise.resolve(packagePath);
+	const getCurrentPackagePromise = path.isAbsolute(packagePath)
+		? getCurrentPackage(packagePath)
+		: Promise.resolve(packagePath);
 	return getCurrentPackagePromise.then((packageImportPath) => {
 		return new Promise<string>((resolve, reject) => {
 			if (receiver) {
diff --git a/test/integration/extension.test.ts b/test/integration/extension.test.ts
index 027acc1..a3b5b1e 100644
--- a/test/integration/extension.test.ts
+++ b/test/integration/extension.test.ts
@@ -13,7 +13,11 @@
 import { GoDefinitionProvider } from '../../src/goDeclaration';
 import { GoHoverProvider } from '../../src/goExtraInfo';
 import { runFillStruct } from '../../src/goFillStruct';
-import { generateTestCurrentFile, generateTestCurrentFunction, generateTestCurrentPackage } from '../../src/goGenerateTests';
+import {
+	generateTestCurrentFile,
+	generateTestCurrentFunction,
+	generateTestCurrentPackage
+} from '../../src/goGenerateTests';
 import { getTextEditForAddImport, listPackages } from '../../src/goImport';
 import { documentSymbols, GoDocumentSymbolProvider, GoOutlineImportsOptions } from '../../src/goOutline';
 import { getAllPackages } from '../../src/goPackages';
@@ -22,7 +26,15 @@
 import { GoCompletionItemProvider } from '../../src/goSuggest';
 import { getWorkspaceSymbols } from '../../src/goSymbol';
 import { testCurrentFile } from '../../src/goTest';
-import { getBinPath, getCurrentGoPath, getGoVersion, getImportPath, getToolsGopath, ICheckResult, isVendorSupported } from '../../src/util';
+import {
+	getBinPath,
+	getCurrentGoPath,
+	getGoVersion,
+	getImportPath,
+	getToolsGopath,
+	ICheckResult,
+	isVendorSupported
+} from '../../src/util';
 
 suite('Go Extension Tests', () => {
 	const gopath = getCurrentGoPath();
@@ -41,41 +53,133 @@
 	const toolsGopath = getToolsGopath() || getCurrentGoPath();
 
 	suiteSetup(() => {
-
 		fs.removeSync(repoPath);
 		fs.removeSync(testPath);
 		fs.copySync(path.join(fixtureSourcePath, 'baseTest', 'test.go'), path.join(fixturePath, 'baseTest', 'test.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'baseTest', 'sample_test.go'), path.join(fixturePath, 'baseTest', 'sample_test.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'errorsTest', 'errors.go'), path.join(fixturePath, 'errorsTest', 'errors.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'gogetdocTestData', 'test.go'), path.join(fixturePath, 'gogetdocTestData', 'test.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'), path.join(generateTestsSourcePath, 'generatetests.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'), path.join(generateFunctionTestSourcePath, 'generatetests.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'), path.join(generatePackageTestSourcePath, 'generatetests.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'diffTestData', 'file1.go'), path.join(fixturePath, 'diffTest1Data', 'file1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'diffTestData', 'file2.go'), path.join(fixturePath, 'diffTest1Data', 'file2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'diffTestData', 'file1.go'), path.join(fixturePath, 'diffTest2Data', 'file1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'diffTestData', 'file2.go'), path.join(fixturePath, 'diffTest2Data', 'file2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'linterTest', 'linter_1.go'), path.join(fixturePath, 'linterTest', 'linter_1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'linterTest', 'linter_2.go'), path.join(fixturePath, 'linterTest', 'linter_2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'errorsTest', 'errors.go'), path.join(testPath, 'errorsTest', 'errors.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'linterTest', 'linter_1.go'), path.join(testPath, 'linterTest', 'linter_1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'linterTest', 'linter_2.go'), path.join(testPath, 'linterTest', 'linter_2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'buildTags', 'hello.go'), path.join(fixturePath, 'buildTags', 'hello.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'testTags', 'hello_test.go'), path.join(fixturePath, 'testTags', 'hello_test.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'completions', 'unimportedPkgs.go'), path.join(fixturePath, 'completions', 'unimportedPkgs.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'completions', 'unimportedMultiplePkgs.go'), path.join(fixturePath, 'completions', 'unimportedMultiplePkgs.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'completions', 'snippets.go'), path.join(fixturePath, 'completions', 'snippets.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'completions', 'nosnippets.go'), path.join(fixturePath, 'completions', 'nosnippets.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'completions', 'exportedMemberDocs.go'), path.join(fixturePath, 'completions', 'exportedMemberDocs.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'importTest', 'noimports.go'), path.join(fixturePath, 'importTest', 'noimports.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'importTest', 'groupImports.go'), path.join(fixturePath, 'importTest', 'groupImports.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'importTest', 'singleImports.go'), path.join(fixturePath, 'importTest', 'singleImports.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'fillStruct', 'input_1.go'), path.join(fixturePath, 'fillStruct', 'input_1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'fillStruct', 'golden_1.go'), path.join(fixturePath, 'fillStruct', 'golden_1.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'fillStruct', 'input_2.go'), path.join(fixturePath, 'fillStruct', 'input_2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'fillStruct', 'golden_2.go'), path.join(fixturePath, 'fillStruct', 'golden_2.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'fillStruct', 'input_2.go'), path.join(fixturePath, 'fillStruct', 'input_3.go'));
-		fs.copySync(path.join(fixtureSourcePath, 'outlineTest', 'test.go'), path.join(fixturePath, 'outlineTest', 'test.go'));
+		fs.copySync(
+			path.join(fixtureSourcePath, 'baseTest', 'sample_test.go'),
+			path.join(fixturePath, 'baseTest', 'sample_test.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'errorsTest', 'errors.go'),
+			path.join(fixturePath, 'errorsTest', 'errors.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'gogetdocTestData', 'test.go'),
+			path.join(fixturePath, 'gogetdocTestData', 'test.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'),
+			path.join(generateTestsSourcePath, 'generatetests.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'),
+			path.join(generateFunctionTestSourcePath, 'generatetests.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'generatetests', 'generatetests.go'),
+			path.join(generatePackageTestSourcePath, 'generatetests.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'diffTestData', 'file1.go'),
+			path.join(fixturePath, 'diffTest1Data', 'file1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'diffTestData', 'file2.go'),
+			path.join(fixturePath, 'diffTest1Data', 'file2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'diffTestData', 'file1.go'),
+			path.join(fixturePath, 'diffTest2Data', 'file1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'diffTestData', 'file2.go'),
+			path.join(fixturePath, 'diffTest2Data', 'file2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'linterTest', 'linter_1.go'),
+			path.join(fixturePath, 'linterTest', 'linter_1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'linterTest', 'linter_2.go'),
+			path.join(fixturePath, 'linterTest', 'linter_2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'errorsTest', 'errors.go'),
+			path.join(testPath, 'errorsTest', 'errors.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'linterTest', 'linter_1.go'),
+			path.join(testPath, 'linterTest', 'linter_1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'linterTest', 'linter_2.go'),
+			path.join(testPath, 'linterTest', 'linter_2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'buildTags', 'hello.go'),
+			path.join(fixturePath, 'buildTags', 'hello.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'testTags', 'hello_test.go'),
+			path.join(fixturePath, 'testTags', 'hello_test.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'completions', 'unimportedPkgs.go'),
+			path.join(fixturePath, 'completions', 'unimportedPkgs.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'completions', 'unimportedMultiplePkgs.go'),
+			path.join(fixturePath, 'completions', 'unimportedMultiplePkgs.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'completions', 'snippets.go'),
+			path.join(fixturePath, 'completions', 'snippets.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'completions', 'nosnippets.go'),
+			path.join(fixturePath, 'completions', 'nosnippets.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'completions', 'exportedMemberDocs.go'),
+			path.join(fixturePath, 'completions', 'exportedMemberDocs.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'importTest', 'noimports.go'),
+			path.join(fixturePath, 'importTest', 'noimports.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'importTest', 'groupImports.go'),
+			path.join(fixturePath, 'importTest', 'groupImports.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'importTest', 'singleImports.go'),
+			path.join(fixturePath, 'importTest', 'singleImports.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'fillStruct', 'input_1.go'),
+			path.join(fixturePath, 'fillStruct', 'input_1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'fillStruct', 'golden_1.go'),
+			path.join(fixturePath, 'fillStruct', 'golden_1.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'fillStruct', 'input_2.go'),
+			path.join(fixturePath, 'fillStruct', 'input_2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'fillStruct', 'golden_2.go'),
+			path.join(fixturePath, 'fillStruct', 'golden_2.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'fillStruct', 'input_2.go'),
+			path.join(fixturePath, 'fillStruct', 'input_3.go')
+		);
+		fs.copySync(
+			path.join(fixtureSourcePath, 'outlineTest', 'test.go'),
+			path.join(fixturePath, 'outlineTest', 'test.go')
+		);
 	});
 
 	suiteTeardown(() => {
@@ -90,7 +194,11 @@
 		try {
 			const textDocument = await vscode.workspace.openTextDocument(uri);
 			const definitionInfo = await provider.provideDefinition(textDocument, position, null);
-			assert.equal(definitionInfo.uri.path.toLowerCase(), uri.path.toLowerCase(), `${definitionInfo.uri.path} is not the same as ${uri.path}`);
+			assert.equal(
+				definitionInfo.uri.path.toLowerCase(),
+				uri.path.toLowerCase(),
+				`${definitionInfo.uri.path} is not the same as ${uri.path}`
+			);
 			assert.equal(definitionInfo.range.start.line, 6);
 			assert.equal(definitionInfo.range.start.character, 5);
 		} catch (err) {
@@ -99,21 +207,29 @@
 		}
 	}
 
-	async function testSignatureHelpProvider(goConfig: vscode.WorkspaceConfiguration, testCases: [vscode.Position, string, string, string[]][]): Promise<any> {
+	async function testSignatureHelpProvider(
+		goConfig: vscode.WorkspaceConfiguration,
+		testCases: [vscode.Position, string, string, string[]][]
+	): Promise<any> {
 		const provider = new GoSignatureHelpProvider(goConfig);
 		const uri = vscode.Uri.file(path.join(fixturePath, 'gogetdocTestData', 'test.go'));
 		try {
 			const textDocument = await vscode.workspace.openTextDocument(uri);
-			const promises = testCases.map(([position, expected, expectedDoc, expectedParams]) => provider.provideSignatureHelp(textDocument, position, null).then((sigHelp) => {
-				assert.ok(sigHelp, `No signature for gogetdocTestData/test.go:${position.line + 1}:${position.character + 1}`);
-				assert.equal(sigHelp.signatures.length, 1, 'unexpected number of overloads');
-				assert.equal(sigHelp.signatures[0].label, expected);
-				assert.equal(sigHelp.signatures[0].documentation, expectedDoc);
-				assert.equal(sigHelp.signatures[0].parameters.length, expectedParams.length);
-				for (let i = 0; i < expectedParams.length; i++) {
-					assert.equal(sigHelp.signatures[0].parameters[i].label, expectedParams[i]);
-				}
-			}));
+			const promises = testCases.map(([position, expected, expectedDoc, expectedParams]) =>
+				provider.provideSignatureHelp(textDocument, position, null).then((sigHelp) => {
+					assert.ok(
+						sigHelp,
+						`No signature for gogetdocTestData/test.go:${position.line + 1}:${position.character + 1}`
+					);
+					assert.equal(sigHelp.signatures.length, 1, 'unexpected number of overloads');
+					assert.equal(sigHelp.signatures[0].label, expected);
+					assert.equal(sigHelp.signatures[0].documentation, expectedDoc);
+					assert.equal(sigHelp.signatures[0].parameters.length, expectedParams.length);
+					for (let i = 0; i < expectedParams.length; i++) {
+						assert.equal(sigHelp.signatures[0].parameters[i].label, expectedParams[i]);
+					}
+				})
+			);
 			return Promise.all(promises);
 		} catch (err) {
 			assert.ok(false, `error in OpenTextDocument ${err}`);
@@ -121,23 +237,28 @@
 		}
 	}
 
-	async function testHoverProvider(goConfig: vscode.WorkspaceConfiguration, testCases: [vscode.Position, string, string][]): Promise<any> {
+	async function testHoverProvider(
+		goConfig: vscode.WorkspaceConfiguration,
+		testCases: [vscode.Position, string, string][]
+	): Promise<any> {
 		const provider = new GoHoverProvider(goConfig);
 		const uri = vscode.Uri.file(path.join(fixturePath, 'gogetdocTestData', 'test.go'));
 		try {
 			const textDocument = await vscode.workspace.openTextDocument(uri);
-			const promises = testCases.map(([position, expectedSignature, expectedDocumentation]) => provider.provideHover(textDocument, position, null).then((res) => {
-				if (expectedSignature === null && expectedDocumentation === null) {
-					assert.equal(res, null);
-					return;
-				}
-				let expectedHover = '\n```go\n' + expectedSignature + '\n```\n';
-				if (expectedDocumentation != null) {
-					expectedHover += expectedDocumentation;
-				}
-				assert.equal(res.contents.length, 1);
-				assert.equal((<vscode.MarkdownString>res.contents[0]).value, expectedHover);
-			}));
+			const promises = testCases.map(([position, expectedSignature, expectedDocumentation]) =>
+				provider.provideHover(textDocument, position, null).then((res) => {
+					if (expectedSignature === null && expectedDocumentation === null) {
+						assert.equal(res, null);
+						return;
+					}
+					let expectedHover = '\n```go\n' + expectedSignature + '\n```\n';
+					if (expectedDocumentation != null) {
+						expectedHover += expectedDocumentation;
+					}
+					assert.equal(res.contents.length, 1);
+					assert.equal((<vscode.MarkdownString>res.contents[0]).value, expectedHover);
+				})
+			);
 			return Promise.all(promises);
 		} catch (err) {
 			assert.ok(false, `error in OpenTextDocument ${err}`);
@@ -171,10 +292,30 @@
 `;
 
 		const testCases: [vscode.Position, string, string, string[]][] = [
-			[new vscode.Position(19, 13), 'Println(a ...interface{}) (n int, err error)', printlnDoc, ['a ...interface{}']],
-			[new vscode.Position(23, 7), 'print(txt string)', 'This is an unexported function so couldn\'t get this comment on hover :( Not\nanymore!!\n', ['txt string']],
-			[new vscode.Position(41, 19), 'Hello(s string, exclaim bool) string', 'Hello is a method on the struct ABC. Will signature help understand this\ncorrectly\n', ['s string', 'exclaim bool']],
-			[new vscode.Position(41, 47), 'EmptyLine(s string) string', 'EmptyLine has docs\n\nwith a blank line in the middle\n', ['s string']]
+			[
+				new vscode.Position(19, 13),
+				'Println(a ...interface{}) (n int, err error)',
+				printlnDoc,
+				['a ...interface{}']
+			],
+			[
+				new vscode.Position(23, 7),
+				'print(txt string)',
+				`This is an unexported function so couldn't get this comment on hover :( Not\nanymore!!\n`,
+				['txt string']
+			],
+			[
+				new vscode.Position(41, 19),
+				'Hello(s string, exclaim bool) string',
+				'Hello is a method on the struct ABC. Will signature help understand this\ncorrectly\n',
+				['s string', 'exclaim bool']
+			],
+			[
+				new vscode.Position(41, 47),
+				'EmptyLine(s string) string',
+				'EmptyLine has docs\n\nwith a blank line in the middle\n',
+				['s string']
+			]
 		];
 		const config = Object.create(vscode.workspace.getConfiguration('go'), {
 			docsTool: { value: 'godoc' }
@@ -193,10 +334,30 @@
 It returns the number of bytes written and any write error encountered.
 `;
 		const testCases: [vscode.Position, string, string, string[]][] = [
-			[new vscode.Position(19, 13), 'Println(a ...interface{}) (n int, err error)', printlnDoc, ['a ...interface{}']],
-			[new vscode.Position(23, 7), 'print(txt string)', 'This is an unexported function so couldn\'t get this comment on hover :(\nNot anymore!!\n', ['txt string']],
-			[new vscode.Position(41, 19), 'Hello(s string, exclaim bool) string', 'Hello is a method on the struct ABC. Will signature help understand this correctly\n', ['s string', 'exclaim bool']],
-			[new vscode.Position(41, 47), 'EmptyLine(s string) string', 'EmptyLine has docs\n\nwith a blank line in the middle\n', ['s string']]
+			[
+				new vscode.Position(19, 13),
+				'Println(a ...interface{}) (n int, err error)',
+				printlnDoc,
+				['a ...interface{}']
+			],
+			[
+				new vscode.Position(23, 7),
+				'print(txt string)',
+				`This is an unexported function so couldn't get this comment on hover :(\nNot anymore!!\n`,
+				['txt string']
+			],
+			[
+				new vscode.Position(41, 19),
+				'Hello(s string, exclaim bool) string',
+				'Hello is a method on the struct ABC. Will signature help understand this correctly\n',
+				['s string', 'exclaim bool']
+			],
+			[
+				new vscode.Position(41, 47),
+				'EmptyLine(s string) string',
+				'EmptyLine has docs\n\nwith a blank line in the middle\n',
+				['s string']
+			]
 		];
 		const config = Object.create(vscode.workspace.getConfiguration('go'), {
 			docsTool: { value: 'gogetdoc' }
@@ -219,7 +380,11 @@
 			[new vscode.Position(22, 5), 'main func()', '\n'],
 			[new vscode.Position(40, 23), 'import (math "math")', null],
 			[new vscode.Position(19, 6), 'Println func(a ...interface{}) (n int, err error)', printlnDoc],
-			[new vscode.Position(23, 4), 'print func(txt string)', 'This is an unexported function so couldn\'t get this comment on hover :( Not\nanymore!!\n']
+			[
+				new vscode.Position(23, 4),
+				'print func(txt string)',
+				`This is an unexported function so couldn't get this comment on hover :( Not\nanymore!!\n`
+			]
 		];
 		const config = Object.create(vscode.workspace.getConfiguration('go'), {
 			docsTool: { value: 'godoc' }
@@ -243,11 +408,27 @@
 			[new vscode.Position(20, 0), null, null], // just a }
 			[new vscode.Position(28, 16), null, null], // inside a number
 			[new vscode.Position(22, 5), 'func main()', ''],
-			[new vscode.Position(23, 4), 'func print(txt string)', 'This is an unexported function so couldn\'t get this comment on hover :(\nNot anymore!!\n'],
-			[new vscode.Position(40, 23), 'package math', 'Package math provides basic constants and mathematical functions.\n\nThis package does not guarantee bit-identical results across architectures.\n'],
+			[
+				new vscode.Position(23, 4),
+				'func print(txt string)',
+				`This is an unexported function so couldn't get this comment on hover :(\nNot anymore!!\n`
+			],
+			[
+				new vscode.Position(40, 23),
+				'package math',
+				'Package math provides basic constants and mathematical functions.\n\nThis package does not guarantee bit-identical results across architectures.\n'
+			],
 			[new vscode.Position(19, 6), 'func Println(a ...interface{}) (n int, err error)', printlnDoc],
-			[new vscode.Position(27, 14), 'type ABC struct {\n    a int\n    b int\n    c int\n}', 'ABC is a struct, you coudn\'t use Goto Definition or Hover info on this before\nNow you can due to gogetdoc and go doc\n'],
-			[new vscode.Position(28, 6), 'func IPv4Mask(a, b, c, d byte) IPMask', 'IPv4Mask returns the IP mask (in 4-byte form) of the\nIPv4 mask a.b.c.d.\n']
+			[
+				new vscode.Position(27, 14),
+				'type ABC struct {\n    a int\n    b int\n    c int\n}',
+				`ABC is a struct, you coudn't use Goto Definition or Hover info on this before\nNow you can due to gogetdoc and go doc\n`
+			],
+			[
+				new vscode.Position(28, 6),
+				'func IPv4Mask(a, b, c, d byte) IPMask',
+				'IPv4Mask returns the IP mask (in 4-byte form) of the\nIPv4 mask a.b.c.d.\n'
+			]
 		];
 		const config = Object.create(vscode.workspace.getConfiguration('go'), {
 			docsTool: { value: 'gogetdoc' }
@@ -262,27 +443,38 @@
 			lintOnSave: { value: 'package' },
 			lintTool: { value: 'golint' },
 			lintFlags: { value: [] },
-			buildOnSave: { value: 'package' },
+			buildOnSave: { value: 'package' }
 		});
 		const expected = [
-			{ line: 7, severity: 'warning', msg: 'exported function Print2 should have comment or be unexported' },
-			{ line: 11, severity: 'error', msg: 'undefined: prin' },
+			{
+				line: 7,
+				severity: 'warning',
+				msg: 'exported function Print2 should have comment or be unexported'
+			},
+			{ line: 11, severity: 'error', msg: 'undefined: prin' }
 		];
-		getGoVersion().then(async (version) => {
-			const diagnostics = await check(vscode.Uri.file(path.join(fixturePath, 'errorsTest', 'errors.go')), config);
-			const sortedDiagnostics = ([] as ICheckResult[])
-				.concat.apply([], diagnostics.map((x) => x.errors))
-				.sort((a: any, b: any) => a.line - b.line);
-			assert.equal(sortedDiagnostics.length > 0, true, `Failed to get linter results`);
-			const matchCount = expected.filter((expectedItem) => {
-				return sortedDiagnostics.some((diag: any) => {
-					return expectedItem.line === diag.line
-						&& expectedItem.severity === diag.severity
-						&& expectedItem.msg === diag.msg;
+		getGoVersion()
+			.then(async (version) => {
+				const diagnostics = await check(
+					vscode.Uri.file(path.join(fixturePath, 'errorsTest', 'errors.go')),
+					config
+				);
+				const sortedDiagnostics = ([] as ICheckResult[]).concat
+					.apply([], diagnostics.map((x) => x.errors))
+					.sort((a: any, b: any) => a.line - b.line);
+				assert.equal(sortedDiagnostics.length > 0, true, `Failed to get linter results`);
+				const matchCount = expected.filter((expectedItem) => {
+					return sortedDiagnostics.some((diag: any) => {
+						return (
+							expectedItem.line === diag.line &&
+							expectedItem.severity === diag.severity &&
+							expectedItem.msg === diag.msg
+						);
+					});
 				});
-			});
-			assert.equal(matchCount.length >= expected.length, true, `Failed to match expected errors`);
-		}).then(() => done(), done);
+				assert.equal(matchCount.length >= expected.length, true, `Failed to match expected errors`);
+			})
+			.then(() => done(), done);
 	}).timeout(10000);
 
 	test('Test Generate unit tests skeleton for file', (done) => {
@@ -291,20 +483,22 @@
 			return done();
 		}
 
-		getGoVersion().then(async (version) => {
-			const uri = vscode.Uri.file(path.join(generateTestsSourcePath, 'generatetests.go'));
-			const document = await vscode.workspace.openTextDocument(uri);
-			const editor = await vscode.window.showTextDocument(document);
-			const result = await generateTestCurrentFile();
-			assert.equal(result, true);
-			await Promise.resolve();
-			vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-			if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
-				return Promise.resolve();
-			} else {
-				return Promise.reject('generatetests_test.go not found');
-			}
-		}).then(() => done(), done);
+		getGoVersion()
+			.then(async (version) => {
+				const uri = vscode.Uri.file(path.join(generateTestsSourcePath, 'generatetests.go'));
+				const document = await vscode.workspace.openTextDocument(uri);
+				const editor = await vscode.window.showTextDocument(document);
+				const result = await generateTestCurrentFile();
+				assert.equal(result, true);
+				await Promise.resolve();
+				vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
+					return Promise.resolve();
+				} else {
+					return Promise.reject('generatetests_test.go not found');
+				}
+			})
+			.then(() => done(), done);
 	});
 
 	test('Test Generate unit tests skeleton for a function', (done) => {
@@ -313,23 +507,25 @@
 			return done();
 		}
 
-		getGoVersion().then(async (version) => {
-			const uri = vscode.Uri.file(path.join(generateFunctionTestSourcePath, 'generatetests.go'));
-			const document = await vscode.workspace.openTextDocument(uri);
-			const editor = await vscode.window.showTextDocument(document);
-			assert(vscode.window.activeTextEditor, 'No active editor');
-			const selection = new vscode.Selection(5, 0, 6, 0);
-			editor.selection = selection;
-			const result = await generateTestCurrentFunction();
-			assert.equal(result, true);
-			await Promise.resolve();
-			vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-			if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
-				return Promise.resolve();
-			} else {
-				return Promise.reject('generatetests_test.go not found');
-			}
-		}).then(() => done(), done);
+		getGoVersion()
+			.then(async (version) => {
+				const uri = vscode.Uri.file(path.join(generateFunctionTestSourcePath, 'generatetests.go'));
+				const document = await vscode.workspace.openTextDocument(uri);
+				const editor = await vscode.window.showTextDocument(document);
+				assert(vscode.window.activeTextEditor, 'No active editor');
+				const selection = new vscode.Selection(5, 0, 6, 0);
+				editor.selection = selection;
+				const result = await generateTestCurrentFunction();
+				assert.equal(result, true);
+				await Promise.resolve();
+				vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
+					return Promise.resolve();
+				} else {
+					return Promise.reject('generatetests_test.go not found');
+				}
+			})
+			.then(() => done(), done);
 	});
 
 	test('Test Generate unit tests skeleton for package', (done) => {
@@ -338,20 +534,22 @@
 			return done();
 		}
 
-		getGoVersion().then(async (version) => {
-			const uri = vscode.Uri.file(path.join(generatePackageTestSourcePath, 'generatetests.go'));
-			const document = await vscode.workspace.openTextDocument(uri);
-			const editor = await vscode.window.showTextDocument(document);
-			const result = await generateTestCurrentPackage();
-			assert.equal(result, true);
-			await Promise.resolve();
-			vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-			if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
-				return Promise.resolve();
-			} else {
-				return Promise.reject('generatetests_test.go not found');
-			}
-		}).then(() => done(), done);
+		getGoVersion()
+			.then(async (version) => {
+				const uri = vscode.Uri.file(path.join(generatePackageTestSourcePath, 'generatetests.go'));
+				const document = await vscode.workspace.openTextDocument(uri);
+				const editor = await vscode.window.showTextDocument(document);
+				const result = await generateTestCurrentPackage();
+				assert.equal(result, true);
+				await Promise.resolve();
+				vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				if (fs.existsSync(path.join(generateTestsSourcePath, 'generatetests_test.go'))) {
+					return Promise.resolve();
+				} else {
+					return Promise.reject('generatetests_test.go not found');
+				}
+			})
+			.then(() => done(), done);
 	});
 
 	test('Test diffUtils.getEditsFromUnifiedDiffStr', (done) => {
@@ -382,17 +580,19 @@
 			});
 		});
 
-		diffPromise.then(async (filePatches: any | FilePatch[]) => {
-			const textDocument = await vscode.workspace.openTextDocument(file1uri);
-			const editor = await vscode.window.showTextDocument(textDocument);
-			await editor.edit((editBuilder) => {
-				filePatches[0].edits.forEach((edit: any) => {
-					edit.applyUsingTextEditorEdit(editBuilder);
+		diffPromise
+			.then(async (filePatches: any | FilePatch[]) => {
+				const textDocument = await vscode.workspace.openTextDocument(file1uri);
+				const editor = await vscode.window.showTextDocument(textDocument);
+				await editor.edit((editBuilder) => {
+					filePatches[0].edits.forEach((edit: any) => {
+						edit.applyUsingTextEditorEdit(editBuilder);
+					});
 				});
-			});
-			assert.equal(editor.document.getText(), file2contents);
-			return Promise.resolve();
-		}).then(() => done(), done);
+				assert.equal(editor.document.getText(), file2contents);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	});
 
 	test('Test diffUtils.getEdits', (done) => {
@@ -445,18 +645,25 @@
 		});
 
 		const uri = vscode.Uri.file(path.join(fixturePath, 'baseTest', 'sample_test.go'));
-		vscode.workspace.openTextDocument(uri).then(async (document) => {
-			const editor = await vscode.window.showTextDocument(document);
-			const result = await testCurrentFile(config, false, []);
-			assert.equal(result, true);
-			return Promise.resolve();
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(async (document) => {
+				const editor = await vscode.window.showTextDocument(document);
+				const result = await testCurrentFile(config, false, []);
+				assert.equal(result, true);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	}).timeout(10000);
 
 	test('Test Outline', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'outlineTest', 'test.go'));
 		vscode.workspace.openTextDocument(uri).then((document) => {
-			const options = { document, fileName: document.fileName, importsOption: GoOutlineImportsOptions.Include };
+			const options = {
+				document,
+				fileName: document.fileName,
+				importsOption: GoOutlineImportsOptions.Include
+			};
 
 			documentSymbols(options, null).then((outlines) => {
 				const packageSymbols = outlines.filter((x: any) => x.kind === vscode.SymbolKind.Package);
@@ -473,13 +680,16 @@
 				done();
 			}, done);
 		});
-
 	});
 
 	test('Test Outline imports only', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'outlineTest', 'test.go'));
 		vscode.workspace.openTextDocument(uri).then((document) => {
-			const options = { document, fileName: document.fileName, importsOption: GoOutlineImportsOptions.Only };
+			const options = {
+				document,
+				fileName: document.fileName,
+				importsOption: GoOutlineImportsOptions.Only
+			};
 
 			documentSymbols(options, null).then((outlines) => {
 				const packageSymbols = outlines.filter((x) => x.kind === vscode.SymbolKind.Package);
@@ -498,35 +708,42 @@
 
 	test('Test Outline document symbols', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'outlineTest', 'test.go'));
-		vscode.workspace.openTextDocument(uri).then((document) => {
-			new GoDocumentSymbolProvider().provideDocumentSymbols(document, null).then((outlines) => {
-				const packages = outlines.filter((x) => x.kind === vscode.SymbolKind.Package);
-				const variables = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Variable);
-				const functions = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Function);
-				const structs = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Struct);
-				const interfaces = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Interface);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then((document) => {
+				new GoDocumentSymbolProvider().provideDocumentSymbols(document, null).then((outlines) => {
+					const packages = outlines.filter((x) => x.kind === vscode.SymbolKind.Package);
+					const variables = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Variable);
+					const functions = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Function);
+					const structs = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Struct);
+					const interfaces = outlines[0].children.filter((x: any) => x.kind === vscode.SymbolKind.Interface);
 
-				assert.equal(packages[0].name, 'main');
-				assert.equal(variables.length, 0);
-				assert.equal(functions[0].name, 'print');
-				assert.equal(functions[1].name, 'main');
-				assert.equal(structs.length, 1);
-				assert.equal(structs[0].name, 'foo');
-				assert.equal(interfaces.length, 1);
-				assert.equal(interfaces[0].name, 'circle');
-			});
-		}).then(() => done(), done);
+					assert.equal(packages[0].name, 'main');
+					assert.equal(variables.length, 0);
+					assert.equal(functions[0].name, 'print');
+					assert.equal(functions[1].name, 'main');
+					assert.equal(structs.length, 1);
+					assert.equal(structs[0].name, 'foo');
+					assert.equal(interfaces.length, 1);
+					assert.equal(interfaces[0].name, 'circle');
+				});
+			})
+			.then(() => done(), done);
 	});
 
 	test('Test listPackages', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'baseTest', 'test.go'));
-		vscode.workspace.openTextDocument(uri).then((document) => vscode.window.showTextDocument(document)
-			.then(async (editor) => {
-				const includeImportedPkgs = await listPackages(false);
-				const excludeImportedPkgs = await listPackages(true);
-				assert.equal(includeImportedPkgs.indexOf('fmt') > -1, true);
-				assert.equal(excludeImportedPkgs.indexOf('fmt') > -1, false);
-			})).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then((document) =>
+				vscode.window.showTextDocument(document).then(async (editor) => {
+					const includeImportedPkgs = await listPackages(false);
+					const excludeImportedPkgs = await listPackages(true);
+					assert.equal(includeImportedPkgs.indexOf('fmt') > -1, true);
+					assert.equal(excludeImportedPkgs.indexOf('fmt') > -1, false);
+				})
+			)
+			.then(() => done(), done);
 	});
 
 	test('Replace vendor packages with relative path', (done) => {
@@ -544,50 +761,62 @@
 			'github.com/rogpeppe/godef/vendor/9fans.net/go/plan9',
 			'github.com/rogpeppe/godef/vendor/9fans.net/go/plan9/client'
 		];
-		const vendorPkgsRelativePath = [
-			'9fans.net/go/acme',
-			'9fans.net/go/plan9',
-			'9fans.net/go/plan9/client'
-		];
+		const vendorPkgsRelativePath = ['9fans.net/go/acme', '9fans.net/go/plan9', '9fans.net/go/plan9/client'];
 
-		vendorSupportPromise.then(async (vendorSupport: boolean) => {
-			const gopkgsPromise = getAllPackages(workDir).then((pkgMap) => {
-				const pkgs = Array.from(pkgMap.keys()).filter((p) => pkgMap.get(p).name !== 'main');
-				if (vendorSupport) {
-					vendorPkgsFullPath.forEach((pkg) => {
-						assert.equal(pkgs.indexOf(pkg) > -1, true, `Package not found by goPkgs: ${pkg}`);
-					});
-					vendorPkgsRelativePath.forEach((pkg) => {
-						assert.equal(pkgs.indexOf(pkg), -1, `Relative path to vendor package ${pkg} should not be returned by gopkgs command`);
-					});
-				}
-				return Promise.resolve(pkgs);
-			});
+		vendorSupportPromise
+			.then(async (vendorSupport: boolean) => {
+				const gopkgsPromise = getAllPackages(workDir).then((pkgMap) => {
+					const pkgs = Array.from(pkgMap.keys()).filter((p) => pkgMap.get(p).name !== 'main');
+					if (vendorSupport) {
+						vendorPkgsFullPath.forEach((pkg) => {
+							assert.equal(pkgs.indexOf(pkg) > -1, true, `Package not found by goPkgs: ${pkg}`);
+						});
+						vendorPkgsRelativePath.forEach((pkg) => {
+							assert.equal(
+								pkgs.indexOf(pkg),
+								-1,
+								`Relative path to vendor package ${pkg} should not be returned by gopkgs command`
+							);
+						});
+					}
+					return Promise.resolve(pkgs);
+				});
 
-			const listPkgPromise: Thenable<string[]> = vscode.workspace.openTextDocument(vscode.Uri.file(filePath)).then(async (document) => {
-				const editor = await vscode.window.showTextDocument(document);
-				const pkgs = await listPackages();
-				if (vendorSupport) {
-					vendorPkgsRelativePath.forEach((pkg) => {
-						assert.equal(pkgs.indexOf(pkg) > -1, true, `Relative path for vendor package ${pkg} not found`);
+				const listPkgPromise: Thenable<string[]> = vscode.workspace
+					.openTextDocument(vscode.Uri.file(filePath))
+					.then(async (document) => {
+						const editor = await vscode.window.showTextDocument(document);
+						const pkgs = await listPackages();
+						if (vendorSupport) {
+							vendorPkgsRelativePath.forEach((pkg) => {
+								assert.equal(
+									pkgs.indexOf(pkg) > -1,
+									true,
+									`Relative path for vendor package ${pkg} not found`
+								);
+							});
+							vendorPkgsFullPath.forEach((pkg) => {
+								assert.equal(
+									pkgs.indexOf(pkg),
+									-1,
+									`Full path for vendor package ${pkg} should be shown by listPackages method`
+								);
+							});
+						}
+						return Promise.resolve(pkgs);
 					});
-					vendorPkgsFullPath.forEach((pkg) => {
-						assert.equal(pkgs.indexOf(pkg), -1, `Full path for vendor package ${pkg} should be shown by listPackages method`);
-					});
-				}
-				return Promise.resolve(pkgs);
-			});
 
-			const values = await Promise.all<string[]>([gopkgsPromise, listPkgPromise]);
-			if (!vendorSupport) {
-				const originalPkgs = values[0].sort();
-				const updatedPkgs = values[1].sort();
-				assert.equal(originalPkgs.length, updatedPkgs.length);
-				for (let index = 0; index < originalPkgs.length; index++) {
-					assert.equal(updatedPkgs[index], originalPkgs[index]);
+				const values = await Promise.all<string[]>([gopkgsPromise, listPkgPromise]);
+				if (!vendorSupport) {
+					const originalPkgs = values[0].sort();
+					const updatedPkgs = values[1].sort();
+					assert.equal(originalPkgs.length, updatedPkgs.length);
+					for (let index = 0; index < originalPkgs.length; index++) {
+						assert.equal(updatedPkgs[index], originalPkgs[index]);
+					}
 				}
-			}
-		}).then(() => done(), done);
+			})
+			.then(() => done(), done);
 	});
 
 	test('Vendor pkgs from other projects should not be allowed to import', (done) => {
@@ -605,35 +834,49 @@
 			'github.com/rogpeppe/godef/vendor/9fans.net/go/plan9/client'
 		];
 
-		vendorSupportPromise.then((vendorSupport: boolean) => {
-			const gopkgsPromise = new Promise<void>((resolve, reject) => {
-				const cmd = cp.spawn(getBinPath('gopkgs'), ['-format', '{{.ImportPath}}'], { env: process.env });
-				const chunks: any[] = [];
-				cmd.stdout.on('data', (d) => chunks.push(d));
-				cmd.on('close', () => {
-					const pkgs = chunks.join('').split('\n').filter((pkg) => pkg).sort();
-					if (vendorSupport) {
-						vendorPkgs.forEach((pkg) => {
-							assert.equal(pkgs.indexOf(pkg) > -1, true, `Package not found by goPkgs: ${pkg}`);
-						});
-					}
-					return resolve();
-				});
-			});
-
-			const listPkgPromise: Thenable<void> = vscode.workspace.openTextDocument(vscode.Uri.file(filePath)).then(async (document) => {
-				const editor = await vscode.window.showTextDocument(document);
-				const pkgs = await listPackages();
-				if (vendorSupport) {
-					vendorPkgs.forEach((pkg) => {
-						assert.equal(pkgs.indexOf(pkg), -1, `Vendor package ${pkg} should not be shown by listPackages method`);
+		vendorSupportPromise
+			.then((vendorSupport: boolean) => {
+				const gopkgsPromise = new Promise<void>((resolve, reject) => {
+					const cmd = cp.spawn(getBinPath('gopkgs'), ['-format', '{{.ImportPath}}'], {
+						env: process.env
 					});
-				}
-				return Promise.resolve();
-			});
+					const chunks: any[] = [];
+					cmd.stdout.on('data', (d) => chunks.push(d));
+					cmd.on('close', () => {
+						const pkgs = chunks
+							.join('')
+							.split('\n')
+							.filter((pkg) => pkg)
+							.sort();
+						if (vendorSupport) {
+							vendorPkgs.forEach((pkg) => {
+								assert.equal(pkgs.indexOf(pkg) > -1, true, `Package not found by goPkgs: ${pkg}`);
+							});
+						}
+						return resolve();
+					});
+				});
 
-			return Promise.all<void>([gopkgsPromise, listPkgPromise]);
-		}).then(() => done(), done);
+				const listPkgPromise: Thenable<void> = vscode.workspace
+					.openTextDocument(vscode.Uri.file(filePath))
+					.then(async (document) => {
+						const editor = await vscode.window.showTextDocument(document);
+						const pkgs = await listPackages();
+						if (vendorSupport) {
+							vendorPkgs.forEach((pkg) => {
+								assert.equal(
+									pkgs.indexOf(pkg),
+									-1,
+									`Vendor package ${pkg} should not be shown by listPackages method`
+								);
+							});
+						}
+						return Promise.resolve();
+					});
+
+				return Promise.all<void>([gopkgsPromise, listPkgPromise]);
+			})
+			.then(() => done(), done);
 	});
 
 	test('Workspace Symbols', () => {
@@ -673,19 +916,33 @@
 			}
 		});
 
-		const withoutIgnoringFolders = getWorkspaceSymbols(workspacePath, 'WinInfo', null, configWithoutIgnoringFolders).then((results) => {
+		const withoutIgnoringFolders = getWorkspaceSymbols(
+			workspacePath,
+			'WinInfo',
+			null,
+			configWithoutIgnoringFolders
+		).then((results) => {
 			assert.equal(results[0].name, 'WinInfo');
 			assert.equal(results[0].path, path.join(workspacePath, 'vendor/9fans.net/go/acme/acme.go'));
 		});
-		const withIgnoringFolders = getWorkspaceSymbols(workspacePath, 'WinInfo', null, configWithIgnoringFolders).then((results) => {
+		const withIgnoringFolders = getWorkspaceSymbols(workspacePath, 'WinInfo', null, configWithIgnoringFolders).then(
+			(results) => {
+				assert.equal(results.length, 0);
+			}
+		);
+		const withoutIncludingGoroot = getWorkspaceSymbols(
+			workspacePath,
+			'Mutex',
+			null,
+			configWithoutIncludeGoroot
+		).then((results) => {
 			assert.equal(results.length, 0);
 		});
-		const withoutIncludingGoroot = getWorkspaceSymbols(workspacePath, 'Mutex', null, configWithoutIncludeGoroot).then((results) => {
-			assert.equal(results.length, 0);
-		});
-		const withIncludingGoroot = getWorkspaceSymbols(workspacePath, 'Mutex', null, configWithIncludeGoroot).then((results) => {
-			assert(results.some((result) => result.name === 'Mutex'));
-		});
+		const withIncludingGoroot = getWorkspaceSymbols(workspacePath, 'Mutex', null, configWithIncludeGoroot).then(
+			(results) => {
+				assert(results.some((result) => result.name === 'Mutex'));
+			}
+		);
 
 		return Promise.all([withIgnoringFolders, withoutIgnoringFolders, withIncludingGoroot, withoutIncludingGoroot]);
 	}).timeout(10000);
@@ -702,138 +959,279 @@
 			[new vscode.Position(7, 6), 'Println', 'func(a ...interface{}) (n int, err error)', printlnDoc]
 		];
 		const uri = vscode.Uri.file(path.join(fixturePath, 'baseTest', 'test.go'));
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const promises = testCases.map(([position, expectedLabel, expectedDetail, expectedDoc]) => provider.provideCompletionItems(editor.document, position, null).then(async (items) => {
-				const item = items.items.find((x) => x.label === expectedLabel);
-				assert.equal(!!item, true, 'missing expected item in completion list');
-				assert.equal(item.detail, expectedDetail);
-				const resolvedItemResult: vscode.ProviderResult<vscode.CompletionItem> = provider.resolveCompletionItem(item, null);
-				if (!resolvedItemResult) {
-					return;
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					const promises = testCases.map(([position, expectedLabel, expectedDetail, expectedDoc]) =>
+						provider.provideCompletionItems(editor.document, position, null).then(async (items) => {
+							const item = items.items.find((x) => x.label === expectedLabel);
+							assert.equal(!!item, true, 'missing expected item in completion list');
+							assert.equal(item.detail, expectedDetail);
+							const resolvedItemResult: vscode.ProviderResult<
+								vscode.CompletionItem
+							> = provider.resolveCompletionItem(item, null);
+							if (!resolvedItemResult) {
+								return;
+							}
+							if (resolvedItemResult instanceof vscode.CompletionItem) {
+								if (resolvedItemResult.documentation) {
+									assert.equal(
+										(<vscode.MarkdownString>resolvedItemResult.documentation).value,
+										expectedDoc
+									);
+								}
+								return;
+							}
+							const resolvedItem = await resolvedItemResult;
+							if (resolvedItem) {
+								assert.equal((<vscode.MarkdownString>resolvedItem.documentation).value, expectedDoc);
+							}
+						})
+					);
+					await Promise.all(promises);
+					vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+					return Promise.resolve();
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
 				}
-				if (resolvedItemResult instanceof vscode.CompletionItem) {
-					if (resolvedItemResult.documentation) {
-						assert.equal((<vscode.MarkdownString>resolvedItemResult.documentation).value, expectedDoc);
-					}
-					return;
-				}
-				const resolvedItem = await resolvedItemResult;
-				if (resolvedItem) {
-					assert.equal((<vscode.MarkdownString>resolvedItem.documentation).value, expectedDoc);
-				}
-			}));
-			await Promise.all(promises);
-			vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-			return Promise.resolve();
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+			)
+			.then(() => done(), done);
 	});
 
 	test('Test Completion Snippets For Functions', (done) => {
 		const provider = new GoCompletionItemProvider();
 		const uri = vscode.Uri.file(path.join(fixturePath, 'completions', 'snippets.go'));
-		const testCases: [vscode.Position, string[]][] = [
-			[new vscode.Position(5, 6), ['Print']]
-		];
+		const testCases: [vscode.Position, string[]][] = [[new vscode.Position(5, 6), ['Print']]];
 		const baseConfig = vscode.workspace.getConfiguration('go');
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const noFunctionSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(9, 6), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: false } })).then((items) => {
-				items = items instanceof vscode.CompletionList ? items.items : items;
-				const item = items.find((x) => x.label === 'Print');
-				assert.equal(!item.insertText, true);
-			});
-			const withFunctionSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(9, 6), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items1) => {
-				items1 = items1 instanceof vscode.CompletionList ? items1.items : items1;
-				const item1 = items1.find((x) => x.label === 'Print');
-				assert.equal((<vscode.SnippetString>item1.insertText).value, 'Print(${1:a ...interface{\\}})');
-			});
-			const withFunctionSnippetNotype = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(9, 6), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggestWithoutType: { value: true } })).then((items2) => {
-				items2 = items2 instanceof vscode.CompletionList ? items2.items : items2;
-				const item2 = items2.find((x) => x.label === 'Print');
-				assert.equal((<vscode.SnippetString>item2.insertText).value, 'Print(${1:a})');
-			});
-			const noFunctionAsVarSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(11, 3), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: false } })).then((items3) => {
-				items3 = items3 instanceof vscode.CompletionList ? items3.items : items3;
-				const item3 = items3.find((x) => x.label === 'funcAsVariable');
-				assert.equal(!item3.insertText, true);
-			});
-			const withFunctionAsVarSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(11, 3), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items4) => {
-				items4 = items4 instanceof vscode.CompletionList ? items4.items : items4;
-				const item4 = items4.find((x) => x.label === 'funcAsVariable');
-				assert.equal((<vscode.SnippetString>item4.insertText).value, 'funcAsVariable(${1:k string})');
-			});
-			const withFunctionAsVarSnippetNoType = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(11, 3), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggestWithoutType: { value: true } })).then((items5) => {
-				items5 = items5 instanceof vscode.CompletionList ? items5.items : items5;
-				const item5 = items5.find((x) => x.label === 'funcAsVariable');
-				assert.equal((<vscode.SnippetString>item5.insertText).value, 'funcAsVariable(${1:k})');
-			});
-			const noFunctionAsTypeSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(14, 0), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: false } })).then((items6) => {
-				items6 = items6 instanceof vscode.CompletionList ? items6.items : items6;
-				const item1 = items6.find((x) => x.label === 'HandlerFunc');
-				const item2 = items6.find((x) => x.label === 'HandlerFuncWithArgNames');
-				const item3 = items6.find((x) => x.label === 'HandlerFuncNoReturnType');
-				assert.equal(!item1.insertText, true);
-				assert.equal(!item2.insertText, true);
-				assert.equal(!item3.insertText, true);
-			});
-			const withFunctionAsTypeSnippet = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(14, 0), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items7) => {
-				items7 = items7 instanceof vscode.CompletionList ? items7.items : items7;
-				const item11 = items7.find((x) => x.label === 'HandlerFunc');
-				const item21 = items7.find((x) => x.label === 'HandlerFuncWithArgNames');
-				const item31 = items7.find((x) => x.label === 'HandlerFuncNoReturnType');
-				assert.equal((<vscode.SnippetString>item11.insertText).value, 'HandlerFunc(func(${1:arg1} string, ${2:arg2} string) {\n\t$3\n}) (string, string)');
-				assert.equal((<vscode.SnippetString>item21.insertText).value, 'HandlerFuncWithArgNames(func(${1:w} string, ${2:r} string) {\n\t$3\n}) int');
-				assert.equal((<vscode.SnippetString>item31.insertText).value, 'HandlerFuncNoReturnType(func(${1:arg1} string, ${2:arg2} string) {\n\t$3\n})');
-			});
-			await Promise.all([
-				noFunctionSnippet,
-				withFunctionSnippet,
-				withFunctionSnippetNotype,
-				noFunctionAsVarSnippet,
-				withFunctionAsVarSnippet,
-				withFunctionAsVarSnippetNoType,
-				noFunctionAsTypeSnippet,
-				withFunctionAsTypeSnippet
-			]);
-			return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					const noFunctionSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(9, 6),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: false }
+							})
+						)
+						.then((items) => {
+							items = items instanceof vscode.CompletionList ? items.items : items;
+							const item = items.find((x) => x.label === 'Print');
+							assert.equal(!item.insertText, true);
+						});
+					const withFunctionSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(9, 6),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items1) => {
+							items1 = items1 instanceof vscode.CompletionList ? items1.items : items1;
+							const item1 = items1.find((x) => x.label === 'Print');
+							assert.equal(
+								(<vscode.SnippetString>item1.insertText).value,
+								'Print(${1:a ...interface{\\}})'
+							);
+						});
+					const withFunctionSnippetNotype = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(9, 6),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggestWithoutType: { value: true }
+							})
+						)
+						.then((items2) => {
+							items2 = items2 instanceof vscode.CompletionList ? items2.items : items2;
+							const item2 = items2.find((x) => x.label === 'Print');
+							assert.equal((<vscode.SnippetString>item2.insertText).value, 'Print(${1:a})');
+						});
+					const noFunctionAsVarSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(11, 3),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: false }
+							})
+						)
+						.then((items3) => {
+							items3 = items3 instanceof vscode.CompletionList ? items3.items : items3;
+							const item3 = items3.find((x) => x.label === 'funcAsVariable');
+							assert.equal(!item3.insertText, true);
+						});
+					const withFunctionAsVarSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(11, 3),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items4) => {
+							items4 = items4 instanceof vscode.CompletionList ? items4.items : items4;
+							const item4 = items4.find((x) => x.label === 'funcAsVariable');
+							assert.equal(
+								(<vscode.SnippetString>item4.insertText).value,
+								'funcAsVariable(${1:k string})'
+							);
+						});
+					const withFunctionAsVarSnippetNoType = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(11, 3),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggestWithoutType: { value: true }
+							})
+						)
+						.then((items5) => {
+							items5 = items5 instanceof vscode.CompletionList ? items5.items : items5;
+							const item5 = items5.find((x) => x.label === 'funcAsVariable');
+							assert.equal((<vscode.SnippetString>item5.insertText).value, 'funcAsVariable(${1:k})');
+						});
+					const noFunctionAsTypeSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(14, 0),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: false }
+							})
+						)
+						.then((items6) => {
+							items6 = items6 instanceof vscode.CompletionList ? items6.items : items6;
+							const item1 = items6.find((x) => x.label === 'HandlerFunc');
+							const item2 = items6.find((x) => x.label === 'HandlerFuncWithArgNames');
+							const item3 = items6.find((x) => x.label === 'HandlerFuncNoReturnType');
+							assert.equal(!item1.insertText, true);
+							assert.equal(!item2.insertText, true);
+							assert.equal(!item3.insertText, true);
+						});
+					const withFunctionAsTypeSnippet = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(14, 0),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items7) => {
+							items7 = items7 instanceof vscode.CompletionList ? items7.items : items7;
+							const item11 = items7.find((x) => x.label === 'HandlerFunc');
+							const item21 = items7.find((x) => x.label === 'HandlerFuncWithArgNames');
+							const item31 = items7.find((x) => x.label === 'HandlerFuncNoReturnType');
+							assert.equal(
+								(<vscode.SnippetString>item11.insertText).value,
+								'HandlerFunc(func(${1:arg1} string, ${2:arg2} string) {\n\t$3\n}) (string, string)'
+							);
+							assert.equal(
+								(<vscode.SnippetString>item21.insertText).value,
+								'HandlerFuncWithArgNames(func(${1:w} string, ${2:r} string) {\n\t$3\n}) int'
+							);
+							assert.equal(
+								(<vscode.SnippetString>item31.insertText).value,
+								'HandlerFuncNoReturnType(func(${1:arg1} string, ${2:arg2} string) {\n\t$3\n})'
+							);
+						});
+					await Promise.all([
+						noFunctionSnippet,
+						withFunctionSnippet,
+						withFunctionSnippetNotype,
+						noFunctionAsVarSnippet,
+						withFunctionAsVarSnippet,
+						withFunctionAsVarSnippetNoType,
+						noFunctionAsTypeSnippet,
+						withFunctionAsTypeSnippet
+					]);
+					return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
+				}
+			)
+			.then(() => done(), done);
 	}).timeout(10000);
 
 	test('Test No Completion Snippets For Functions', (done) => {
 		const provider = new GoCompletionItemProvider();
 		const uri = vscode.Uri.file(path.join(fixturePath, 'completions', 'nosnippets.go'));
 		const baseConfig = vscode.workspace.getConfiguration('go');
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const symbolFollowedByBrackets = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(5, 10), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items) => {
-				items = items instanceof vscode.CompletionList ? items.items : items;
-				const item = items.find((x) => x.label === 'Print');
-				assert.equal(!item.insertText, true, 'Unexpected snippet when symbol is followed by ().');
-			});
-			const symbolAsLastParameter = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(7, 13), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items1) => {
-				items1 = items1 instanceof vscode.CompletionList ? items1.items : items1;
-				const item1 = items1.find((x) => x.label === 'funcAsVariable');
-				assert.equal(!item1.insertText, true, 'Unexpected snippet when symbol is a parameter inside func call');
-			});
-			const symbolsAsNonLastParameter = provider.provideCompletionItemsInternal(editor.document, new vscode.Position(8, 11), null, Object.create(baseConfig, { useCodeSnippetsOnFunctionSuggest: { value: true } })).then((items2) => {
-				items2 = items2 instanceof vscode.CompletionList ? items2.items : items2;
-				const item2 = items2.find((x) => x.label === 'funcAsVariable');
-				assert.equal(!item2.insertText, true, 'Unexpected snippet when symbol is one of the parameters inside func call.');
-			});
-			await Promise.all([
-				symbolFollowedByBrackets,
-				symbolAsLastParameter,
-				symbolsAsNonLastParameter
-			]);
-			return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					const symbolFollowedByBrackets = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(5, 10),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items) => {
+							items = items instanceof vscode.CompletionList ? items.items : items;
+							const item = items.find((x) => x.label === 'Print');
+							assert.equal(!item.insertText, true, 'Unexpected snippet when symbol is followed by ().');
+						});
+					const symbolAsLastParameter = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(7, 13),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items1) => {
+							items1 = items1 instanceof vscode.CompletionList ? items1.items : items1;
+							const item1 = items1.find((x) => x.label === 'funcAsVariable');
+							assert.equal(
+								!item1.insertText,
+								true,
+								'Unexpected snippet when symbol is a parameter inside func call'
+							);
+						});
+					const symbolsAsNonLastParameter = provider
+						.provideCompletionItemsInternal(
+							editor.document,
+							new vscode.Position(8, 11),
+							null,
+							Object.create(baseConfig, {
+								useCodeSnippetsOnFunctionSuggest: { value: true }
+							})
+						)
+						.then((items2) => {
+							items2 = items2 instanceof vscode.CompletionList ? items2.items : items2;
+							const item2 = items2.find((x) => x.label === 'funcAsVariable');
+							assert.equal(
+								!item2.insertText,
+								true,
+								'Unexpected snippet when symbol is one of the parameters inside func call.'
+							);
+						});
+					await Promise.all([symbolFollowedByBrackets, symbolAsLastParameter, symbolsAsNonLastParameter]);
+					return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
+				}
+			)
+			.then(() => done(), done);
 	});
 
 	test('Test Completion on unimported packages', (done) => {
@@ -847,20 +1245,34 @@
 		];
 		const uri = vscode.Uri.file(path.join(fixturePath, 'completions', 'unimportedPkgs.go'));
 
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const promises = testCases.map(([position, expected]) => provider.provideCompletionItemsInternal(editor.document, position, null, config).then((items) => {
-				items = items instanceof vscode.CompletionList ? items.items : items;
-				const labels = items.map((x) => x.label);
-				for (const entry of expected) {
-					assert.equal(labels.indexOf(entry) > -1, true, `missing expected item in completion list: ${entry} Actual: ${labels}`);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					const promises = testCases.map(([position, expected]) =>
+						provider
+							.provideCompletionItemsInternal(editor.document, position, null, config)
+							.then((items) => {
+								items = items instanceof vscode.CompletionList ? items.items : items;
+								const labels = items.map((x) => x.label);
+								for (const entry of expected) {
+									assert.equal(
+										labels.indexOf(entry) > -1,
+										true,
+										`missing expected item in completion list: ${entry} Actual: ${labels}`
+									);
+								}
+							})
+					);
+					await Promise.all(promises);
+					return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
 				}
-			}));
-			await Promise.all(promises);
-			return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+			)
+			.then(() => done(), done);
 	});
 
 	test('Test Completion on unimported packages (multiple)', (done) => {
@@ -880,25 +1292,37 @@
 			}
 		];
 		const uri = vscode.Uri.file(path.join(fixturePath, 'completions', 'unimportedMultiplePkgs.go'));
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			let items = await provider.provideCompletionItemsInternal(editor.document, position, null, config);
-			items = items instanceof vscode.CompletionList ? items.items : items;
-			const labels = items.map((x) => x.label);
-			expectedItems.forEach((expectedItem) => {
-				items = items instanceof vscode.CompletionList ? items.items : items;
-				const actualItem: vscode.CompletionItem = items.filter((item) => item.label === expectedItem.label)[0];
-				if (!actualItem) {
-					assert.fail(actualItem, expectedItem, `Missing expected item in completion list: ${expectedItem.label} Actual: ${labels}`);
-					return;
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					let items = await provider.provideCompletionItemsInternal(editor.document, position, null, config);
+					items = items instanceof vscode.CompletionList ? items.items : items;
+					const labels = items.map((x) => x.label);
+					expectedItems.forEach((expectedItem) => {
+						items = items instanceof vscode.CompletionList ? items.items : items;
+						const actualItem: vscode.CompletionItem = items.filter(
+							(item) => item.label === expectedItem.label
+						)[0];
+						if (!actualItem) {
+							assert.fail(
+								actualItem,
+								expectedItem,
+								`Missing expected item in completion list: ${expectedItem.label} Actual: ${labels}`
+							);
+							return;
+						}
+						assert.equal(actualItem.additionalTextEdits.length, 1);
+						assert.equal(actualItem.additionalTextEdits[0].newText, expectedItem.import);
+					});
+					return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
 				}
-				assert.equal(actualItem.additionalTextEdits.length, 1);
-				assert.equal(actualItem.additionalTextEdits[0].newText, expectedItem.import);
-			});
-			return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+			)
+			.then(() => done(), done);
 	});
 
 	test('Test Completion on Comments for Exported Members', (done) => {
@@ -912,24 +1336,42 @@
 			[new vscode.Position(12, 1), []],
 			[new vscode.Position(12, 4), ['SayHello']],
 			[new vscode.Position(17, 5), ['HelloParams']],
-			[new vscode.Position(26, 5), ['Abs']],
+			[new vscode.Position(26, 5), ['Abs']]
 		];
 		const uri = vscode.Uri.file(path.join(fixturePath, 'completions', 'exportedMemberDocs.go'));
 
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const promises = testCases.map(([position, expected]) => provider.provideCompletionItems(editor.document, position, null).then((items) => {
-				const labels = items.items.map((x) => x.label);
-				assert.equal(expected.length, labels.length, `expected number of completions: ${expected.length} Actual: ${labels.length} at position(${position.line + 1},${position.character + 1}) ${labels}`);
-				expected.forEach((entry, index) => {
-					assert.equal(entry, labels[index], `mismatch in comment completion list Expected: ${entry} Actual: ${labels[index]}`);
-				});
-			}));
-			await Promise.all(promises);
-			return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
-		}, (err) => {
-			assert.ok(false, `error in OpenTextDocument ${err}`);
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(
+				async (textDocument) => {
+					const editor = await vscode.window.showTextDocument(textDocument);
+					const promises = testCases.map(([position, expected]) =>
+						provider.provideCompletionItems(editor.document, position, null).then((items) => {
+							const labels = items.items.map((x) => x.label);
+							assert.equal(
+								expected.length,
+								labels.length,
+								`expected number of completions: ${expected.length} Actual: ${
+									labels.length
+								} at position(${position.line + 1},${position.character + 1}) ${labels}`
+							);
+							expected.forEach((entry, index) => {
+								assert.equal(
+									entry,
+									labels[index],
+									`mismatch in comment completion list Expected: ${entry} Actual: ${labels[index]}`
+								);
+							});
+						})
+					);
+					await Promise.all(promises);
+					return await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
+				},
+				(err) => {
+					assert.ok(false, `error in OpenTextDocument ${err}`);
+				}
+			)
+			.then(() => done(), done);
 	});
 
 	test('getImportPath()', () => {
@@ -968,13 +1410,16 @@
 			playground: { value: { run: true, openbrowser: false, share: false } }
 		});
 
-		goPlay(validCode, goConfig['playground']).then((result) => {
-			assert(
-				result.includes('1 2 3 Go!')
-			);
-		}, (e) => {
-			assert.ifError(e);
-		}).then(() => done(), done);
+		goPlay(validCode, goConfig['playground'])
+			.then(
+				(result) => {
+					assert(result.includes('1 2 3 Go!'));
+				},
+				(e) => {
+					assert.ifError(e);
+				}
+			)
+			.then(() => done(), done);
 	});
 
 	test('goPlay - success run & share', (done) => {
@@ -998,12 +1443,17 @@
 			playground: { value: { run: true, openbrowser: false, share: true } }
 		});
 
-		goPlay(validCode, goConfig['playground']).then((result) => {
-			assert(result.includes('1 2 3 Go!'));
-			assert(result.includes('https://play.golang.org/'));
-		}, (e) => {
-			assert.ifError(e);
-		}).then(() => done(), done);
+		goPlay(validCode, goConfig['playground'])
+			.then(
+				(result) => {
+					assert(result.includes('1 2 3 Go!'));
+					assert(result.includes('https://play.golang.org/'));
+				},
+				(e) => {
+					assert.ifError(e);
+				}
+			)
+			.then(() => done(), done);
 	});
 
 	test('goPlay - fail', (done) => {
@@ -1024,11 +1474,16 @@
 			playground: { value: { run: true, openbrowser: false, share: false } }
 		});
 
-		goPlay(invalidCode, goConfig['playground']).then((result) => {
-			assert.ifError(result);
-		}, (e) => {
-			assert.ok(e);
-		}).then(() => done(), done);
+		goPlay(invalidCode, goConfig['playground'])
+			.then(
+				(result) => {
+					assert.ifError(result);
+				},
+				(e) => {
+					assert.ok(e);
+				}
+			)
+			.then(() => done(), done);
 	});
 
 	test('Build Tags checking', (done) => {
@@ -1039,11 +1494,13 @@
 			buildTags: { value: 'randomtag' }
 		});
 
-		const checkWithTags = check(vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')), config1).then((diagnostics) => {
-			assert.equal(1, diagnostics.length, 'check with buildtag failed. Unexpected errors found');
-			assert.equal(1, diagnostics[0].errors.length, 'check with buildtag failed. Unexpected errors found');
-			assert.equal(diagnostics[0].errors[0].msg, 'undefined: fmt.Prinln');
-		});
+		const checkWithTags = check(vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')), config1).then(
+			(diagnostics) => {
+				assert.equal(1, diagnostics.length, 'check with buildtag failed. Unexpected errors found');
+				assert.equal(1, diagnostics[0].errors.length, 'check with buildtag failed. Unexpected errors found');
+				assert.equal(diagnostics[0].errors[0].msg, 'undefined: fmt.Prinln');
+			}
+		);
 
 		const config2 = Object.create(vscode.workspace.getConfiguration('go'), {
 			vetOnSave: { value: 'off' },
@@ -1052,9 +1509,16 @@
 			buildTags: { value: 'randomtag othertag' }
 		});
 
-		const checkWithMultipleTags = check(vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')), config2).then((diagnostics) => {
+		const checkWithMultipleTags = check(
+			vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')),
+			config2
+		).then((diagnostics) => {
 			assert.equal(1, diagnostics.length, 'check with multiple buildtags failed. Unexpected errors found');
-			assert.equal(1, diagnostics[0].errors.length, 'check with multiple buildtags failed. Unexpected errors found');
+			assert.equal(
+				1,
+				diagnostics[0].errors.length,
+				'check with multiple buildtags failed. Unexpected errors found'
+			);
 			assert.equal(diagnostics[0].errors[0].msg, 'undefined: fmt.Prinln');
 		});
 
@@ -1065,18 +1529,26 @@
 			buildTags: { value: '' }
 		});
 
-		const checkWithoutTags = check(vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')), config3).then((diagnostics) => {
-			assert.equal(1, diagnostics.length, 'check without buildtags failed. Unexpected errors found');
-			assert.equal(1, diagnostics[0].errors.length, 'check without buildtags failed. Unexpected errors found');
-			assert.equal(diagnostics[0].errors[0].msg.indexOf('can\'t load package: package test/testfixture/buildTags') > -1, true, `check without buildtags failed. Go files not excluded. ${diagnostics[0].errors[0].msg}`);
-		});
+		const checkWithoutTags = check(vscode.Uri.file(path.join(fixturePath, 'buildTags', 'hello.go')), config3).then(
+			(diagnostics) => {
+				assert.equal(1, diagnostics.length, 'check without buildtags failed. Unexpected errors found');
+				assert.equal(
+					1,
+					diagnostics[0].errors.length,
+					'check without buildtags failed. Unexpected errors found'
+				);
+				assert.equal(
+					diagnostics[0].errors[0].msg.indexOf(`can't load package: package test/testfixture/buildTags`) > -1,
+					true,
+					`check without buildtags failed. Go files not excluded. ${diagnostics[0].errors[0].msg}`
+				);
+			}
+		);
 
 		Promise.all([checkWithTags, checkWithMultipleTags, checkWithoutTags]).then(() => done(), done);
-
 	});
 
 	test('Test Tags checking', (done) => {
-
 		const config1 = Object.create(vscode.workspace.getConfiguration('go'), {
 			vetOnSave: { value: 'off' },
 			lintOnSave: { value: 'off' },
@@ -1107,94 +1579,117 @@
 		});
 
 		const uri = vscode.Uri.file(path.join(fixturePath, 'testTags', 'hello_test.go'));
-		vscode.workspace.openTextDocument(uri).then((document) => {
-			return vscode.window.showTextDocument(document).then((editor) => {
-				return testCurrentFile(config1, false, []).then((result: boolean) => {
-					assert.equal(result, true);
-					return testCurrentFile(config2, false, []).then((result: boolean) => {
+		vscode.workspace
+			.openTextDocument(uri)
+			.then((document) => {
+				return vscode.window.showTextDocument(document).then((editor) => {
+					return testCurrentFile(config1, false, []).then((result: boolean) => {
 						assert.equal(result, true);
-						return testCurrentFile(config3, false, []).then((result: boolean) => {
+						return testCurrentFile(config2, false, []).then((result: boolean) => {
 							assert.equal(result, true);
-							return testCurrentFile(config4, false, []).then((result: boolean) => {
-								assert.equal(result, false);
-								return Promise.resolve();
+							return testCurrentFile(config3, false, []).then((result: boolean) => {
+								assert.equal(result, true);
+								return testCurrentFile(config4, false, []).then((result: boolean) => {
+									assert.equal(result, false);
+									return Promise.resolve();
+								});
 							});
 						});
 					});
 				});
-			});
-		}).then(done, done);
+			})
+			.then(done, done);
 	}).timeout(10000);
 
 	test('Add imports when no imports', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'importTest', 'noimports.go'));
-		vscode.workspace.openTextDocument(uri).then((document) => {
-			return vscode.window.showTextDocument(document).then((editor) => {
-				const expectedText = document.getText() + '\n' + 'import (\n\t"bytes"\n)\n';
-				const edits = getTextEditForAddImport('bytes');
-				const edit = new vscode.WorkspaceEdit();
-				edit.set(document.uri, edits);
-				return vscode.workspace.applyEdit(edit).then(() => {
-					assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
-					return Promise.resolve();
+		vscode.workspace
+			.openTextDocument(uri)
+			.then((document) => {
+				return vscode.window.showTextDocument(document).then((editor) => {
+					const expectedText = document.getText() + '\n' + 'import (\n\t"bytes"\n)\n';
+					const edits = getTextEditForAddImport('bytes');
+					const edit = new vscode.WorkspaceEdit();
+					edit.set(document.uri, edits);
+					return vscode.workspace.applyEdit(edit).then(() => {
+						assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
+						return Promise.resolve();
+					});
 				});
-			});
-		}).then(() => done(), done);
+			})
+			.then(() => done(), done);
 	});
 
 	test('Add imports to an import block', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'importTest', 'groupImports.go'));
-		vscode.workspace.openTextDocument(uri).then(async (document) => {
-			const editor = await vscode.window.showTextDocument(document);
-			const expectedText = document.getText().replace('\t"fmt"\n\t"math"', '\t"bytes"\n\t"fmt"\n\t"math"');
-			const edits = getTextEditForAddImport('bytes');
-			const edit = new vscode.WorkspaceEdit();
-			edit.set(document.uri, edits);
-			await vscode.workspace.applyEdit(edit);
-			assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
-			return Promise.resolve();
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(async (document) => {
+				const editor = await vscode.window.showTextDocument(document);
+				const expectedText = document.getText().replace('\t"fmt"\n\t"math"', '\t"bytes"\n\t"fmt"\n\t"math"');
+				const edits = getTextEditForAddImport('bytes');
+				const edit = new vscode.WorkspaceEdit();
+				edit.set(document.uri, edits);
+				await vscode.workspace.applyEdit(edit);
+				assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	});
 
 	test('Add imports and collapse single imports to an import block', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'importTest', 'singleImports.go'));
-		vscode.workspace.openTextDocument(uri).then(async (document) => {
-			const editor = await vscode.window.showTextDocument(document);
-			const expectedText = document.getText().replace('import "fmt"\nimport . "math" // comment', 'import (\n\t"bytes"\n\t"fmt"\n\t. "math" // comment\n)');
-			const edits = getTextEditForAddImport('bytes');
-			const edit = new vscode.WorkspaceEdit();
-			edit.set(document.uri, edits);
-			await vscode.workspace.applyEdit(edit);
-			assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
-			return Promise.resolve();
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(async (document) => {
+				const editor = await vscode.window.showTextDocument(document);
+				const expectedText = document
+					.getText()
+					.replace(
+						'import "fmt"\nimport . "math" // comment',
+						'import (\n\t"bytes"\n\t"fmt"\n\t. "math" // comment\n)'
+					);
+				const edits = getTextEditForAddImport('bytes');
+				const edit = new vscode.WorkspaceEdit();
+				edit.set(document.uri, edits);
+				await vscode.workspace.applyEdit(edit);
+				assert.equal(vscode.window.activeTextEditor.document.getText(), expectedText);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	});
 
 	test('Fill struct', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'fillStruct', 'input_1.go'));
 		const golden = fs.readFileSync(path.join(fixturePath, 'fillStruct', 'golden_1.go'), 'utf-8');
 
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const selection = new vscode.Selection(12, 15, 12, 15);
-			editor.selection = selection;
-			await runFillStruct(editor);
-			assert.equal(vscode.window.activeTextEditor.document.getText(), golden);
-			return Promise.resolve();
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(async (textDocument) => {
+				const editor = await vscode.window.showTextDocument(textDocument);
+				const selection = new vscode.Selection(12, 15, 12, 15);
+				editor.selection = selection;
+				await runFillStruct(editor);
+				assert.equal(vscode.window.activeTextEditor.document.getText(), golden);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	}).timeout(10000);
 
 	test('Fill struct - select line', (done) => {
 		const uri = vscode.Uri.file(path.join(fixturePath, 'fillStruct', 'input_2.go'));
 		const golden = fs.readFileSync(path.join(fixturePath, 'fillStruct', 'golden_2.go'), 'utf-8');
 
-		vscode.workspace.openTextDocument(uri).then(async (textDocument) => {
-			const editor = await vscode.window.showTextDocument(textDocument);
-			const selection = new vscode.Selection(7, 0, 7, 10);
-			editor.selection = selection;
-			await runFillStruct(editor);
-			assert.equal(vscode.window.activeTextEditor.document.getText(), golden);
-			return Promise.resolve();
-		}).then(() => done(), done);
+		vscode.workspace
+			.openTextDocument(uri)
+			.then(async (textDocument) => {
+				const editor = await vscode.window.showTextDocument(textDocument);
+				const selection = new vscode.Selection(7, 0, 7, 10);
+				editor.selection = selection;
+				await runFillStruct(editor);
+				assert.equal(vscode.window.activeTextEditor.document.getText(), golden);
+				return Promise.resolve();
+			})
+			.then(() => done(), done);
 	}).timeout(10000);
 });
diff --git a/test/integration/index.ts b/test/integration/index.ts
index 4a082ae..6e96c43 100644
--- a/test/integration/index.ts
+++ b/test/integration/index.ts
@@ -8,7 +8,7 @@
 export function run(): Promise<void> {
 	// Create the mocha test
 	const mocha = new Mocha({
-		ui: 'tdd',
+		ui: 'tdd'
 	});
 	mocha.useColors(true);
 
diff --git a/test/integration/utils.test.ts b/test/integration/utils.test.ts
index 563f58b..97adfa3 100644
--- a/test/integration/utils.test.ts
+++ b/test/integration/utils.test.ts
@@ -13,9 +13,7 @@
 		process.env['test1'] = 'abcd';
 		process.env['test2'] = 'defg';
 
-		const actual = substituteEnv(
-			' ${env:test1} \r\n ${env:test2}\r\n${env:test1}'
-		);
+		const actual = substituteEnv(' ${env:test1} \r\n ${env:test2}\r\n${env:test1}');
 		const expected = ' abcd \r\n defg\r\nabcd';
 
 		assert.equal(actual, expected);
diff --git a/tslint.json b/tslint.json
index 15443cd..6496d64 100644
--- a/tslint.json
+++ b/tslint.json
@@ -60,7 +60,7 @@
 		"max-classes-per-file": {
 			"options": 2
 		},
-		// "max-line-length": { "options": 120 },
+		"max-line-length": { "options": 120 },
 		"member-access": true,
 		"member-ordering": {
 			"options": {