<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/errors/wrap_test.go, branch json-isValidNumber</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-20T21:55:10Z</updated>
<entry>
<title>errors: move example functions into example_test file</title>
<updated>2023-01-20T21:55:10Z</updated>
<author>
<name>fangguizhen</name>
<email>1297394526@qq.com</email>
</author>
<published>2023-01-19T23:21:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=27b6ace2b4b068905eb2963e656e3cefcba32222'/>
<id>urn:sha1:27b6ace2b4b068905eb2963e656e3cefcba32222</id>
<content type='text'>
Change-Id: Ide70476698d82a51881802dd6bf05dd7abcd60e8
GitHub-Last-Rev: ddb251ded669d3dbbb96a05f4df7151c8d7c16d2
GitHub-Pull-Request: golang/go#57931
Reviewed-on: https://go-review.googlesource.com/c/go/+/462292
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>errors, fmt: add support for wrapping multiple errors</title>
<updated>2022-09-29T18:40:40Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-09-22T17:43:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4a0a2b33dfa3c99250efa222439f2c27d6780e4a'/>
<id>urn:sha1:4a0a2b33dfa3c99250efa222439f2c27d6780e4a</id>
<content type='text'>
An error which implements an "Unwrap() []error" method wraps all the
non-nil errors in the returned []error.

We replace the concept of the "error chain" inspected by errors.Is
and errors.As with the "error tree". Is and As perform a pre-order,
depth-first traversal of an error's tree. As returns the first
matching result, if any.

The new errors.Join function returns an error wrapping a list of errors.

The fmt.Errorf function now supports multiple instances of the %w verb.

For #53435.

Change-Id: Ib7402e70b68e28af8f201d2b66bd8e87ccfb5283
Reviewed-on: https://go-review.googlesource.com/c/go/+/432898
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Joseph Tsai &lt;joetsai@digital-static.net&gt;
</content>
</entry>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>urn:sha1:2580d0e08d5e9f979b943758d3c49877fb2324cb</id>
<content type='text'>
And then revert the bootstrap cmd directories and certain testdata.
And adjust tests as needed.

Not reverting the changes in std that are bootstrapped,
because some of those changes would appear in API docs,
and we want to use any consistently.
Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories
when preparing the bootstrap copy.

A few files changed as a result of running gofmt -w
not because of interface{} -&gt; any but because they
hadn't been updated for the new //go:build lines.

Fixes #49884.

Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09
Reviewed-on: https://go-review.googlesource.com/c/go/+/368254
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>errors: add errors.Unwrap example</title>
<updated>2021-11-05T21:28:50Z</updated>
<author>
<name>jiahua wang</name>
<email>wjh180909@gmail.com</email>
</author>
<published>2021-10-13T14:16:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=fb8b1764d8e8afdaf5d8fd00af3720e42d96ad9c'/>
<id>urn:sha1:fb8b1764d8e8afdaf5d8fd00af3720e42d96ad9c</id>
<content type='text'>
Change-Id: Id2336a6059f7a8d627e6c0661a4d4c05485b65f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/355589
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Cherry Mui &lt;cherryyz@google.com&gt;
Trust: Robert Findley &lt;rfindley@google.com&gt;
</content>
</entry>
<entry>
<title>all: update references to symbols moved from os to io/fs</title>
<updated>2020-10-20T02:32:42Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-07-07T17:49:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7bb721b9384bdd196befeaed593b185f7f2a5589'/>
<id>urn:sha1:7bb721b9384bdd196befeaed593b185f7f2a5589</id>
<content type='text'>
The old os references are still valid, but update our code
to reflect best practices and get used to the new locations.

Code compiled with the bootstrap toolchain
(cmd/asm, cmd/dist, cmd/compile, debug/elf)
must remain Go 1.4-compatible and is excluded.

For #41190.

Change-Id: I8f9526977867c10a221e2f392f78d7dec073f1bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/243907
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>errors: add example for Is</title>
<updated>2020-04-13T20:04:56Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2020-04-12T14:00:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7b5303d08a1b589708d6bad3d7015d9856273aac'/>
<id>urn:sha1:7b5303d08a1b589708d6bad3d7015d9856273aac</id>
<content type='text'>
Add ExampleIs to illustrate how errors.Is works.

Updates #31716.
Updates #38369.

Change-Id: I1b9a6667614635aa3a5ed8b2c108d8eb6f35748b
Reviewed-on: https://go-review.googlesource.com/c/go/+/228038
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>errors: improve As tests</title>
<updated>2019-06-11T17:48:48Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2019-06-08T11:32:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=34a43d7c1de171691546e95aca503ece4602d82b'/>
<id>urn:sha1:34a43d7c1de171691546e95aca503ece4602d82b</id>
<content type='text'>
Check the value of target after As returns true.

Change-Id: I76a2b25fe825ee1dbb5f39f8f0b211c55bd25a4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181299
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>errors: fix package example</title>
<updated>2019-06-03T22:09:05Z</updated>
<author>
<name>Andrew Gerrand</name>
<email>adg@golang.org</email>
</author>
<published>2019-05-31T10:33:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5e2af2b0d2e7e367e461d4162b0338ff2dc08033'/>
<id>urn:sha1:5e2af2b0d2e7e367e461d4162b0338ff2dc08033</id>
<content type='text'>
The example in example_test.go requires that the whole file be
displayed; the addition of ExampleAs meant that only the body of the
package example function was shown, rather than the surrounding context.

This change moves ExampleAs to the file wrap_test.go file, restoring the
package example to its former glory.

Update #31716

Change-Id: Id0ea77bc06023b239a63c1d6a7c8b3c1dae91ce9
Reviewed-on: https://go-review.googlesource.com/c/go/+/179737
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Reviewed-by: Jean de Klerk &lt;deklerk@google.com&gt;
Run-TryBot: Benny Siegert &lt;bsiegert@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>errors, fmt: revert rejected changes for Go 1.13</title>
<updated>2019-05-15T19:53:15Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2019-05-13T21:51:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3e2c522d5c712fa2b1d18a101272abefc7dcb074'/>
<id>urn:sha1:3e2c522d5c712fa2b1d18a101272abefc7dcb074</id>
<content type='text'>
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 &lt;dneil@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
</content>
</entry>
<entry>
<title>errors: fix Is panics if target is uncomparable</title>
<updated>2019-05-06T17:02:59Z</updated>
<author>
<name>LE Manh Cuong</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2019-05-05T16:20:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0bf1f02ed921ec2f78b27f133e7a688d3e8fa82e'/>
<id>urn:sha1:0bf1f02ed921ec2f78b27f133e7a688d3e8fa82e</id>
<content type='text'>
Fixes #31841

Change-Id: I3f068686154fd2fa5755b0df47b4eaa5c9a19107
Reviewed-on: https://go-review.googlesource.com/c/go/+/175260
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
</feed>
