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 #6402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexbozhenko
Copy link
Contributor

@alexbozhenko alexbozhenko commented Jan 23, 2025

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]>
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants