Skip to content

Commit

Permalink
package.json: deprecate goformat
Browse files Browse the repository at this point in the history
goformat can't format modern Go code that uses generics.
See mbenkmann/goformat#2

Change-Id: I6ef36db10677fd7e31ea20bb95d75db5d152edd1
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/641875
Reviewed-by: Michael Knyszek <[email protected]>
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
alexandear authored and hyangah committed Jan 15, 2025
1 parent 3fec532 commit fe8bfac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Allowed Options:
* `default`: If the language server is enabled, format via the language server, which already supports gofmt, goimports, goreturns, and gofumpt. Otherwise, goimports.
* `gofmt`: Formats the file according to the standard Go style. (not applicable when the language server is enabled)
* `goimports`: Organizes imports and formats the file with gofmt. (not applicable when the language server is enabled)
* `goformat`: Configurable gofmt, see https://github.com/mbenkmann/goformat.
* `goformat`: Configurable gofmt, see https://github.com/mbenkmann/goformat. (Deprecated due to the lack of generics support)
* `gofumpt`: Stricter version of gofmt, see https://github.com/mvdan/gofumpt. . Use `#gopls.format.gofumpt#` instead)
* `custom`: Formats using the custom tool specified as `customFormatter` in the `#go.alternateTools#` setting. The tool should take the input as STDIN and output the formatted code as STDOUT.

Expand Down
2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@
"If the language server is enabled, format via the language server, which already supports gofmt, goimports, goreturns, and gofumpt. Otherwise, goimports.",
"Formats the file according to the standard Go style. (not applicable when the language server is enabled)",
"Organizes imports and formats the file with gofmt. (not applicable when the language server is enabled)",
"Configurable gofmt, see https://github.com/mbenkmann/goformat.",
"Configurable gofmt, see https://github.com/mbenkmann/goformat. (Deprecated due to the lack of generics support)",
"Stricter version of gofmt, see https://github.com/mvdan/gofumpt. . Use `#gopls.format.gofumpt#` instead)",
"Formats using the custom tool specified as `customFormatter` in the `#go.alternateTools#` setting. The tool should take the input as STDIN and output the formatted code as STDOUT."
]
Expand Down

0 comments on commit fe8bfac

Please sign in to comment.