From 435d0fdac58b7c9dc810abe87307a097ba6de756 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Fri, 5 Mar 2021 15:24:51 -0800 Subject: [PATCH 1/2] Add required go version to docs Closes #37 --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index e92fa61..a946c43 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,24 @@ Install using `go get github.com/hashicorp/go-multierror`. Full documentation is available at http://godoc.org/github.com/hashicorp/go-multierror +### Requires go version 1.13 or newer + +`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced +[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which +this library takes advantage of. + +If you need to use an earlier version of go, you can use the +[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) +tag, which doesn't rely on features in go 1.13. + +If you see compile errors that look like the below, it's likely that +you're on an older version of go. + +``` +/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As +/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is +``` + ## Usage go-multierror is easy to use and purposely built to be unobtrusive in From 9cc5fd891eb79ebb409a48d8c6854e65fbe89e79 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Fri, 5 Mar 2021 15:26:09 -0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a946c43..e9d132d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ If you need to use an earlier version of go, you can use the tag, which doesn't rely on features in go 1.13. If you see compile errors that look like the below, it's likely that -you're on an older version of go. +you're on an older version of go: ``` /go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As