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

Formatting code with gofmt #4000

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Formatting code with gofmt #4000

merged 3 commits into from
Sep 30, 2024

Conversation

cuishuang
Copy link
Contributor

@cuishuang cuishuang commented Sep 25, 2024

What type of PR is this?

/kind cleanup

What this PR does / Why we need it:

Formatting code with gofmt

Which issue(s) this PR fixes:

Closes #

Special notes for your reviewer:

@agones-bot
Copy link
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4000/head:pr_4000 && git checkout pr_4000
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-4bc927c

@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build profile
// +build profile
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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

Copy link
Contributor Author

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

@agones-bot
Copy link
Collaborator

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.

@agones-bot
Copy link
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4000/head:pr_4000 && git checkout pr_4000
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-3b1c678

@agones-bot
Copy link
Collaborator

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:

git fetch https://github.com/googleforgames/agones.git pull/4000/head:pr_4000 && git checkout pr_4000
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-57e5e54

@gongmax gongmax merged commit 98655de into googleforgames:main Sep 30, 2024
4 checks passed
@kamaljeeti kamaljeeti added the kind/cleanup Refactoring code, fixing up documentation, etc label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Refactoring code, fixing up documentation, etc kind/other size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants