diff --git a/.chloggen/remove-old-go-build-directives.yaml b/.chloggen/remove-old-go-build-directives.yaml new file mode 100755 index 00000000000..651ea37adda --- /dev/null +++ b/.chloggen/remove-old-go-build-directives.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: all + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove obsolete "// +build" diractive + +# One or more tracking issues or pull requests related to the change +issues: [] + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] \ No newline at end of file diff --git a/cmd/builder/internal/builder/templates/main_others.go.tmpl b/cmd/builder/internal/builder/templates/main_others.go.tmpl index e80a51cd4e0..3735aecb586 100644 --- a/cmd/builder/internal/builder/templates/main_others.go.tmpl +++ b/cmd/builder/internal/builder/templates/main_others.go.tmpl @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/builder/internal/builder/templates/main_windows.go.tmpl b/cmd/builder/internal/builder/templates/main_windows.go.tmpl index 3e001b250bf..a4930afdca1 100644 --- a/cmd/builder/internal/builder/templates/main_windows.go.tmpl +++ b/cmd/builder/internal/builder/templates/main_windows.go.tmpl @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main diff --git a/cmd/otelcorecol/main_others.go b/cmd/otelcorecol/main_others.go index e80a51cd4e0..3735aecb586 100644 --- a/cmd/otelcorecol/main_others.go +++ b/cmd/otelcorecol/main_others.go @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build !windows -// +build !windows package main diff --git a/cmd/otelcorecol/main_windows.go b/cmd/otelcorecol/main_windows.go index 285aab81289..fbae5bdc97b 100644 --- a/cmd/otelcorecol/main_windows.go +++ b/cmd/otelcorecol/main_windows.go @@ -1,7 +1,6 @@ // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. //go:build windows -// +build windows package main diff --git a/exporter/internal/otlptext/known_sync_error.go b/exporter/internal/otlptext/known_sync_error.go index 06d5913ad2b..3745fea0e79 100644 --- a/exporter/internal/otlptext/known_sync_error.go +++ b/exporter/internal/otlptext/known_sync_error.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux || darwin -// +build linux darwin package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/exporter/internal/otlptext/known_sync_error_other.go b/exporter/internal/otlptext/known_sync_error_other.go index ab8a343f877..6c9f10f8ad0 100644 --- a/exporter/internal/otlptext/known_sync_error_other.go +++ b/exporter/internal/otlptext/known_sync_error_other.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux && !darwin && !windows -// +build !linux,!darwin,!windows package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/exporter/internal/otlptext/known_sync_error_windows.go b/exporter/internal/otlptext/known_sync_error_windows.go index 780f9e65350..b7e0dc472d7 100644 --- a/exporter/internal/otlptext/known_sync_error_windows.go +++ b/exporter/internal/otlptext/known_sync_error_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" diff --git a/internal/cgroups/cgroup.go b/internal/cgroups/cgroup.go index 7848b0a8b1b..74ef31254d7 100644 --- a/internal/cgroups/cgroup.go +++ b/internal/cgroups/cgroup.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/cgroup_test.go b/internal/cgroups/cgroup_test.go index a268de10c95..f359c7c6f37 100644 --- a/internal/cgroups/cgroup_test.go +++ b/internal/cgroups/cgroup_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/cgroups.go b/internal/cgroups/cgroups.go index 1e928480c1d..0b04709c199 100644 --- a/internal/cgroups/cgroups.go +++ b/internal/cgroups/cgroups.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" import ( diff --git a/internal/cgroups/cgroups_test.go b/internal/cgroups/cgroups_test.go index 960d1417ecc..3c4c0996695 100644 --- a/internal/cgroups/cgroups_test.go +++ b/internal/cgroups/cgroups_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/errors.go b/internal/cgroups/errors.go index bfa1737f79c..815d01d5704 100644 --- a/internal/cgroups/errors.go +++ b/internal/cgroups/errors.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/mountpoint.go b/internal/cgroups/mountpoint.go index d4a6a4f97a0..69582b35aa5 100644 --- a/internal/cgroups/mountpoint.go +++ b/internal/cgroups/mountpoint.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/mountpoint_test.go b/internal/cgroups/mountpoint_test.go index ec13238b4c2..8ce2810f89f 100644 --- a/internal/cgroups/mountpoint_test.go +++ b/internal/cgroups/mountpoint_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/subsys.go b/internal/cgroups/subsys.go index 7e72a73add8..dfe60779a31 100644 --- a/internal/cgroups/subsys.go +++ b/internal/cgroups/subsys.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups // import "go.opentelemetry.io/collector/internal/cgroups" diff --git a/internal/cgroups/subsys_test.go b/internal/cgroups/subsys_test.go index 404195618b5..18adcc835fc 100644 --- a/internal/cgroups/subsys_test.go +++ b/internal/cgroups/subsys_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/cgroups/util_test.go b/internal/cgroups/util_test.go index 4b254d7c41a..9babdc7802e 100644 --- a/internal/cgroups/util_test.go +++ b/internal/cgroups/util_test.go @@ -24,7 +24,6 @@ // THE SOFTWARE. //go:build linux -// +build linux package cgroups diff --git a/internal/iruntime/total_memory_linux.go b/internal/iruntime/total_memory_linux.go index a804cbdbed3..0b53d7a604a 100644 --- a/internal/iruntime/total_memory_linux.go +++ b/internal/iruntime/total_memory_linux.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package iruntime // import "go.opentelemetry.io/collector/internal/iruntime" diff --git a/internal/iruntime/total_memory_linux_test.go b/internal/iruntime/total_memory_linux_test.go index 0a3db2786ec..563f3942207 100644 --- a/internal/iruntime/total_memory_linux_test.go +++ b/internal/iruntime/total_memory_linux_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package iruntime diff --git a/internal/iruntime/total_memory_other.go b/internal/iruntime/total_memory_other.go index 00b7116981e..8edb5915d64 100644 --- a/internal/iruntime/total_memory_other.go +++ b/internal/iruntime/total_memory_other.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux package iruntime // import "go.opentelemetry.io/collector/internal/iruntime" diff --git a/internal/iruntime/total_memory_other_test.go b/internal/iruntime/total_memory_other_test.go index 19d6f997a6c..5b1d9115827 100644 --- a/internal/iruntime/total_memory_other_test.go +++ b/internal/iruntime/total_memory_other_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build !linux -// +build !linux package iruntime diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 821dfa74f7a..06f143c3701 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build tools -// +build tools package tools // import "go.opentelemetry.io/collector/internal/tools" diff --git a/otelcol/collector_windows.go b/otelcol/collector_windows.go index 3959d28ce7c..eb2d3839d9d 100644 --- a/otelcol/collector_windows.go +++ b/otelcol/collector_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otelcol // import "go.opentelemetry.io/collector/otelcol" diff --git a/otelcol/collector_windows_test.go b/otelcol/collector_windows_test.go index a9aaf6bf922..f562c02db4c 100644 --- a/otelcol/collector_windows_test.go +++ b/otelcol/collector_windows_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build windows -// +build windows package otelcol diff --git a/service/internal/proctelemetry/process_telemetry_linux_test.go b/service/internal/proctelemetry/process_telemetry_linux_test.go index af4be74df4e..1a15f28fc7e 100644 --- a/service/internal/proctelemetry/process_telemetry_linux_test.go +++ b/service/internal/proctelemetry/process_telemetry_linux_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 //go:build linux -// +build linux package proctelemetry