diff --git a/converger/converger_test.go b/converger/converger_test.go
index 62aafc19..50b2c372 100644
--- a/converger/converger_test.go
+++ b/converger/converger_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package converger
diff --git a/engine/autoedge_test.go b/engine/autoedge_test.go
index 4b60280c..1bd5b875 100644
--- a/engine/autoedge_test.go
+++ b/engine/autoedge_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package engine
diff --git a/engine/graph/autogroup/autogroup_test.go b/engine/graph/autogroup/autogroup_test.go
index 3efb7ad3..69f4e179 100644
--- a/engine/graph/autogroup/autogroup_test.go
+++ b/engine/graph/autogroup/autogroup_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package autogroup
diff --git a/engine/graph/graph_test.go b/engine/graph/graph_test.go
index 1465a1ca..abf0e90a 100644
--- a/engine/graph/graph_test.go
+++ b/engine/graph/graph_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package graph
diff --git a/engine/graph/semaphore_test.go b/engine/graph/semaphore_test.go
index 1fbb2963..7bfa3724 100644
--- a/engine/graph/semaphore_test.go
+++ b/engine/graph/semaphore_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package graph
diff --git a/engine/metaparams_test.go b/engine/metaparams_test.go
index 0f600243..ecb34128 100644
--- a/engine/metaparams_test.go
+++ b/engine/metaparams_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package engine
diff --git a/engine/resources/augeas.go b/engine/resources/augeas.go
index 9c6e0987..9d47bd88 100644
--- a/engine/resources/augeas.go
+++ b/engine/resources/augeas.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !noaugeas
+//go:build !noaugeas
package resources
diff --git a/engine/resources/docker_container.go b/engine/resources/docker_container.go
index 04dcfda7..d4a9a667 100644
--- a/engine/resources/docker_container.go
+++ b/engine/resources/docker_container.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !nodocker
+//go:build !nodocker
package resources
diff --git a/engine/resources/docker_container_test.go b/engine/resources/docker_container_test.go
index 8b8bb0ee..dd791e47 100644
--- a/engine/resources/docker_container_test.go
+++ b/engine/resources/docker_container_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !nodocker
+//go:build !nodocker
package resources
diff --git a/engine/resources/docker_image.go b/engine/resources/docker_image.go
index 6376c3fb..524529c7 100644
--- a/engine/resources/docker_image.go
+++ b/engine/resources/docker_image.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !nodocker
+//go:build !nodocker
package resources
diff --git a/engine/resources/exec_test.go b/engine/resources/exec_test.go
index 5e8c433e..b256188d 100644
--- a/engine/resources/exec_test.go
+++ b/engine/resources/exec_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/file_test.go b/engine/resources/file_test.go
index 1d081cd0..e6acae92 100644
--- a/engine/resources/file_test.go
+++ b/engine/resources/file_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/mount_linux_test.go b/engine/resources/mount_linux_test.go
index 11a910d7..ed3142e2 100644
--- a/engine/resources/mount_linux_test.go
+++ b/engine/resources/mount_linux_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root !darwin
+//go:build !root || !darwin
package resources
diff --git a/engine/resources/mount_test.go b/engine/resources/mount_test.go
index fbd01069..ee80457b 100644
--- a/engine/resources/mount_test.go
+++ b/engine/resources/mount_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/msg_test.go b/engine/resources/msg_test.go
index 5299eec3..f357e91c 100644
--- a/engine/resources/msg_test.go
+++ b/engine/resources/msg_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/net.go b/engine/resources/net.go
index 2150e11b..88a81191 100644
--- a/engine/resources/net.go
+++ b/engine/resources/net.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package resources
diff --git a/engine/resources/net_test.go b/engine/resources/net_test.go
index 9ec3afdc..e3ccbb53 100644
--- a/engine/resources/net_test.go
+++ b/engine/resources/net_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package resources
diff --git a/engine/resources/noop_test.go b/engine/resources/noop_test.go
index 9a6934a8..c22b2d49 100644
--- a/engine/resources/noop_test.go
+++ b/engine/resources/noop_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/pippet_test.go b/engine/resources/pippet_test.go
index eeb8fa62..fa18accf 100644
--- a/engine/resources/pippet_test.go
+++ b/engine/resources/pippet_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/pkg_test.go b/engine/resources/pkg_test.go
index 20427616..a08faa74 100644
--- a/engine/resources/pkg_test.go
+++ b/engine/resources/pkg_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/resources_test.go b/engine/resources/resources_test.go
index cdcfc99c..e4684753 100644
--- a/engine/resources/resources_test.go
+++ b/engine/resources/resources_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/test_test.go b/engine/resources/test_test.go
index 08755483..9c175df9 100644
--- a/engine/resources/test_test.go
+++ b/engine/resources/test_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package resources
diff --git a/engine/resources/virt.go b/engine/resources/virt.go
index 0ba41287..1497d615 100644
--- a/engine/resources/virt.go
+++ b/engine/resources/virt.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !novirt
+//go:build !novirt
package resources
diff --git a/engine/util/mode_test.go b/engine/util/mode_test.go
index 7f4c4d38..29edf524 100644
--- a/engine/util/mode_test.go
+++ b/engine/util/mode_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/engine/util/util_test.go b/engine/util/util_test.go
index ddac2631..2971a5ed 100644
--- a/engine/util/util_test.go
+++ b/engine/util/util_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/etcd/etcd_test.go b/etcd/etcd_test.go
index 7056d954..700a35bd 100644
--- a/etcd/etcd_test.go
+++ b/etcd/etcd_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package etcd
diff --git a/etcd/fs/fs_test.go b/etcd/fs/fs_test.go
index d3d775ad..6106bf17 100644
--- a/etcd/fs/fs_test.go
+++ b/etcd/fs/fs_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package fs_test // named this way to make it easier for examples
diff --git a/etcd/util_test.go b/etcd/util_test.go
index 8996d095..d749f10a 100644
--- a/etcd/util_test.go
+++ b/etcd/util_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package etcd
diff --git a/integration/basic_test.go b/integration/basic_test.go
index 30e8cf98..759091ca 100644
--- a/integration/basic_test.go
+++ b/integration/basic_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package integration
diff --git a/integration/util_test.go b/integration/util_test.go
index 365e3546..164e463b 100644
--- a/integration/util_test.go
+++ b/integration/util_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package integration
diff --git a/lang/ast/scope_test.go b/lang/ast/scope_test.go
index 6a8487e2..0592f240 100644
--- a/lang/ast/scope_test.go
+++ b/lang/ast/scope_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package ast
diff --git a/lang/funcs/core/core_test.go b/lang/funcs/core/core_test.go
index 641bacc8..3fbaca0a 100644
--- a/lang/funcs/core/core_test.go
+++ b/lang/funcs/core/core_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package core
diff --git a/lang/funcs/core/datetime/format_func_test.go b/lang/funcs/core/datetime/format_func_test.go
index 3a08b1a2..a10a3fcf 100644
--- a/lang/funcs/core/datetime/format_func_test.go
+++ b/lang/funcs/core/datetime/format_func_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package coredatetime
diff --git a/lang/funcs/core/sys/cpucount_fact.go b/lang/funcs/core/sys/cpucount_fact.go
index c1fd3c25..1bfda26a 100644
--- a/lang/funcs/core/sys/cpucount_fact.go
+++ b/lang/funcs/core/sys/cpucount_fact.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package coresys
diff --git a/lang/funcs/core/sys/cpucount_fact_test.go b/lang/funcs/core/sys/cpucount_fact_test.go
index bbbad3cb..b280ad9c 100644
--- a/lang/funcs/core/sys/cpucount_fact_test.go
+++ b/lang/funcs/core/sys/cpucount_fact_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package coresys
diff --git a/lang/funcs/core/sys/load_fact_darwin.go b/lang/funcs/core/sys/load_fact_darwin.go
index 5e1b614a..234116b7 100644
--- a/lang/funcs/core/sys/load_fact_darwin.go
+++ b/lang/funcs/core/sys/load_fact_darwin.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build darwin
+//go:build darwin
package coresys
diff --git a/lang/funcs/core/sys/load_fact_posix.go b/lang/funcs/core/sys/load_fact_posix.go
index d5ffff3f..0a657186 100644
--- a/lang/funcs/core/sys/load_fact_posix.go
+++ b/lang/funcs/core/sys/load_fact_posix.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package coresys
diff --git a/lang/funcs/core/sys/uptime_fact_darwin.go b/lang/funcs/core/sys/uptime_fact_darwin.go
index 3a71fd3d..ced2463c 100644
--- a/lang/funcs/core/sys/uptime_fact_darwin.go
+++ b/lang/funcs/core/sys/uptime_fact_darwin.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build darwin
+//go:build darwin
package coresys
diff --git a/lang/funcs/core/sys/uptime_fact_posix.go b/lang/funcs/core/sys/uptime_fact_posix.go
index 999349bf..934078d3 100644
--- a/lang/funcs/core/sys/uptime_fact_posix.go
+++ b/lang/funcs/core/sys/uptime_fact_posix.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package coresys
diff --git a/lang/funcs/facts/func_test.go b/lang/funcs/facts/func_test.go
index 803f3193..ff319dda 100644
--- a/lang/funcs/facts/func_test.go
+++ b/lang/funcs/facts/func_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package facts
diff --git a/lang/funcs/funcs_test.go b/lang/funcs/funcs_test.go
index b7b94b3e..24d65e4c 100644
--- a/lang/funcs/funcs_test.go
+++ b/lang/funcs/funcs_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package funcs
diff --git a/lang/interfaces/metadata_test.go b/lang/interfaces/metadata_test.go
index de299af6..7096bd55 100644
--- a/lang/interfaces/metadata_test.go
+++ b/lang/interfaces/metadata_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package interfaces
diff --git a/lang/interpolate/interpolate_test.go b/lang/interpolate/interpolate_test.go
index bd182b04..31263723 100644
--- a/lang/interpolate/interpolate_test.go
+++ b/lang/interpolate/interpolate_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package interpolate
diff --git a/lang/interpret_test.go b/lang/interpret_test.go
index ba8643d8..5bbb411d 100644
--- a/lang/interpret_test.go
+++ b/lang/interpret_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package lang
diff --git a/lang/lang_test.go b/lang/lang_test.go
index 9bdccf69..a6974e1e 100644
--- a/lang/lang_test.go
+++ b/lang/lang_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package lang
diff --git a/lang/parser/lexparse_test.go b/lang/parser/lexparse_test.go
index c09a3043..e9a1ca22 100644
--- a/lang/parser/lexparse_test.go
+++ b/lang/parser/lexparse_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package parser
diff --git a/lang/types/type_test.go b/lang/types/type_test.go
index c074a0bd..eea54d56 100644
--- a/lang/types/type_test.go
+++ b/lang/types/type_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package types
diff --git a/lang/types/value_test.go b/lang/types/value_test.go
index d793324d..b46a351e 100644
--- a/lang/types/value_test.go
+++ b/lang/types/value_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package types
diff --git a/lang/unification_test.go b/lang/unification_test.go
index 88e47402..48496a31 100644
--- a/lang/unification_test.go
+++ b/lang/unification_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package lang // XXX: move this to the unification package
diff --git a/lib/main_test.go b/lib/main_test.go
index 6bce73b7..16d5df5e 100644
--- a/lib/main_test.go
+++ b/lib/main_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package lib
diff --git a/pgraph/graphsync_test.go b/pgraph/graphsync_test.go
index 2af41f81..d0910687 100644
--- a/pgraph/graphsync_test.go
+++ b/pgraph/graphsync_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package pgraph
diff --git a/pgraph/pgraph_test.go b/pgraph/pgraph_test.go
index 709b753b..175d27fa 100644
--- a/pgraph/pgraph_test.go
+++ b/pgraph/pgraph_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package pgraph
diff --git a/pgraph/subgraph_test.go b/pgraph/subgraph_test.go
index 86fde4ef..84decddd 100644
--- a/pgraph/subgraph_test.go
+++ b/pgraph/subgraph_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package pgraph
diff --git a/pgraph/util_test.go b/pgraph/util_test.go
index 060aaf84..795fd6f6 100644
--- a/pgraph/util_test.go
+++ b/pgraph/util_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package pgraph
diff --git a/prometheus/prometheus_test.go b/prometheus/prometheus_test.go
index 0086d247..5435d06f 100644
--- a/prometheus/prometheus_test.go
+++ b/prometheus/prometheus_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package prometheus
diff --git a/util/afero_test.go b/util/afero_test.go
index b88a20db..f70d0309 100644
--- a/util/afero_test.go
+++ b/util/afero_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/util/code_test.go b/util/code_test.go
index a37767eb..32cad7c0 100644
--- a/util/code_test.go
+++ b/util/code_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/util/context_test.go b/util/context_test.go
index 3e1e621a..20dd8387 100644
--- a/util/context_test.go
+++ b/util/context_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/util/errwrap/errwrap_test.go b/util/errwrap/errwrap_test.go
index b4cc9b1e..badacf5f 100644
--- a/util/errwrap/errwrap_test.go
+++ b/util/errwrap/errwrap_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package errwrap
diff --git a/util/home_test.go b/util/home_test.go
index d71e0d2b..dbdba680 100644
--- a/util/home_test.go
+++ b/util/home_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/util/root_test.go b/util/root_test.go
index cb1f4098..b5f04d73 100644
--- a/util/root_test.go
+++ b/util/root_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build root
+//go:build root
package util
diff --git a/util/socketset/socketset.go b/util/socketset/socketset.go
index bf249276..2d8ed644 100644
--- a/util/socketset/socketset.go
+++ b/util/socketset/socketset.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
// Package socketset is in API for creating a select style netlink socket to
// receive events from the kernel.
diff --git a/util/socketset/socketset_test.go b/util/socketset/socketset_test.go
index da3cfa5a..1c11b691 100644
--- a/util/socketset/socketset_test.go
+++ b/util/socketset/socketset_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !darwin
+//go:build !darwin
package socketset
diff --git a/util/sync_test.go b/util/sync_test.go
index 215f02d0..9df6560c 100644
--- a/util/sync_test.go
+++ b/util/sync_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util
diff --git a/util/util_test.go b/util/util_test.go
index 0b41668c..ab997a1c 100644
--- a/util/util_test.go
+++ b/util/util_test.go
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-// +build !root
+//go:build !root
package util