From 3e2c522d5c712fa2b1d18a101272abefc7dcb074 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Mon, 13 May 2019 14:51:55 -0700 Subject: errors, fmt: revert rejected changes for Go 1.13 Reverts the following changes: https://go.googlesource.com/go/+/1f90d081391d4f5911960fd28d81d7ea5e554a8f https://go.googlesource.com/go/+/8bf18b56a47a98b9dd2fa03beb358312237a8c76 https://go.googlesource.com/go/+/5402854c3557f87fa2741a52ffc15dfb1ef333cc https://go.googlesource.com/go/+/37f84817247d3b8e687a701ccb0d6bc7ffe3cb78 https://go.googlesource.com/go/+/6be6f114e0d483a233101a67c9644cd72bd3ae7a Partially reverts the followinng change, removing the errors.Opaque function and the errors.Wrapper type definition: https://go.googlesource.com/go/+/62f5e8156ef56fa61e6af56f4ccc633bde1a9120 Updates documentation referencing the Wrapper type. Change-Id: Ia622883e39cafb06809853e3fd90b21441124534 Reviewed-on: https://go-review.googlesource.com/c/go/+/176997 Run-TryBot: Damien Neil TryBot-Result: Gobot Gobot Reviewed-by: Marcel van Lohuizen --- src/internal/oserror/errors_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/internal/oserror/errors_test.go') diff --git a/src/internal/oserror/errors_test.go b/src/internal/oserror/errors_test.go index 6d6a56a0c7..50dd4678d4 100644 --- a/src/internal/oserror/errors_test.go +++ b/src/internal/oserror/errors_test.go @@ -34,7 +34,8 @@ func TestIsTimeout(t *testing.T) { {true, ttError{timeout: true}}, {true, isError{os.ErrTimeout}}, {true, os.ErrTimeout}, - {true, fmt.Errorf("wrap: %w", os.ErrTimeout)}, + // TODO: restore when %w is reimplemented + //{true, fmt.Errorf("wrap: %w", os.ErrTimeout)}, {false, ttError{timeout: false}}, {false, errors.New("error")}, } { @@ -52,7 +53,8 @@ func TestIsTemporary(t *testing.T) { {true, ttError{temporary: true}}, {true, isError{os.ErrTemporary}}, {true, os.ErrTemporary}, - {true, fmt.Errorf("wrap: %w", os.ErrTemporary)}, + // TODO: restore when %w is reimplemented + //{true, fmt.Errorf("wrap: %w", os.ErrTemporary)}, {false, ttError{temporary: false}}, {false, errors.New("error")}, } { -- cgit v1.3-5-g9baa