From 440ea78e24a82e0f8e8fe190dac476d9ae5ddf3e Mon Sep 17 00:00:00 2001 From: Anton Troyanov Date: Thu, 7 Oct 2021 02:46:46 +0300 Subject: [PATCH] fix: set min-go-version to 1.16 Changes that were introduced in 8ccea19c0cec5d05ed99068d46bf46efc900d24d made it impossible to compile sarama with go 1.15 (which is mentioned as officially supported version in the README file) io.Discard and io.ReadAll appeared only in 1.16 https://golang.org/doc/go1.16#ioutil To address this issue this commit bumps minimal supported go version defined in go.mod file, to provide a clear message that 1.16 is required ``` > go build ./config.go:678:37: undefined: io.Discard ./decompress.go:43:10: undefined: io.ReadAll ./decompress.go:55:10: undefined: io.ReadAll ./sarama.go:89:29: undefined: io.Discard note: module requires Go 1.16 ``` --- CHANGELOG.md | 4 ++++ README.md | 2 +- go.mod | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd826e273..22e0a979e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - #1912 - @faillefer Support for --delete-offsets for consumer group topic +# Fixes + +- #2048 - @troyanov - Set minimum supported go version to 1.16 + #### Version 1.28.0 (2021-02-15) **Note that with this release we change `RoundRobinBalancer` strategy to match Java client behavior. See #1788 for details.** diff --git a/README.md b/README.md index f66550a8b..d57be3a38 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You might also want to look at the [Frequently Asked Questions](https://github.c Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. This means we currently officially support -Go 1.15 through 1.16, and Kafka 2.7 through 2.8, although older releases are +Go 1.16, and Kafka 2.7 through 2.8, although older releases are still likely to work. Sarama follows semantic versioning and provides API stability via the gopkg.in service. diff --git a/go.mod b/go.mod index d1fdd2e4c..b6cea6b36 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Shopify/sarama -go 1.13 +go 1.16 require ( github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae