Skip to content
This repository was archived by the owner on Sep 24, 2021. It is now read-only.

Commit 5b397dc

Browse files
committed
[commands] added new fill struct command
Signed-off-by: Jan Koehnlein <jan.koehnlein@typefox.io>
1 parent 1bfb6e7 commit 5b397dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src-vscode-mock/activate.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { buildCode } from '../src/goBuild';
2525
import { MessageType, workspace } from './vscode';
2626
import { updateGoPathGoRootFromConfig, offerToInstallTools, installAllTools } from '../src/goInstallTools';
2727
import { getCurrentGoPath, getToolsGopath } from '../src/util';
28+
import { runFillStruct } from '../src/goFillStruct';
2829

2930
export async function activate(lspClient: LspClient, lspServer: LspServer, logger: Logger): Promise<void> {
3031
outputChannel.lspClient = lspClient;
@@ -114,6 +115,10 @@ export async function activate(lspClient: LspClient, lspServer: LspServer, logge
114115
});
115116

116117
commands.registerCommand('go.tools.install', installAllTools);
118+
119+
commands.registerCommand('go.fill.struct', () => {
120+
runFillStruct(window.activeTextEditor);
121+
});
117122

118123
return updateGoPathGoRootFromConfig().then(() => {
119124
lspClient.sendTelemetryEvent(workspace.getConfiguration('go'));

0 commit comments

Comments
 (0)