From 9742125edfed95596037420fdcd06b06f5cdbc84 Mon Sep 17 00:00:00 2001 From: Aleksandr Maus Date: Mon, 11 Oct 2021 09:15:21 -0700 Subject: [PATCH] Fix build tags for Go 1.17 (#28338) --- dev-tools/cmd/asset/asset.go | 1 + dev-tools/mage/keychain_test.go | 1 + dev-tools/magefile.go | 1 + dev-tools/packaging/preference-pane/magefile.go | 1 + magefile.go | 1 + x-pack/osquerybeat/internal/install/install_unix.go | 3 ++- x-pack/osquerybeat/internal/install/install_windows.go | 3 ++- x-pack/osquerybeat/internal/osqd/osqueryd_unix.go | 1 + x-pack/osquerybeat/internal/osqd/osqueryd_windows.go | 1 + x-pack/osquerybeat/magefile.go | 1 + 10 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dev-tools/cmd/asset/asset.go b/dev-tools/cmd/asset/asset.go index 1696e078136..e33f1b82aa7 100644 --- a/dev-tools/cmd/asset/asset.go +++ b/dev-tools/cmd/asset/asset.go @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +//go:build ignore // +build ignore package main diff --git a/dev-tools/mage/keychain_test.go b/dev-tools/mage/keychain_test.go index 949ca9ac5bf..1becebf5e87 100644 --- a/dev-tools/mage/keychain_test.go +++ b/dev-tools/mage/keychain_test.go @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +//go:build darwin // +build darwin package mage diff --git a/dev-tools/magefile.go b/dev-tools/magefile.go index 5bdc2479042..7f703ba2077 100644 --- a/dev-tools/magefile.go +++ b/dev-tools/magefile.go @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +//go:build mage // +build mage package main diff --git a/dev-tools/packaging/preference-pane/magefile.go b/dev-tools/packaging/preference-pane/magefile.go index 77eb9c437da..4369fc92da6 100644 --- a/dev-tools/packaging/preference-pane/magefile.go +++ b/dev-tools/packaging/preference-pane/magefile.go @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +//go:build mage // +build mage package main diff --git a/magefile.go b/magefile.go index 75c6d60faef..70b9f6cfecf 100644 --- a/magefile.go +++ b/magefile.go @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +//go:build mage // +build mage package main diff --git a/x-pack/osquerybeat/internal/install/install_unix.go b/x-pack/osquerybeat/internal/install/install_unix.go index 6a16368540b..769e5ba1485 100644 --- a/x-pack/osquerybeat/internal/install/install_unix.go +++ b/x-pack/osquerybeat/internal/install/install_unix.go @@ -2,7 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//+build !windows +//go:build !windows +// +build !windows package install diff --git a/x-pack/osquerybeat/internal/install/install_windows.go b/x-pack/osquerybeat/internal/install/install_windows.go index b28608e7e92..090303f4d0b 100644 --- a/x-pack/osquerybeat/internal/install/install_windows.go +++ b/x-pack/osquerybeat/internal/install/install_windows.go @@ -2,7 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//+build windows +//go:build windows +// +build windows package install diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd_unix.go b/x-pack/osquerybeat/internal/osqd/osqueryd_unix.go index 0d5da3e1cfa..4840bad4329 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd_unix.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd_unix.go @@ -2,6 +2,7 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !windows // +build !windows package osqd diff --git a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go index 758dce74500..5be16ba8669 100644 --- a/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go +++ b/x-pack/osquerybeat/internal/osqd/osqueryd_windows.go @@ -2,6 +2,7 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build windows // +build windows package osqd diff --git a/x-pack/osquerybeat/magefile.go b/x-pack/osquerybeat/magefile.go index 583b3e917cb..d3e1923561b 100644 --- a/x-pack/osquerybeat/magefile.go +++ b/x-pack/osquerybeat/magefile.go @@ -2,6 +2,7 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build mage // +build mage package main