From b1c2dbdfc6ee5419210daad64bfcfbbf17ffd368 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 6 Mar 2023 11:38:28 -0800 Subject: [PATCH] Remove old build tag comments Go is transitioning from the old '// +build' form to '//go:build', this removes all uses of the old form, adding the new one where needed. See https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md --- cmd/osbuild-auth-tests/certificates.go | 1 - cmd/osbuild-auth-tests/main_test.go | 1 - cmd/osbuild-composer-dbjobqueue-tests/main_test.go | 1 - cmd/osbuild-composer-manifest-tests/main_test.go | 2 +- cmd/osbuild-dnf-json-tests/main_test.go | 1 - cmd/osbuild-image-tests/constants/constants.go | 2 +- cmd/osbuild-image-tests/main_test.go | 1 - cmd/osbuild-koji-tests/main_test.go | 1 - cmd/osbuild-service-maintenance/db_test.go | 1 - internal/boot/aws.go | 1 - internal/boot/azuretest/azure.go | 1 - internal/boot/azuretest/deployment.go | 2 +- internal/boot/context-managers.go | 1 - internal/boot/helpers.go | 2 +- internal/boot/netns.go | 1 - internal/boot/openstacktest/openstack.go | 2 +- internal/boot/vmwaretest/vmware.go | 1 - internal/client/integration_test.go | 1 - internal/client/unit_test.go | 1 - internal/crypt/crypt_impl.go | 1 - internal/crypt/crypt_impl_macos.go | 1 - internal/crypt/crypt_test.go | 1 - internal/tools.go | 2 +- 23 files changed, 6 insertions(+), 23 deletions(-) diff --git a/cmd/osbuild-auth-tests/certificates.go b/cmd/osbuild-auth-tests/certificates.go index 7f0d194f1..fa514cc89 100644 --- a/cmd/osbuild-auth-tests/certificates.go +++ b/cmd/osbuild-auth-tests/certificates.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package main diff --git a/cmd/osbuild-auth-tests/main_test.go b/cmd/osbuild-auth-tests/main_test.go index 5aeb79b77..b060e786b 100644 --- a/cmd/osbuild-auth-tests/main_test.go +++ b/cmd/osbuild-auth-tests/main_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package main diff --git a/cmd/osbuild-composer-dbjobqueue-tests/main_test.go b/cmd/osbuild-composer-dbjobqueue-tests/main_test.go index 35b7c2672..2eabc2247 100644 --- a/cmd/osbuild-composer-dbjobqueue-tests/main_test.go +++ b/cmd/osbuild-composer-dbjobqueue-tests/main_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package main diff --git a/cmd/osbuild-composer-manifest-tests/main_test.go b/cmd/osbuild-composer-manifest-tests/main_test.go index 1db7f8495..9ebe0d6b6 100644 --- a/cmd/osbuild-composer-manifest-tests/main_test.go +++ b/cmd/osbuild-composer-manifest-tests/main_test.go @@ -1,4 +1,4 @@ -// +build integration +//go:build integration package main diff --git a/cmd/osbuild-dnf-json-tests/main_test.go b/cmd/osbuild-dnf-json-tests/main_test.go index 62936d7e0..70c9427cb 100644 --- a/cmd/osbuild-dnf-json-tests/main_test.go +++ b/cmd/osbuild-dnf-json-tests/main_test.go @@ -1,7 +1,6 @@ // This package contains tests related to dnf-json and rpmmd package. //go:build integration -// +build integration package main diff --git a/cmd/osbuild-image-tests/constants/constants.go b/cmd/osbuild-image-tests/constants/constants.go index d3eecc357..5b8f382f2 100644 --- a/cmd/osbuild-image-tests/constants/constants.go +++ b/cmd/osbuild-image-tests/constants/constants.go @@ -1,4 +1,4 @@ -// +build integration +//go:build integration package constants diff --git a/cmd/osbuild-image-tests/main_test.go b/cmd/osbuild-image-tests/main_test.go index 0eba212e0..7208a442e 100644 --- a/cmd/osbuild-image-tests/main_test.go +++ b/cmd/osbuild-image-tests/main_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package main diff --git a/cmd/osbuild-koji-tests/main_test.go b/cmd/osbuild-koji-tests/main_test.go index e4fbe1eda..b871b10f0 100644 --- a/cmd/osbuild-koji-tests/main_test.go +++ b/cmd/osbuild-koji-tests/main_test.go @@ -4,7 +4,6 @@ // koji.sh test because it needs a working Koji instance to pass. //go:build integration -// +build integration package main diff --git a/cmd/osbuild-service-maintenance/db_test.go b/cmd/osbuild-service-maintenance/db_test.go index d5666f329..ec45a7112 100644 --- a/cmd/osbuild-service-maintenance/db_test.go +++ b/cmd/osbuild-service-maintenance/db_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package main diff --git a/internal/boot/aws.go b/internal/boot/aws.go index cf0d9d242..a5c19315c 100644 --- a/internal/boot/aws.go +++ b/internal/boot/aws.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package boot diff --git a/internal/boot/azuretest/azure.go b/internal/boot/azuretest/azure.go index a83c62111..44dc4405a 100644 --- a/internal/boot/azuretest/azure.go +++ b/internal/boot/azuretest/azure.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package azuretest diff --git a/internal/boot/azuretest/deployment.go b/internal/boot/azuretest/deployment.go index 86528efc9..1e6cf8b80 100644 --- a/internal/boot/azuretest/deployment.go +++ b/internal/boot/azuretest/deployment.go @@ -1,4 +1,4 @@ -// +build integration +//go:build integration package azuretest diff --git a/internal/boot/context-managers.go b/internal/boot/context-managers.go index aa8d9a139..acee89a48 100644 --- a/internal/boot/context-managers.go +++ b/internal/boot/context-managers.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package boot diff --git a/internal/boot/helpers.go b/internal/boot/helpers.go index e2097f857..d02282729 100644 --- a/internal/boot/helpers.go +++ b/internal/boot/helpers.go @@ -1,4 +1,4 @@ -// +build integration +//go:build integration package boot diff --git a/internal/boot/netns.go b/internal/boot/netns.go index 72b48c5c1..ec693eb0a 100644 --- a/internal/boot/netns.go +++ b/internal/boot/netns.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package boot diff --git a/internal/boot/openstacktest/openstack.go b/internal/boot/openstacktest/openstack.go index 48ea31f42..4c94e9761 100644 --- a/internal/boot/openstacktest/openstack.go +++ b/internal/boot/openstacktest/openstack.go @@ -1,4 +1,4 @@ -// +build integration +//go:build integration package openstacktest diff --git a/internal/boot/vmwaretest/vmware.go b/internal/boot/vmwaretest/vmware.go index bde4e04ad..dd76a8222 100644 --- a/internal/boot/vmwaretest/vmware.go +++ b/internal/boot/vmwaretest/vmware.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration package vmwaretest diff --git a/internal/client/integration_test.go b/internal/client/integration_test.go index 4f5e6d638..f5d92e950 100644 --- a/internal/client/integration_test.go +++ b/internal/client/integration_test.go @@ -2,7 +2,6 @@ // Copyright (C) 2020 by Red Hat, Inc. //go:build integration -// +build integration package client diff --git a/internal/client/unit_test.go b/internal/client/unit_test.go index 9bda6e152..2171c8118 100644 --- a/internal/client/unit_test.go +++ b/internal/client/unit_test.go @@ -2,7 +2,6 @@ // Copyright (C) 2020 by Red Hat, Inc. //go:build !integration -// +build !integration package client diff --git a/internal/crypt/crypt_impl.go b/internal/crypt/crypt_impl.go index b4b013288..10ed5f355 100644 --- a/internal/crypt/crypt_impl.go +++ b/internal/crypt/crypt_impl.go @@ -1,5 +1,4 @@ //go:build !darwin -// +build !darwin // Copied from https://github.com/amoghe/go-crypt/blob/b3e291286513a0c993f7c4dd7060d327d2d56143/crypt_r.go // Original sources are under MIT license: diff --git a/internal/crypt/crypt_impl_macos.go b/internal/crypt/crypt_impl_macos.go index 5c9184a0b..b1c8e9bb0 100644 --- a/internal/crypt/crypt_impl_macos.go +++ b/internal/crypt/crypt_impl_macos.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package crypt diff --git a/internal/crypt/crypt_test.go b/internal/crypt/crypt_test.go index cb9ede90b..4665b008c 100644 --- a/internal/crypt/crypt_test.go +++ b/internal/crypt/crypt_test.go @@ -1,5 +1,4 @@ //go:build !darwin -// +build !darwin package crypt diff --git a/internal/tools.go b/internal/tools.go index 5bab31a5b..4d06b2ab9 100644 --- a/internal/tools.go +++ b/internal/tools.go @@ -1,4 +1,4 @@ -// +build tools +//go:build tools // This file is here to just explicitly tell `go mod vendor` that we depend // on oapi-codegen. Without this file, `go generate ./...` in Go >= 1.14 gets