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

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

Merged
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
ramya-rao-a:gooutline-updates
Oct 26, 2016
Merged

Use -imports-only option from go-outline#550
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
ramya-rao-a:gooutline-updates

Conversation

@ramya-rao-a
Copy link
Copy Markdown
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
Comment thread src/goOutline.ts
export function documentSymbols(options: GoOutlineOptions): Promise<GoOutlineDeclaration[]> {
return new Promise<GoOutlineDeclaration[]>((resolve, reject) => {
let gooutline = getBinPath('go-outline');
let gooutlineFlags = ['-f', options.fileName];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

camelCase?

Comment thread test/go.test.ts
);
return Promise.all(promises);
}).then(() => {
vscode.commands.executeCommand('workbench.action.closeActiveEditor');
Copy link
Copy Markdown
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