diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7e035454..b260115a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: set up golang uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: format run: ./hack/check-format.sh @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - go: [ '1.14', '1.15', '1.16' ] + go: [ '1.15', '1.16', '1.17' ] steps: - uses: actions/checkout@v2 @@ -91,7 +91,7 @@ jobs: runs-on: macos-10.15 strategy: matrix: - go: [ '1.15' ] # TODO: no 1.16 atm + go: [ '1.16' ] steps: - uses: actions/checkout@v2 diff --git a/cmd/ghw-snapshot/main.go b/cmd/ghw-snapshot/main.go index efd2d5a8..20b05de1 100644 --- a/cmd/ghw-snapshot/main.go +++ b/cmd/ghw-snapshot/main.go @@ -1,4 +1,6 @@ +//go:build linux // +build linux + // // Use and distribution licensed under the Apache license version 2. // diff --git a/go.mod b/go.mod index 0ce4b3d5..e3a8268e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/jaypipes/ghw -go 1.12 +go 1.15 require ( github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d diff --git a/pkg/baseboard/baseboard_stub.go b/pkg/baseboard/baseboard_stub.go index 2c83c71c..f5b14691 100644 --- a/pkg/baseboard/baseboard_stub.go +++ b/pkg/baseboard/baseboard_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/bios/bios_stub.go b/pkg/bios/bios_stub.go index 362df4c9..5307b4a0 100644 --- a/pkg/bios/bios_stub.go +++ b/pkg/bios/bios_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/block/block_linux_test.go b/pkg/block/block_linux_test.go index 6b96e4cd..007076c9 100644 --- a/pkg/block/block_linux_test.go +++ b/pkg/block/block_linux_test.go @@ -4,6 +4,7 @@ // See the COPYING file in the root project directory for full text. // +//go:build linux // +build linux package block diff --git a/pkg/block/block_stub.go b/pkg/block/block_stub.go index 033725de..f5b51645 100644 --- a/pkg/block/block_stub.go +++ b/pkg/block/block_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !darwin && !windows // +build !linux,!darwin,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/chassis/chassis_stub.go b/pkg/chassis/chassis_stub.go index 2e45e15a..0e3fd94b 100644 --- a/pkg/chassis/chassis_stub.go +++ b/pkg/chassis/chassis_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/cpu/cpu_stub.go b/pkg/cpu/cpu_stub.go index 9ff41cd1..5d07ee43 100644 --- a/pkg/cpu/cpu_stub.go +++ b/pkg/cpu/cpu_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/cpu/cpu_windows.go b/pkg/cpu/cpu_windows.go index 07a7dddd..3de16498 100644 --- a/pkg/cpu/cpu_windows.go +++ b/pkg/cpu/cpu_windows.go @@ -1,4 +1,6 @@ +//go:build !linux // +build !linux + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/gpu/gpu_stub.go b/pkg/gpu/gpu_stub.go index 9604637d..48991ec8 100644 --- a/pkg/gpu/gpu_stub.go +++ b/pkg/gpu/gpu_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/linuxpath/path_linux_test.go b/pkg/linuxpath/path_linux_test.go index e34b6019..dc0e606a 100644 --- a/pkg/linuxpath/path_linux_test.go +++ b/pkg/linuxpath/path_linux_test.go @@ -4,6 +4,7 @@ // See the COPYING file in the root project directory for full text. // +//go:build linux // +build linux package linuxpath_test diff --git a/pkg/memory/memory_stub.go b/pkg/memory/memory_stub.go index 26a28b05..6ce99e00 100644 --- a/pkg/memory/memory_stub.go +++ b/pkg/memory/memory_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/net/net_linux_test.go b/pkg/net/net_linux_test.go index eaf90577..88678894 100644 --- a/pkg/net/net_linux_test.go +++ b/pkg/net/net_linux_test.go @@ -4,6 +4,7 @@ // See the COPYING file in the root project directory for full text. // +//go:build linux // +build linux package net diff --git a/pkg/net/net_stub.go b/pkg/net/net_stub.go index a19b7699..c8dfa090 100644 --- a/pkg/net/net_stub.go +++ b/pkg/net/net_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/pci/pci_stub.go b/pkg/pci/pci_stub.go index 2588878c..9ebb396d 100644 --- a/pkg/pci/pci_stub.go +++ b/pkg/pci/pci_stub.go @@ -1,4 +1,6 @@ +//go:build !linux // +build !linux + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/product/product_stub.go b/pkg/product/product_stub.go index 8d848b62..8fc9724f 100644 --- a/pkg/product/product_stub.go +++ b/pkg/product/product_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text. diff --git a/pkg/snapshot/clonetree_stub.go b/pkg/snapshot/clonetree_stub.go index 9665875a..af85a55b 100644 --- a/pkg/snapshot/clonetree_stub.go +++ b/pkg/snapshot/clonetree_stub.go @@ -1,4 +1,6 @@ +//go:build !linux // +build !linux + // // Use and distribution licensed under the Apache license version 2. // diff --git a/pkg/topology/topology_stub.go b/pkg/topology/topology_stub.go index b2b801f7..b5ee4354 100644 --- a/pkg/topology/topology_stub.go +++ b/pkg/topology/topology_stub.go @@ -1,4 +1,6 @@ +//go:build !linux && !windows // +build !linux,!windows + // Use and distribution licensed under the Apache license version 2. // // See the COPYING file in the root project directory for full text.