diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b24bde4..18657c5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,10 @@ on: jobs: test: - runs-on: 'windows-2019' + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2019, windows-2022, ubuntu-latest] steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 diff --git a/fileinfo_test.go b/fileinfo_test.go index e79700ba..8c97f506 100644 --- a/fileinfo_test.go +++ b/fileinfo_test.go @@ -1,3 +1,6 @@ +//go:build windows +// +build windows + package winio import ( diff --git a/pkg/guid/guid.go b/pkg/guid/guid.go index 2d9161e2..6e5526bd 100644 --- a/pkg/guid/guid.go +++ b/pkg/guid/guid.go @@ -1,5 +1,3 @@ -// +build windows - // Package guid provides a GUID type. The backing structure for a GUID is // identical to that used by the golang.org/x/sys/windows GUID type. // There are two main binary encodings used for a GUID, the big-endian encoding, diff --git a/pkg/guid/guid_nonwindows.go b/pkg/guid/guid_nonwindows.go index f64d828c..805bd354 100644 --- a/pkg/guid/guid_nonwindows.go +++ b/pkg/guid/guid_nonwindows.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package guid diff --git a/pkg/guid/guid_test.go b/pkg/guid/guid_test.go index 84629ee0..d7e21241 100644 --- a/pkg/guid/guid_test.go +++ b/pkg/guid/guid_test.go @@ -1,5 +1,3 @@ -// +build windows - package guid import ( diff --git a/pkg/guid/guid_windows.go b/pkg/guid/guid_windows.go index 83617f4e..27e45ee5 100644 --- a/pkg/guid/guid_windows.go +++ b/pkg/guid/guid_windows.go @@ -1,3 +1,6 @@ +//go:build windows +// +build windows + package guid import "golang.org/x/sys/windows" diff --git a/reparse.go b/reparse.go index fc1ee4d3..5f2f3a47 100644 --- a/reparse.go +++ b/reparse.go @@ -1,3 +1,6 @@ +//go:build windows +// +build windows + package winio import (