diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 102304e90..8d7d170f5 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -10,7 +10,6 @@ import { basename, dirname } from 'path'; import { spawn, ChildProcess } from 'child_process'; import { Client, RPCConnection } from 'json-rpc2'; import { getBinPath } from '../goPath'; -import {random} from './../util'; require('console-stamp')(console); @@ -709,4 +708,8 @@ class GoDebugSession extends DebugSession { } } +function random(low: number, high: number): number { + return Math.floor(Math.random() * (high - low) + low); +} + DebugSession.run(GoDebugSession); diff --git a/src/util.ts b/src/util.ts index c66a4de30..2c19eebd1 100644 --- a/src/util.ts +++ b/src/util.ts @@ -107,7 +107,7 @@ export function canonicalizeGOPATHPrefix(filename: string): string { } /** - * Gets version of Go based on the output of the command `go version`. + * Gets version of Go based on the output of the command `go version`. * Returns null if go is being used from source/tip in which case `go version` will not return release tag like go1.6.3 */ export function getGoVersion(): Promise { @@ -161,7 +161,3 @@ export function isVendorSupported(): Promise { return vendorSupport; }); } - -export function random(low: number, high: number): number { - return Math.floor(Math.random() * (high - low) + low); -}