Skip to content

Commit

Permalink
Remove the obsolete +build directive (#9304)
Browse files Browse the repository at this point in the history
`// +build` was replaced with `//go:build` directive in Go 1.17. The
`+build` can be removed since we support only 1.20 and 1.21
  • Loading branch information
dmitryax authored Jan 17, 2024
1 parent 6712bf2 commit 20710ff
Show file tree
Hide file tree
Showing 26 changed files with 20 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .chloggen/remove-old-go-build-directives.yaml
Original file line number Diff line number Diff line change
@@ -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: [9304]

# 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]
1 change: 0 additions & 1 deletion cmd/builder/internal/builder/templates/main_others.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.

//go:build !windows
// +build !windows

package main

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.

//go:build windows
// +build windows

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/otelcorecol/main_others.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cmd/otelcorecol/main_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion exporter/internal/otlptext/known_sync_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion exporter/internal/otlptext/known_sync_error_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion exporter/internal/otlptext/known_sync_error_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups // import "go.opentelemetry.io/collector/internal/cgroups"

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/cgroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/cgroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups // import "go.opentelemetry.io/collector/internal/cgroups"
import (
Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/cgroups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups // import "go.opentelemetry.io/collector/internal/cgroups"

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/mountpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups // import "go.opentelemetry.io/collector/internal/cgroups"

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/mountpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/subsys.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups // import "go.opentelemetry.io/collector/internal/cgroups"

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/subsys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups

Expand Down
1 change: 0 additions & 1 deletion internal/cgroups/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
// THE SOFTWARE.

//go:build linux
// +build linux

package cgroups

Expand Down
1 change: 0 additions & 1 deletion internal/iruntime/total_memory_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build linux
// +build linux

package iruntime // import "go.opentelemetry.io/collector/internal/iruntime"

Expand Down
1 change: 0 additions & 1 deletion internal/iruntime/total_memory_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build linux
// +build linux

package iruntime

Expand Down
1 change: 0 additions & 1 deletion internal/iruntime/total_memory_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build !linux
// +build !linux

package iruntime // import "go.opentelemetry.io/collector/internal/iruntime"

Expand Down
1 change: 0 additions & 1 deletion internal/iruntime/total_memory_other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build !linux
// +build !linux

package iruntime

Expand Down
1 change: 0 additions & 1 deletion internal/tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build tools
// +build tools

package tools // import "go.opentelemetry.io/collector/internal/tools"

Expand Down
1 change: 0 additions & 1 deletion otelcol/collector_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build windows
// +build windows

package otelcol // import "go.opentelemetry.io/collector/otelcol"

Expand Down
1 change: 0 additions & 1 deletion otelcol/collector_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build windows
// +build windows

package otelcol

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

//go:build linux
// +build linux

package proctelemetry

Expand Down

0 comments on commit 20710ff

Please sign in to comment.