Skip to content

Commit 7795f06

Browse files
authored
Merge pull request #47 from hashicorp/mwhooker-patch-1
Add required go version to docs
2 parents c7dd669 + 9cc5fd8 commit 7795f06

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ Install using `go get github.com/hashicorp/go-multierror`.
2626
Full documentation is available at
2727
https://pkg.go.dev/github.com/hashicorp/go-multierror
2828

29+
### Requires go version 1.13 or newer
30+
31+
`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced
32+
[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which
33+
this library takes advantage of.
34+
35+
If you need to use an earlier version of go, you can use the
36+
[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0)
37+
tag, which doesn't rely on features in go 1.13.
38+
39+
If you see compile errors that look like the below, it's likely that
40+
you're on an older version of go:
41+
42+
```
43+
/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As
44+
/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is
45+
```
46+
2947
## Usage
3048

3149
go-multierror is easy to use and purposely built to be unobtrusive in

0 commit comments

Comments
 (0)