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 the obsolete +build directive #30651

Merged

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Jan 17, 2024

// +build was replaced with //go:build directive in Go 1.17. +build can be removed since we support only 1.20 and 1.21

Same as open-telemetry/opentelemetry-collector#9304

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
semconv "go.opentelemetry.io/collector/semconv/v1.21.0"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor"
"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/config"
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure the linter wasn't complaining about it

Copy link
Member

Choose a reason for hiding this comment

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

I believe the linter only runs against files which match certain tags. See #11557

Not sure if the new syntax is handled more appropriately but it's possible we have better coverage now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably not. This change was triggered by my IDE, not linter

"// +build" was replaced with "//go:build" directive in 1.17. +build can be removed since we support only 1.20 and 1.21
@dmitryax dmitryax force-pushed the remove-absolete-build-directive branch from 8db5c8c to 900e5ee Compare January 17, 2024 20:24
@dmitryax dmitryax merged commit 6f3ff4a into open-telemetry:main Jan 17, 2024
81 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 17, 2024
mfyuce pushed a commit to mfyuce/opentelemetry-collector-contrib that referenced this pull request Jan 18, 2024
`// +build` was replaced with `//go:build` directive in Go 1.17. +build
can be removed since we support only 1.20 and 1.21

Same as
open-telemetry/opentelemetry-collector#9304
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Feb 1, 2024
`// +build` was replaced with `//go:build` directive in Go 1.17. +build
can be removed since we support only 1.20 and 1.21

Same as
open-telemetry/opentelemetry-collector#9304
anthoai97 pushed a commit to anthoai97/opentelemetry-collector-contrib that referenced this pull request Feb 12, 2024
`// +build` was replaced with `//go:build` directive in Go 1.17. +build
can be removed since we support only 1.20 and 1.21

Same as
open-telemetry/opentelemetry-collector#9304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants