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

请问 Uber 的 go vet 是不是自定义的 #32

Open
GoneGo1ng opened this issue Jan 5, 2021 · 0 comments
Open

请问 Uber 的 go vet 是不是自定义的 #32

GoneGo1ng opened this issue Jan 5, 2021 · 0 comments

Comments

@GoneGo1ng
Copy link

下面这个例子,我使用 go vet 命令,并没有提示异常,这个规范是不是要自定义,Uber 有把 vettool 开源出来吗?

使用字段名初始化结构体

初始化结构体时,应该指定字段名称。现在由 go vet 强制执行。

BadGood
k := User{"John", "Doe", true}
k := User{
    FirstName: "John",
    LastName: "Doe",
    Admin: true,
}
@GoneGo1ng GoneGo1ng changed the title 请问Uber的go vet是不是自定义的 请问 Uber 的 go vet 是不是自定义的 Jan 5, 2021
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

1 participant