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

Use -imports-only option from go-outline #550

Merged
merged 2 commits into from
Oct 26, 2016

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Oct 23, 2016

We use go-outline tool to get list of imported packages in the current file. go-outline internally parses the file to return all symbols. But since we need only imports, the whole file need not be parsed. lukehoban/go-outline#4 added the option to parse only the initial part of the file that contains the imports.
This PR uses this option.

@ramya-rao-a ramya-rao-a force-pushed the gooutline-updates branch 3 times, most recently from 3ac4060 to 9ea6a2b Compare October 24, 2016 19:56
return new Promise<GoOutlineDeclaration[]>((resolve, reject) => {
let gooutline = getBinPath('go-outline');
let gooutlineFlags = ['-f', options.fileName];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelCase?

@@ -97,6 +97,9 @@ encountered.
})
);
return Promise.all(promises);
}).then(() => {
vscode.commands.executeCommand('workbench.action.closeActiveEditor');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

executeCommand returns a promise - don't know if it matters though

@ramya-rao-a ramya-rao-a merged commit 708b2ad into microsoft:master Oct 26, 2016
@ramya-rao-a ramya-rao-a deleted the gooutline-updates branch October 30, 2016 00:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants