git » chasquid » commit 5bb17c7

Update build tag constraints

author Alberto Bertogli
2022-08-08 16:52:34 UTC
committer Alberto Bertogli
2022-08-08 16:52:34 UTC
parent d4b89db6c372cf511b64b226748fde274e744752

Update build tag constraints

This patch updates all build tag constraints to add the new format,
alongside the old one, to maintain backwards compatibility.

This was done by using `go fmt`.

See https://go.dev/doc/go1.17#gofmt and
https://golang.org/design/draft-gobuild for more details.

cmd/chasquid-util/chasquid-util.go +1 -0
cmd/dovecot-auth-cli/coverage_test.go +1 -0
cmd/mda-lmtp/mda-lmtp.go +1 -0
cmd/smtp-check/smtp-check.go +1 -0
cmd/spf-check/spf-check.go +1 -0
coverage_test.go +1 -0
dnsoverride.go +1 -0
internal/aliases/fuzz.go +1 -0
internal/auth/fuzz.go +1 -0
internal/normalize/fuzz.go +1 -0
internal/smtpsrv/fuzz.go +1 -0
test/util/conngen.go +1 -0
test/util/coverhtml.go +1 -0
test/util/fexp.go +1 -0
test/util/generate_cert.go +1 -0
test/util/gocovcat.go +1 -0
test/util/loadgen.go +1 -0
test/util/minidns.go +1 -0

diff --git a/cmd/chasquid-util/chasquid-util.go b/cmd/chasquid-util/chasquid-util.go
index ff9dcbe..9b4e9b7 100644
--- a/cmd/chasquid-util/chasquid-util.go
+++ b/cmd/chasquid-util/chasquid-util.go
@@ -1,6 +1,7 @@
 // chasquid-util is a command-line utility for chasquid-related operations.
 //
 // Don't include it in the coverage build.
+//go:build !coverage
 // +build !coverage
 
 package main
diff --git a/cmd/dovecot-auth-cli/coverage_test.go b/cmd/dovecot-auth-cli/coverage_test.go
index 36b3b1a..97c80db 100644
--- a/cmd/dovecot-auth-cli/coverage_test.go
+++ b/cmd/dovecot-auth-cli/coverage_test.go
@@ -3,6 +3,7 @@
 //
 // See coverage_test.go for the details, this is the same horrible hack.
 //
+//go:build coveragebin
 // +build coveragebin
 
 package main
diff --git a/cmd/mda-lmtp/mda-lmtp.go b/cmd/mda-lmtp/mda-lmtp.go
index 5c1a699..dc01125 100644
--- a/cmd/mda-lmtp/mda-lmtp.go
+++ b/cmd/mda-lmtp/mda-lmtp.go
@@ -2,6 +2,7 @@
 //
 // See the usage below for details.
 //
+//go:build !coverage
 // +build !coverage
 
 package main
diff --git a/cmd/smtp-check/smtp-check.go b/cmd/smtp-check/smtp-check.go
index 51e9c37..dc96146 100644
--- a/cmd/smtp-check/smtp-check.go
+++ b/cmd/smtp-check/smtp-check.go
@@ -1,5 +1,6 @@
 // smtp-check is a command-line too for checking SMTP setups.
 //
+//go:build !coverage
 // +build !coverage
 
 package main
diff --git a/cmd/spf-check/spf-check.go b/cmd/spf-check/spf-check.go
index 1efdb60..7d31b01 100644
--- a/cmd/spf-check/spf-check.go
+++ b/cmd/spf-check/spf-check.go
@@ -1,6 +1,7 @@
 // Command line tool for playing with the SPF library.
 //
 // Not for use in production, just development and experimentation.
+//go:build !coverage
 // +build !coverage
 
 package main
diff --git a/coverage_test.go b/coverage_test.go
index 99af46f..ae30c37 100644
--- a/coverage_test.go
+++ b/coverage_test.go
@@ -9,6 +9,7 @@
 //
 // The test has a build label so it's not accidentally executed during normal
 // "go test" invocations.
+//go:build coveragebin
 // +build coveragebin
 
 package main
diff --git a/dnsoverride.go b/dnsoverride.go
index 02972a5..a391fca 100644
--- a/dnsoverride.go
+++ b/dnsoverride.go
@@ -2,6 +2,7 @@
 // This is only used in tests, when the "dnsoverride" tag is active.
 // It requires Go >= 1.8.
 //
+//go:build dnsoverride
 // +build dnsoverride
 
 package main
diff --git a/internal/aliases/fuzz.go b/internal/aliases/fuzz.go
index 5c8b793..e403525 100644
--- a/internal/aliases/fuzz.go
+++ b/internal/aliases/fuzz.go
@@ -1,5 +1,6 @@
 // Fuzz testing for package aliases.
 
+//go:build gofuzz
 // +build gofuzz
 
 package aliases
diff --git a/internal/auth/fuzz.go b/internal/auth/fuzz.go
index f43cedc..095a899 100644
--- a/internal/auth/fuzz.go
+++ b/internal/auth/fuzz.go
@@ -1,5 +1,6 @@
 // Fuzz testing for package aliases.
 
+//go:build gofuzz
 // +build gofuzz
 
 package auth
diff --git a/internal/normalize/fuzz.go b/internal/normalize/fuzz.go
index 8c1e7c8..4526671 100644
--- a/internal/normalize/fuzz.go
+++ b/internal/normalize/fuzz.go
@@ -1,5 +1,6 @@
 // Fuzz testing for package normalize.
 
+//go:build gofuzz
 // +build gofuzz
 
 package normalize
diff --git a/internal/smtpsrv/fuzz.go b/internal/smtpsrv/fuzz.go
index 058a2bb..bb19d43 100644
--- a/internal/smtpsrv/fuzz.go
+++ b/internal/smtpsrv/fuzz.go
@@ -1,5 +1,6 @@
 // Fuzz testing for package smtpsrv.  Based on server_test.
 
+//go:build gofuzz
 // +build gofuzz
 
 package smtpsrv
diff --git a/test/util/conngen.go b/test/util/conngen.go
index 8a98979..9270dae 100644
--- a/test/util/conngen.go
+++ b/test/util/conngen.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // SMTP connection generator, for testing purposes.
diff --git a/test/util/coverhtml.go b/test/util/coverhtml.go
index 768e99a..ed4cace 100644
--- a/test/util/coverhtml.go
+++ b/test/util/coverhtml.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // Generate an HTML visualization of a Go coverage profile.
diff --git a/test/util/fexp.go b/test/util/fexp.go
index 2f43d4a..2e67d90 100644
--- a/test/util/fexp.go
+++ b/test/util/fexp.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // Fetch an URL, and check if the response matches what we expect.
diff --git a/test/util/generate_cert.go b/test/util/generate_cert.go
index b7e9547..f6372c4 100644
--- a/test/util/generate_cert.go
+++ b/test/util/generate_cert.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // Generate a self-signed X.509 certificate for a TLS server. Outputs to
diff --git a/test/util/gocovcat.go b/test/util/gocovcat.go
index 5b3e759..4018912 100755
--- a/test/util/gocovcat.go
+++ b/test/util/gocovcat.go
@@ -2,6 +2,7 @@
 //
 // From: https://git.lukeshu.com/go/cmd/gocovcat/
 //
+//go:build ignore
 // +build ignore
 
 // Copyright 2017 Luke Shumaker <lukeshu@parabola.nu>
diff --git a/test/util/loadgen.go b/test/util/loadgen.go
index 4653442..ec7fb03 100644
--- a/test/util/loadgen.go
+++ b/test/util/loadgen.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // SMTP load generator, for testing purposes.
diff --git a/test/util/minidns.go b/test/util/minidns.go
index 8189eef..e2da6e0 100644
--- a/test/util/minidns.go
+++ b/test/util/minidns.go
@@ -1,3 +1,4 @@
+//go:build ignore
 // +build ignore
 
 // minidns is a trivial DNS server used for testing.