Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Simple type-declaration statements #224

Open
qianxi0410 opened this issue Apr 22, 2022 · 1 comment
Open

feature: Simple type-declaration statements #224

qianxi0410 opened this issue Apr 22, 2022 · 1 comment

Comments

@qianxi0410
Copy link

As simplification of var declaration,Can you consider adding type declarations to the ranks of simplification?

exp:

type ExampleArgs struct {
	X int
}
type ExampleReply struct {
	Y int
}

after:

type (
	ExampleArgs struct {
		X int
	}
	ExampleReply struct {
		Y int
	}
)
@mvdan
Copy link
Owner

mvdan commented Apr 22, 2022

Nice catch - we have always meant to do this reformatting, but we didn't because of a bug when it comes to multi-line type declarations. I have a patch in progress locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants