You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user has the newer version of gopls, call the
gopls command modify_tags which uses the modifytags
library to implement adding and removing struct tags.
If the user does not have the latest gopls, we maintain
the old behavior of downloading and invoking the
gomodifytags executable.
Change-Id: If01e9ff0a1eeb127ec5139b5b3cb97ef938ce620
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/652017
Reviewed-by: Hongxiang Jiang <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
kokoro-CI: kokoro <[email protected]>
Copy file name to clipboardExpand all lines: docs/features.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,7 @@ For known issues with this feature see [golang/go#37170](https://github.com/gola
253
253
254
254
### Add or remove struct tags
255
255
256
-
Use the [`Go: Add Tags to Struct Fields`](commands.md#go-add-tags-to-struct-fields) command to automatically generate or remove [tags](https://pkg.go.dev/reflect?tab=doc#StructTag) for your struct. This feature is provided by the [`gomodifytags`](tools.md#gomodifytags) tool.
256
+
Use the [`Go: Add Tags to Struct Fields`](commands.md#go-add-tags-to-struct-fields) command to automatically generate or remove [tags](https://pkg.go.dev/reflect?tab=doc#StructTag) for your struct. This feature is provided by the [`gomodifytags`](tools.md#gomodifytags) tool invoked via gopls.
257
257
258
258
<divstyle="text-align: center;"><imgsrc="images/addtagstostructfields.gif"alt="Add tags to struct fields"style="width: 75%"> </div>
This tool provides support for the [`Go: Add Tags to Struct Fields`](features.md#add-or-remove-struct-tags) and [`Go: Remove Tags From Struct Fields`](features.md#add-or-remove-struct-tags) commands.
51
+
This tool provides support for the [`Go: Add Tags to Struct Fields`](features.md#add-or-remove-struct-tags) and [`Go: Remove Tags From Struct Fields`](features.md#add-or-remove-struct-tags) commands when using older versions of gopls. The latest
52
+
version of gopls has a gopls.modify_tags command which directly invokes the
0 commit comments