diff --git a/promslog/flag/flag.go b/promslog/flag/flag.go index 0a164fcc..34edb6ff 100644 --- a/promslog/flag/flag.go +++ b/promslog/flag/flag.go @@ -15,6 +15,8 @@ // across Prometheus components. // It should typically only ever be imported by main packages. +//go:build go1.21 + package flag import ( diff --git a/promslog/slog.go b/promslog/slog.go index 930d5ac3..c38e3178 100644 --- a/promslog/slog.go +++ b/promslog/slog.go @@ -14,6 +14,9 @@ // Package promslog defines standardised ways to initialize the Go standard // library's log/slog logger. // It should typically only ever be imported by main packages. + +//go:build go1.21 + package promslog import ( diff --git a/promslog/slog_test.go b/promslog/slog_test.go index bcdca361..a82388fd 100644 --- a/promslog/slog_test.go +++ b/promslog/slog_test.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build go1.21 + package promslog import (