Skip to content

Commit

Permalink
replace +build with go:build
Browse files Browse the repository at this point in the history
go:build is the new conditional compilation directive used to specify build constraints. It was introduced in Go 1.17. It is meant to replace the old +build directives.

Now that go.mod points to Go 1.17 we no longer need to support both
build flags.

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
  • Loading branch information
bacongobbler committed Apr 14, 2022
1 parent f91e8d2 commit 2878cc8
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion cmd/helm/root_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

/*
Copyright The Helm Authors.
Expand Down
1 change: 0 additions & 1 deletion cmd/helm/root_unix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

/*
Copyright The Helm Authors.
Expand Down
2 changes: 1 addition & 1 deletion internal/third_party/dep/fs/rename.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !windows
//go:build !windows

/*
Copyright (c) for portions of rename.go are held by The Go Authors, 2016 and are provided under
Expand Down
2 changes: 1 addition & 1 deletion internal/third_party/dep/fs/rename_windows.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build windows
//go:build windows

/*
Copyright (c) for portions of rename_windows.go are held by The Go Authors, 2016 and are provided under
Expand Down
1 change: 0 additions & 1 deletion pkg/helmpath/home_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// limitations under the License.

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

package helmpath

Expand Down
2 changes: 1 addition & 1 deletion pkg/helmpath/home_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build windows
//go:build windows

package helmpath

Expand Down
1 change: 0 additions & 1 deletion pkg/helmpath/lazypath_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// limitations under the License.

//go:build darwin
// +build darwin

package helmpath

Expand Down
1 change: 0 additions & 1 deletion pkg/helmpath/lazypath_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// limitations under the License.

//go:build darwin
// +build darwin

package helmpath

Expand Down
1 change: 0 additions & 1 deletion pkg/helmpath/lazypath_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// limitations under the License.

//go:build !windows && !darwin
// +build !windows,!darwin

package helmpath

Expand Down
1 change: 0 additions & 1 deletion pkg/helmpath/lazypath_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// limitations under the License.

//go:build !windows && !darwin
// +build !windows,!darwin

package helmpath

Expand Down
2 changes: 1 addition & 1 deletion pkg/helmpath/lazypath_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build windows
//go:build windows

package helmpath

Expand Down
2 changes: 1 addition & 1 deletion pkg/helmpath/lazypath_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build windows
//go:build windows

package helmpath

Expand Down

0 comments on commit 2878cc8

Please sign in to comment.