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

Remove obsolete build tags #1787

Merged
merged 4 commits into from
Jan 24, 2025
Merged

Remove obsolete build tags #1787

merged 4 commits into from
Jan 24, 2025

Conversation

alexbozhenko
Copy link
Contributor

@alexbozhenko alexbozhenko commented Jan 23, 2025

similar to nats-io/nats-server#6402

Run:
# go fix ./...

It removed obsolete // +build lines: https://tip.golang.org/doc/go1.18#go-build-lines
Current build tag syntax: https://pkg.go.dev/cmd/go#hdr-Build_constraints

Since new fixes are rarely introduced, we shouldn't bother with running this automatically:
https://go.dev/blog/introducing-gofix
https://pkg.go.dev/cmd/[email protected]

go tool fix -h
Available rewrites are:

buildtag
        Remove +build comments from modules using Go 1.18 or later

cftype
        Fixes initializers and casts of C.*Ref and JNI types

context
        Change imports of golang.org/x/net/context to context

egl
        Fixes initializers of EGLDisplay

eglconf
        Fixes initializers of EGLConfig

gotypes
        Change imports of golang.org/x/tools/go/{exact,types} to go/{constant,types}

jni
        Fixes initializers of JNI's jobject and subtypes

netipv6zone
        Adapt element key to IPAddr, UDPAddr or TCPAddr composite literals.

        https://codereview.appspot.com/6849045/

printerconfig
        Add element keys to Config composite literals.

Signed-off-by: Alex Bozhenko [email protected]

Signed-off-by: Alex Bozhenko <[email protected]>
@coveralls
Copy link

coveralls commented Jan 23, 2025

Coverage Status

coverage: 84.93%. remained the same
when pulling 8903d20 on alexbozhenko:go_fix
into bb3ad1c on nats-io:main.

Copy link
Collaborator

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just few possible improvements while we're on this topic.

@alexbozhenko alexbozhenko requested a review from piotrpio January 24, 2025 17:07
Copy link
Collaborator

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@piotrpio piotrpio merged commit 5945afd into nats-io:main Jan 24, 2025
4 checks passed
@piotrpio piotrpio mentioned this pull request Feb 5, 2025
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

Successfully merging this pull request may close these issues.

3 participants