diff --git a/Makefile b/Makefile index 954dc7464..6159fa7a8 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ lang: ## generates the lexer/parser for the language frontend # build a `mgmt` binary for current host os/arch $(PROGRAM): build/mgmt-${GOHOSTOS}-${GOHOSTARCH} ## build an mgmt binary for current host os/arch - cp -a $< $@ + @cp -a $< $@ $(PROGRAM).static: $(GO_FILES) $(MCL_FILES) @echo "Building: $(PROGRAM).static, version: $(SVERSION)..." diff --git a/converger/converger_test.go b/converger/converger_test.go index 62aafc194..ff4d1c23d 100644 --- a/converger/converger_test.go +++ b/converger/converger_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package converger diff --git a/engine/autoedge_test.go b/engine/autoedge_test.go index 4b60280c8..ada138032 100644 --- a/engine/autoedge_test.go +++ b/engine/autoedge_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package engine diff --git a/engine/graph/autogroup/autogroup_test.go b/engine/graph/autogroup/autogroup_test.go index 3efb7ad3e..41719425f 100644 --- a/engine/graph/autogroup/autogroup_test.go +++ b/engine/graph/autogroup/autogroup_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package autogroup diff --git a/engine/graph/graph_test.go b/engine/graph/graph_test.go index 1465a1ca7..1828adfd8 100644 --- a/engine/graph/graph_test.go +++ b/engine/graph/graph_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package graph diff --git a/engine/graph/semaphore_test.go b/engine/graph/semaphore_test.go index 1fbb29631..c35bc68d8 100644 --- a/engine/graph/semaphore_test.go +++ b/engine/graph/semaphore_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package graph diff --git a/engine/metaparams_test.go b/engine/metaparams_test.go index 0f600243c..15a21497e 100644 --- a/engine/metaparams_test.go +++ b/engine/metaparams_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package engine diff --git a/engine/resources/augeas.go b/engine/resources/augeas.go index 9c6e09878..34c6dab66 100644 --- a/engine/resources/augeas.go +++ b/engine/resources/augeas.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !noaugeas // +build !noaugeas package resources diff --git a/engine/resources/docker_container.go b/engine/resources/docker_container.go index 04dcfda71..58c1cd394 100644 --- a/engine/resources/docker_container.go +++ b/engine/resources/docker_container.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !nodocker // +build !nodocker package resources diff --git a/engine/resources/docker_container_test.go b/engine/resources/docker_container_test.go index 8b8bb0eeb..c2ded5c0e 100644 --- a/engine/resources/docker_container_test.go +++ b/engine/resources/docker_container_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !nodocker // +build !nodocker package resources diff --git a/engine/resources/docker_image.go b/engine/resources/docker_image.go index 6376c3fb8..d6ff84c4f 100644 --- a/engine/resources/docker_image.go +++ b/engine/resources/docker_image.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !nodocker // +build !nodocker package resources diff --git a/engine/resources/exec_test.go b/engine/resources/exec_test.go index 5e8c433ed..103059ce1 100644 --- a/engine/resources/exec_test.go +++ b/engine/resources/exec_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/file_test.go b/engine/resources/file_test.go index 1d081cd08..77b482c98 100644 --- a/engine/resources/file_test.go +++ b/engine/resources/file_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/mount_linux_test.go b/engine/resources/mount_linux_test.go index 11a910d7f..45b554a25 100644 --- a/engine/resources/mount_linux_test.go +++ b/engine/resources/mount_linux_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root || !darwin // +build !root !darwin package resources diff --git a/engine/resources/mount_test.go b/engine/resources/mount_test.go index fbd010695..865508d1c 100644 --- a/engine/resources/mount_test.go +++ b/engine/resources/mount_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/msg_test.go b/engine/resources/msg_test.go index 5299eec32..3e7ed95c2 100644 --- a/engine/resources/msg_test.go +++ b/engine/resources/msg_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/net.go b/engine/resources/net.go index 2150e11b9..629d90a3d 100644 --- a/engine/resources/net.go +++ b/engine/resources/net.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin package resources diff --git a/engine/resources/net_test.go b/engine/resources/net_test.go index 9ec3afdce..20c70a858 100644 --- a/engine/resources/net_test.go +++ b/engine/resources/net_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin package resources diff --git a/engine/resources/noop_test.go b/engine/resources/noop_test.go index 9a6934a85..361d24d64 100644 --- a/engine/resources/noop_test.go +++ b/engine/resources/noop_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/pippet_test.go b/engine/resources/pippet_test.go index eeb8fa62d..7b5e36ab8 100644 --- a/engine/resources/pippet_test.go +++ b/engine/resources/pippet_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/pkg_test.go b/engine/resources/pkg_test.go index 204276167..daaa50283 100644 --- a/engine/resources/pkg_test.go +++ b/engine/resources/pkg_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/resources_test.go b/engine/resources/resources_test.go index cdcfc99cf..b7ea45da0 100644 --- a/engine/resources/resources_test.go +++ b/engine/resources/resources_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/test_test.go b/engine/resources/test_test.go index 08755483f..f7587c756 100644 --- a/engine/resources/test_test.go +++ b/engine/resources/test_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package resources diff --git a/engine/resources/virt.go b/engine/resources/virt.go index 0ba412873..680d76c88 100644 --- a/engine/resources/virt.go +++ b/engine/resources/virt.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !novirt // +build !novirt package resources diff --git a/engine/util/mode_test.go b/engine/util/mode_test.go index 7f4c4d384..4b4af19a2 100644 --- a/engine/util/mode_test.go +++ b/engine/util/mode_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/engine/util/util_test.go b/engine/util/util_test.go index ddac26316..347cda7ee 100644 --- a/engine/util/util_test.go +++ b/engine/util/util_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/integration/basic_test.go b/integration/basic_test.go index 30e8cf985..990665a87 100644 --- a/integration/basic_test.go +++ b/integration/basic_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package integration diff --git a/integration/util_test.go b/integration/util_test.go index 365e35469..09def4505 100644 --- a/integration/util_test.go +++ b/integration/util_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package integration diff --git a/lang/funcs/core/core_test.go b/lang/funcs/core/core_test.go index 641bacc84..a55ff89dc 100644 --- a/lang/funcs/core/core_test.go +++ b/lang/funcs/core/core_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +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 3a08b1a26..d41c68c67 100644 --- a/lang/funcs/core/datetime/format_func_test.go +++ b/lang/funcs/core/datetime/format_func_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin package coredatetime diff --git a/lang/funcs/core/sys/cpucount_fact.go b/lang/funcs/core/sys/cpucount_fact.go index c1fd3c250..a048a02a2 100644 --- a/lang/funcs/core/sys/cpucount_fact.go +++ b/lang/funcs/core/sys/cpucount_fact.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +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 bbbad3cbb..151c6c2ef 100644 --- a/lang/funcs/core/sys/cpucount_fact_test.go +++ b/lang/funcs/core/sys/cpucount_fact_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +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 5e1b614af..32143461f 100644 --- a/lang/funcs/core/sys/load_fact_darwin.go +++ b/lang/funcs/core/sys/load_fact_darwin.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build darwin // +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 d5ffff3f0..c77259ad5 100644 --- a/lang/funcs/core/sys/load_fact_posix.go +++ b/lang/funcs/core/sys/load_fact_posix.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +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 3a71fd3da..4abbc4866 100644 --- a/lang/funcs/core/sys/uptime_fact_darwin.go +++ b/lang/funcs/core/sys/uptime_fact_darwin.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build darwin // +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 999349bfb..6c829ac75 100644 --- a/lang/funcs/core/sys/uptime_fact_posix.go +++ b/lang/funcs/core/sys/uptime_fact_posix.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin package coresys diff --git a/lang/funcs/facts/func_test.go b/lang/funcs/facts/func_test.go index 803f31939..6ffea6579 100644 --- a/lang/funcs/facts/func_test.go +++ b/lang/funcs/facts/func_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package facts diff --git a/lang/funcs/funcs_test.go b/lang/funcs/funcs_test.go index b7b94b3e5..722570239 100644 --- a/lang/funcs/funcs_test.go +++ b/lang/funcs/funcs_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package funcs diff --git a/lang/interfaces/metadata_test.go b/lang/interfaces/metadata_test.go index de299af6b..fdbe6e0cf 100644 --- a/lang/interfaces/metadata_test.go +++ b/lang/interfaces/metadata_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package interfaces diff --git a/lang/interpolate_test.go b/lang/interpolate_test.go index d5971023a..1b2ee6c48 100644 --- a/lang/interpolate_test.go +++ b/lang/interpolate_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lang/interpret_test.go b/lang/interpret_test.go index e45eb0c4c..a19eee120 100644 --- a/lang/interpret_test.go +++ b/lang/interpret_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lang/lang_test.go b/lang/lang_test.go index 218797567..3102f0768 100644 --- a/lang/lang_test.go +++ b/lang/lang_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lang/lexparse_test.go b/lang/lexparse_test.go index 87fb3e396..d3dffa7e7 100644 --- a/lang/lexparse_test.go +++ b/lang/lexparse_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lang/scope_test.go b/lang/scope_test.go index 55870a29c..583dba57d 100644 --- a/lang/scope_test.go +++ b/lang/scope_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lang/types/type_test.go b/lang/types/type_test.go index c074a0bd9..85063bed3 100644 --- a/lang/types/type_test.go +++ b/lang/types/type_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package types diff --git a/lang/types/value_test.go b/lang/types/value_test.go index d793324d5..ab3acb708 100644 --- a/lang/types/value_test.go +++ b/lang/types/value_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package types diff --git a/lang/unification_test.go b/lang/unification_test.go index 733ed33fc..15ed9de75 100644 --- a/lang/unification_test.go +++ b/lang/unification_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lang diff --git a/lib/main_test.go b/lib/main_test.go index 6bce73b7e..533fe4563 100644 --- a/lib/main_test.go +++ b/lib/main_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package lib diff --git a/misc/make-deps.sh b/misc/make-deps.sh index 70fc25e14..6ca10e77a 100755 --- a/misc/make-deps.sh +++ b/misc/make-deps.sh @@ -1,8 +1,7 @@ #!/bin/bash # setup a simple golang environment -XPWD=`pwd` -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" # dir! -cd "${ROOT}" >/dev/null +ROOT="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd)" # dir! +pushd "${ROOT}" >/dev/null || exit 1 . ${ROOT}/test/util.sh @@ -126,14 +125,13 @@ fi [ -e "$GOBIN/mgmt" ] && rm -f "$GOBIN/mgmt" # the `go get` version has no -X fold_start "Install golang tools" -# TODO: change this for golang 1.17 -go get github.com/blynn/nex # for lexing -go get golang.org/x/tools/cmd/goyacc # formerly `go tool yacc` -go get golang.org/x/tools/cmd/stringer # for automatic stringer-ing -go get golang.org/x/lint/golint # for `golint`-ing -go get golang.org/x/tools/cmd/goimports # for fmt -go get github.com/kevinburke/go-bindata/go-bindata # for compiling in non golang files -go get github.com/dvyukov/go-fuzz/go-fuzz # for fuzzing the mcl lang bits +go install github.com/blynn/nex@latest # for lexing +go install golang.org/x/tools/cmd/goyacc@latest # formerly `go tool yacc` +go install golang.org/x/tools/cmd/stringer@latest # for automatic stringer-ing +go install golang.org/x/lint/golint@latest # for `golint`-ing +go install golang.org/x/tools/cmd/goimports@latest # for fmt +go install github.com/kevinburke/go-bindata/go-bindata@latest # for compiling in non golang files +go install github.com/dvyukov/go-fuzz/go-fuzz@latest # for fuzzing the mcl lang bits fold_end "Install golang tools" fold_start "Install miscellaneous tools" @@ -141,4 +139,4 @@ command -v mdl &>/dev/null || gem install mdl --no-document || true # for lintin command -v fpm &>/dev/null || gem install fpm --no-document || true # for cross distro packaging fold_end "Install miscellaneous tools" -cd "$XPWD" >/dev/null +popd diff --git a/pgraph/graphsync_test.go b/pgraph/graphsync_test.go index 2af41f812..792cfbf20 100644 --- a/pgraph/graphsync_test.go +++ b/pgraph/graphsync_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package pgraph diff --git a/pgraph/pgraph_test.go b/pgraph/pgraph_test.go index 709b753bf..97b37bb01 100644 --- a/pgraph/pgraph_test.go +++ b/pgraph/pgraph_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package pgraph diff --git a/pgraph/subgraph_test.go b/pgraph/subgraph_test.go index 86fde4ef5..6c96173fc 100644 --- a/pgraph/subgraph_test.go +++ b/pgraph/subgraph_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package pgraph diff --git a/pgraph/util_test.go b/pgraph/util_test.go index 060aaf846..27c95d688 100644 --- a/pgraph/util_test.go +++ b/pgraph/util_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package pgraph diff --git a/prometheus/prometheus_test.go b/prometheus/prometheus_test.go index 0086d2479..c25af9b18 100644 --- a/prometheus/prometheus_test.go +++ b/prometheus/prometheus_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package prometheus diff --git a/spec.in b/spec.in index fa3faf9c1..0e01cedb6 100644 --- a/spec.in +++ b/spec.in @@ -27,6 +27,7 @@ A next generation config management prototype! %setup -q %build +go mod download make build %install diff --git a/test/test-examples.sh b/test/test-examples.sh index f7f2f94c7..7e457ec0f 100755 --- a/test/test-examples.sh +++ b/test/test-examples.sh @@ -14,28 +14,18 @@ failures='' # TODO: test examples/lang/ directory to see if the .mcl files compile correctly buildout='test-examples.out' -# make symlink to outside of package -linkto="`pwd`/examples/lib/" -tmpdir="`$mktemp --tmpdir -d tmp.XXX`" # get a dir outside of the main package -cd "$tmpdir" -ln -s "$linkto" # symlink outside of dir -cd `basename "$linkto"` + +trap 'rm -fv "$buildout"' EXIT # clean up build mess # loop through individual *.go files in working dir -for file in `find . -maxdepth 9 -type f -name '*.go'`; do - #echo "running test on: $file" - run-test go build -i -o "$buildout" "$file" || fail_test "could not build: $file" +find examples/lib -maxdepth 9 -type f -name '*.go' | while read -r file; do + echo "running test on: $file" + run-test go build -o "$buildout" "$file" || fail_test "could not build: $file" done -rm "$buildout" || true # clean up build mess - -cd - >/dev/null # back to tmp dir -rm `basename "$linkto"` -cd .. -rmdir "$tmpdir" # cleanup if [[ -n "$failures" ]]; then echo 'FAIL' - echo "The following tests (in: ${linkto}) have failed:" + echo "The following tests have failed:" echo -e "$failures" echo exit 1 diff --git a/util/afero_test.go b/util/afero_test.go index b88a20dbc..911851f39 100644 --- a/util/afero_test.go +++ b/util/afero_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/util/code_test.go b/util/code_test.go index a37767ebf..91a4e0b2c 100644 --- a/util/code_test.go +++ b/util/code_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/util/context_test.go b/util/context_test.go index 3e1e621aa..1e259a1a2 100644 --- a/util/context_test.go +++ b/util/context_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/util/errwrap/errwrap_test.go b/util/errwrap/errwrap_test.go index b4cc9b1e0..904937437 100644 --- a/util/errwrap/errwrap_test.go +++ b/util/errwrap/errwrap_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package errwrap diff --git a/util/home_test.go b/util/home_test.go index d71e0d2be..85a36f16c 100644 --- a/util/home_test.go +++ b/util/home_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/util/root_test.go b/util/root_test.go index cb1f40986..0aebeb4ed 100644 --- a/util/root_test.go +++ b/util/root_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build root // +build root package util diff --git a/util/socketset/socketset.go b/util/socketset/socketset.go index bf2492761..6d4ea431a 100644 --- a/util/socketset/socketset.go +++ b/util/socketset/socketset.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin // Package socketset is in API for creating a select style netlink socket to diff --git a/util/socketset/socketset_test.go b/util/socketset/socketset_test.go index da3cfa5a1..c0734c403 100644 --- a/util/socketset/socketset_test.go +++ b/util/socketset/socketset_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !darwin // +build !darwin package socketset diff --git a/util/sync_test.go b/util/sync_test.go index 215f02d0f..0c2ea7ce7 100644 --- a/util/sync_test.go +++ b/util/sync_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util diff --git a/util/util_test.go b/util/util_test.go index 0b41668c8..f334c6550 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +//go:build !root // +build !root package util