From ec833b98462c9fc5eaf69ab9e5cdd6c712c9e197 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 3 Apr 2025 12:53:05 +0200 Subject: [PATCH 1/2] pkg/cdi: rename test-files with the right extension Make sure these files are only considered for tests. Signed-off-by: Sebastiaan van Stijn --- pkg/cdi/{cache_test_darwin.go => cache_darwin_test.go} | 0 pkg/cdi/{cache_test_unix.go => cache_unix_test.go} | 0 pkg/cdi/{cache_test_windows.go => cache_windows_test.go} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename pkg/cdi/{cache_test_darwin.go => cache_darwin_test.go} (100%) rename pkg/cdi/{cache_test_unix.go => cache_unix_test.go} (100%) rename pkg/cdi/{cache_test_windows.go => cache_windows_test.go} (100%) diff --git a/pkg/cdi/cache_test_darwin.go b/pkg/cdi/cache_darwin_test.go similarity index 100% rename from pkg/cdi/cache_test_darwin.go rename to pkg/cdi/cache_darwin_test.go diff --git a/pkg/cdi/cache_test_unix.go b/pkg/cdi/cache_unix_test.go similarity index 100% rename from pkg/cdi/cache_test_unix.go rename to pkg/cdi/cache_unix_test.go diff --git a/pkg/cdi/cache_test_windows.go b/pkg/cdi/cache_windows_test.go similarity index 100% rename from pkg/cdi/cache_test_windows.go rename to pkg/cdi/cache_windows_test.go From 4c42fa0decdc85da54af77bf44733be34520d4f2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 3 Apr 2025 12:54:28 +0200 Subject: [PATCH 2/2] pkg/cdi: remove legacy build-tags Go module requires go1.20, so we no longer need to take the old format into account. Signed-off-by: Sebastiaan van Stijn --- pkg/cdi/cache_darwin_test.go | 1 - pkg/cdi/cache_unix_test.go | 1 - pkg/cdi/cache_windows_test.go | 1 - pkg/cdi/container-edits_unix.go | 1 - pkg/cdi/container-edits_windows.go | 1 - pkg/cdi/spec_other.go | 1 - 6 files changed, 6 deletions(-) diff --git a/pkg/cdi/cache_darwin_test.go b/pkg/cdi/cache_darwin_test.go index b09ea6ff..33972941 100644 --- a/pkg/cdi/cache_darwin_test.go +++ b/pkg/cdi/cache_darwin_test.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin /* Copyright © 2021 The CDI Authors diff --git a/pkg/cdi/cache_unix_test.go b/pkg/cdi/cache_unix_test.go index b7c44129..f925199d 100644 --- a/pkg/cdi/cache_unix_test.go +++ b/pkg/cdi/cache_unix_test.go @@ -1,5 +1,4 @@ //go:build !windows && !darwin -// +build !windows,!darwin /* Copyright © 2021 The CDI Authors diff --git a/pkg/cdi/cache_windows_test.go b/pkg/cdi/cache_windows_test.go index c6dabf5f..531398f4 100644 --- a/pkg/cdi/cache_windows_test.go +++ b/pkg/cdi/cache_windows_test.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows /* Copyright © 2021 The CDI Authors diff --git a/pkg/cdi/container-edits_unix.go b/pkg/cdi/container-edits_unix.go index 59977b21..e0d41a68 100644 --- a/pkg/cdi/container-edits_unix.go +++ b/pkg/cdi/container-edits_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright © 2021 The CDI Authors diff --git a/pkg/cdi/container-edits_windows.go b/pkg/cdi/container-edits_windows.go index fd91afa9..5515f62c 100644 --- a/pkg/cdi/container-edits_windows.go +++ b/pkg/cdi/container-edits_windows.go @@ -1,5 +1,4 @@ //go:build windows -// +build windows /* Copyright © 2021 The CDI Authors diff --git a/pkg/cdi/spec_other.go b/pkg/cdi/spec_other.go index 285e04e2..f102c46b 100644 --- a/pkg/cdi/spec_other.go +++ b/pkg/cdi/spec_other.go @@ -1,5 +1,4 @@ //go:build !linux -// +build !linux /* Copyright © 2022 The CDI Authors