Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fix #564 - util should not be imported from the debug adapter!
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Oct 27, 2016
1 parent a6f91dd commit 25710e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
6 changes: 1 addition & 5 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SemVersion> {
Expand Down Expand Up @@ -161,7 +161,3 @@ export function isVendorSupported(): Promise<boolean> {
return vendorSupport;
});
}

export function random(low: number, high: number): number {
return Math.floor(Math.random() * (high - low) + low);
}

0 comments on commit 25710e7

Please sign in to comment.