From 3d71be2448b6f7014a0f6398c821c8a7218f0ab4 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Thu, 4 Apr 2024 19:36:39 -0400 Subject: [PATCH] Document supported Go versions (#214) Establish a policy of supporting the two most recent Go versions. Update CI to use Go 1.21 and 1.22. Update go.mod to require go 1.21. --- .changelog/214.txt | 7 +++++++ .github/workflows/go.yml | 14 +++++++------- README.md | 6 ++++++ go.mod | 2 +- go.sum | 3 +++ 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .changelog/214.txt diff --git a/.changelog/214.txt b/.changelog/214.txt new file mode 100644 index 00000000..e6330efc --- /dev/null +++ b/.changelog/214.txt @@ -0,0 +1,7 @@ +```release-note:enhancement +build: Require Go 1.21 for the module. +``` + +```release-note:enhancement +docs: Add policy of supporting the two most recent Go releases. +``` diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 11904d52..92f29e10 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,7 +34,7 @@ jobs: matrix: go: - 1.22.x - - 1.18.x + - 1.21.x os: - macos-11 - macos-12 @@ -53,10 +53,10 @@ jobs: - {cgo: cgo, os: ubuntu-20.04} - {cgo: cgo, os: ubuntu-22.04} # Limit the OS variants tested with the earliest supported Go version (save resources). - - {go: 1.18.10, os: macos-11} - - {go: 1.18.10, os: macos-12} - - {go: 1.18.10, os: windows-2019} - - {go: 1.18.10, os: ubuntu-22.04} + - {go: 1.21.x, os: macos-11} + - {go: 1.21.x, os: macos-12} + - {go: 1.21.x, os: windows-2019} + - {go: 1.21.x, os: ubuntu-22.04} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -99,8 +99,8 @@ jobs: runs-on: ubuntu-latest env: # Only GITHUB_* are passed into the VM. - GITHUB_GOLANG_VERSION: 1.22.1 - name: test (1.22.1, freebsd-14.0, cgo) + GITHUB_GOLANG_VERSION: 1.22.2 + name: test (1.22.2, freebsd-14.0, cgo) steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index c0f35aa9..cd2bd514 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,9 @@ This table lists the OS and architectures for which a "provider" is implemented. | windows/arm | | | * On darwin (macOS) host information like machineid and process information like memory, cpu, user and starttime require cgo. + +### Supported Go versions + +go-sysinfo supports the [two most recent Go releases][ci_go_versions]. + +[ci_go_versions]: https://github.com/elastic/go-sysinfo/blob/main/.github/workflows/go.yml#L35-L37 diff --git a/go.mod b/go.mod index 101bfba3..b37c27f1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/elastic/go-sysinfo -go 1.18 +go 1.21 require ( github.com/docker/docker v24.0.9+incompatible diff --git a/go.sum b/go.sum index 4e4b6f52..37e10a58 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -18,6 +19,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= @@ -44,6 +46,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=