-
Notifications
You must be signed in to change notification settings - Fork 816
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
Formatting code with gofmt #4000
Conversation
Signed-off-by: cuishuang <[email protected]>
Build Succeeded 🥳 Build Id: e194b170-2dc1-4d31-a607-9fceeb0e0f97 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@@ -12,6 +12,7 @@ | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
//go:build profile | |||
// +build profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This serves the same purpose of line 15, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently both serve the same purpose. //go:build xxx is the new recommended syntax introduced in Go 1.17, and gofmt will automatically add it when // +build is present without //go:build.
For more details, please refer to this link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether we can remove the // +build profile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is that if someone builds with a version lower than go 1.17, I think there will be issues. Because early versions of Go did not have this feature. So for better compatibility, both can be retained
Build Failed 😭 Build Id: e279f1ef-cc96-4b94-bccd-507d310ac4a7 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 🥳 Build Id: e9aa5323-e234-4c17-b07b-ffa108ad18b7 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 🥳 Build Id: 625da912-529d-4525-9125-c61c7e549018 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
What this PR does / Why we need it:
Formatting code with gofmt
Which issue(s) this PR fixes:
Closes #
Special notes for your reviewer: