Skip to content

Commit

Permalink
docs: update fill struct feature documentation
Browse files Browse the repository at this point in the history
The latest version no longer offers the "Go: Fill struct" command.
Suggest the code action.

Fixes #3104

Change-Id: Ida95173f0f88322b32ac319d3f8aa1d3d7cf1b5c
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/553075
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
  • Loading branch information
hyangah committed Dec 28, 2023
1 parent 445a800 commit 4d53cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ Easily generate unit tests for your project by running one of the [`Go: Generate

### Fill struct literals

Use the [`Go: Fill struct`](commands.md#fill-struct) command to automatically fill a struct literal with its default values.
Use the [Code Action](https://code.visualstudio.com/docs/editor/refactoring#_code-actions-quick-fixes-and-refactorings) to automatically fill a struct literal with its default values. The Go language server provides this capability as a `refactor.rewrite` type code action.

<div style="text-align: center;"><img src="images/fillstructliterals.gif" alt="Fill struct literals" style="width: 75%"> </div>
<div style="text-align: center;"><img src="images/fillstruct.png" alt="Fill struct literals"> </div>

**Note**: The old "Go: Fill struct" command was removed in v0.40.0 in favor of the Code Action.

## Diagnostics

Expand Down
Binary file added docs/images/fillstruct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/fillstructliterals.gif
Binary file not shown.

0 comments on commit 4d53cdc

Please sign in to comment.