diff --git a/docs/commands.md b/docs/commands.md
index 372613a48e..6c418f8416 100644
--- a/docs/commands.md
+++ b/docs/commands.md
@@ -165,11 +165,11 @@ Start the Go language server's maintainer interface (a web server).
### `Go: Add Tags To Struct Fields`
-Add tags configured in go.addTags setting to selected struct using gomodifytags
+Add tags configured in go.addTags setting to selected struct using gopmodifytags
### `Go: Remove Tags From Struct Fields`
-Remove tags configured in go.removeTags setting from selected struct using gomodifytags
+Remove tags configured in go.removeTags setting from selected struct using gopmodifytags
### `Go: Fill struct`
diff --git a/docs/features.md b/docs/features.md
index a969315afd..a4566bcdb2 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -230,7 +230,7 @@ For known issues with this feature see [golang/go#37170](https://github.com/gola
### Add or remove struct tags
-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.
+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 [`gopmodifytags`](tools.md#gopmodifytags) tool.
diff --git a/docs/tools.md b/docs/tools.md
index 4bcc3760e5..95465d3263 100644
--- a/docs/tools.md
+++ b/docs/tools.md
@@ -46,7 +46,7 @@ This tool provides the information needed to compute the various test code lense
This tool provides support for the [`Go: Run on Go Playground`](features.md#go-playground) command.
-### [`gomodifytags`](https://pkg.go.dev/github.com/fatih/gomodifytags?tab=overview)
+### [`gopmodifytags`](https://pkg.go.dev/github.com/goplus/gopmodifytags?tab=overview)
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.
diff --git a/package.json b/package.json
index dda9d81785..e66aa194ea 100644
--- a/package.json
+++ b/package.json
@@ -442,12 +442,12 @@
{
"command": "gop.add.tags",
"title": "Go+: Add Tags To Struct Fields",
- "description": "Add tags configured in go.addTags setting to selected struct using gomodifytags"
+ "description": "Add tags configured in go.addTags setting to selected struct using gopmodifytags"
},
{
"command": "gop.remove.tags",
"title": "Go+: Remove Tags From Struct Fields",
- "description": "Remove tags configured in go.removeTags setting from selected struct using gomodifytags"
+ "description": "Remove tags configured in go.removeTags setting from selected struct using gopmodifytags"
},
{
"command": "gop.fill.struct",
diff --git a/src/goModifytags.ts b/src/goModifytags.ts
index 5cd87ece75..e28739d777 100644
--- a/src/goModifytags.ts
+++ b/src/goModifytags.ts
@@ -92,7 +92,7 @@ function getCommonArgs(): string[] {
vscode.window.showInformationMessage('No editor is active.');
return [];
}
- if (!editor.document.fileName.endsWith('.go')) {
+ if (!editor.document.fileName.endsWith('.go') && !editor.document.fileName.endsWith('.gop')) {
vscode.window.showInformationMessage('Current file is not a Go file.');
return [];
}
@@ -162,7 +162,7 @@ function getTagsAndOptions(config: GoTagsConfig, commandArgs: GoTagsConfig): The
}
function runGomodifytags(args: string[]) {
- const gomodifytags = getBinPath('gomodifytags');
+ const gomodifytags = getBinPath('gopmodifytags');
const editor = vscode.window.activeTextEditor;
if (!editor) {
return;
@@ -170,14 +170,14 @@ function runGomodifytags(args: string[]) {
const input = getFileArchive(editor.document);
const p = cp.execFile(gomodifytags, args, { env: toolExecutionEnvironment() }, (err, stdout, stderr) => {
if (err && (err).code === 'ENOENT') {
- promptForMissingTool('gomodifytags');
+ promptForMissingTool('gopmodifytags');
return;
}
if (err && (err).code === 2 && args.indexOf('--template') > 0) {
vscode.window.showInformationMessage(
'Cannot modify tags: you might be using a' + 'version that does not support --template'
);
- promptForUpdatingTool('gomodifytags');
+ promptForUpdatingTool('gopmodifytags');
return;
}
if (err) {
diff --git a/src/goTools.ts b/src/goTools.ts
index ddd82cd9d3..3c0ac9c94b 100644
--- a/src/goTools.ts
+++ b/src/goTools.ts
@@ -158,7 +158,7 @@ export function getConfiguredTools(
'guru',
'gorename',
'gotests',
- 'gomodifytags',
+ 'gopmodifytags',
'impl',
'fillstruct',
'goplay',
diff --git a/src/goToolsInformation.ts b/src/goToolsInformation.ts
index 7487c44119..ec30d8f50a 100644
--- a/src/goToolsInformation.ts
+++ b/src/goToolsInformation.ts
@@ -59,10 +59,10 @@ export const allToolsInformation: { [key: string]: Tool } = {
isImportant: false,
description: 'Rename symbols'
},
- 'gomodifytags': {
- name: 'gomodifytags',
- importPath: 'github.com/fatih/gomodifytags',
- modulePath: 'github.com/fatih/gomodifytags',
+ 'gopmodifytags': {
+ name: 'gopmodifytags',
+ importPath: 'github.com/goplus/gopmodifytags',
+ modulePath: 'github.com/goplus/gopmodifytags',
replacedByGopls: false,
isImportant: false,
description: 'Modify tags on structs',
diff --git a/tools/allTools.ts.in b/tools/allTools.ts.in
index 0e6fcb9ff7..85b4722fa2 100644
--- a/tools/allTools.ts.in
+++ b/tools/allTools.ts.in
@@ -57,10 +57,10 @@ export const allToolsInformation: { [key: string]: Tool } = {
isImportant: false,
description: 'Rename symbols'
},
- 'gomodifytags': {
- name: 'gomodifytags',
- importPath: 'github.com/fatih/gomodifytags',
- modulePath: 'github.com/fatih/gomodifytags',
+ 'gopmodifytags': {
+ name: 'gopmodifytags',
+ importPath: 'github.com/goplus/gopmodifytags',
+ modulePath: 'github.com/goplus/gopmodifytags',
replacedByGopls: false,
isImportant: false,
description: 'Modify tags on structs',