-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Description:
When I format .api files with the goctl plugin in VSCode, type definitions within a type() block are incorrectly modified. For example, this:
type (
TestReq {}
)
gets changed to:
type (
TestReq struct{}
)
This addition of struct{} causes a syntax error in .api files. The formatting should not modify the type definition in this way.
To Reproduce
- Open a
.apifile in VSCode. - Define a type in a
type()block, such asTestReq {}. - Format the file using the
goctlplugin. - Notice that
TestReq {}is changed toTestReq struct{}, causing a syntax error.
Environments (please complete the following information):
- OS: [Windows11]
- go-zero version [1.8.1]
- goctl version [1.8.1]
- goctl visual studio code extension [0.1.10]
Metadata
Metadata
Assignees
Labels
No labels