<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/errors/wrap_test.go, branch dev.boringcrypto</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add errors.Unwrap example</title>
<updated>2021-11-05T21:28:50+00:00</updated>
<author>
<name>jiahua wang</name>
<email>wjh180909@gmail.com</email>
</author>
<published>2021-10-13T14:16:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=fb8b1764d8e8afdaf5d8fd00af3720e42d96ad9c'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: update references to symbols moved from os to io/fs</title>
<updated>2020-10-20T02:32:42+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2020-07-07T17:49:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=7bb721b9384bdd196befeaed593b185f7f2a5589'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add example for Is</title>
<updated>2020-04-13T20:04:56+00:00</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2020-04-12T14:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=7b5303d08a1b589708d6bad3d7015d9856273aac'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: improve As tests</title>
<updated>2019-06-11T17:48:48+00:00</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2019-06-08T11:32:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=34a43d7c1de171691546e95aca503ece4602d82b'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: fix package example</title>
<updated>2019-06-03T22:09:05+00:00</updated>
<author>
<name>Andrew Gerrand</name>
<email>adg@golang.org</email>
</author>
<published>2019-05-31T10:33:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=5e2af2b0d2e7e367e461d4162b0338ff2dc08033'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors, fmt: revert rejected changes for Go 1.13</title>
<updated>2019-05-15T19:53:15+00:00</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2019-05-13T21:51:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=3e2c522d5c712fa2b1d18a101272abefc7dcb074'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: fix Is panics if target is uncomparable</title>
<updated>2019-05-06T17:02:59+00:00</updated>
<author>
<name>LE Manh Cuong</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2019-05-05T16:20:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0bf1f02ed921ec2f78b27f133e7a688d3e8fa82e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: return false if nil error is passed to As</title>
<updated>2019-04-10T15:59:35+00:00</updated>
<author>
<name>Ahsun Ahmed</name>
<email>ahmed.ahsun@gmail.com</email>
</author>
<published>2019-03-21T16:45:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=fda5e6d6fa7abfe974a58dfeeceb95a8165d1b63'/>
<id>fda5e6d6fa7abfe974a58dfeeceb95a8165d1b63</id>
<content type='text'>
Fixes #30970

Change-Id: I333676b55a2364e329fffeafca8fc57d45a0b84b
Reviewed-on: https://go-review.googlesource.com/c/go/+/168598
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #30970

Change-Id: I333676b55a2364e329fffeafca8fc57d45a0b84b
Reviewed-on: https://go-review.googlesource.com/c/go/+/168598
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add Unwrap, Is, and As</title>
<updated>2019-02-27T19:09:40+00:00</updated>
<author>
<name>Marcel van Lohuizen</name>
<email>mpvl@golang.org</email>
</author>
<published>2019-02-22T23:09:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=62f5e8156ef56fa61e6af56f4ccc633bde1a9120'/>
<id>62f5e8156ef56fa61e6af56f4ccc633bde1a9120</id>
<content type='text'>
Unwrap, Is and As are as defined in proposal
Issue #29934.

Also add Opaque for enforcing an error cannot
be unwrapped.

Change-Id: I4f3feaa42e3ee7477b588164ac622ba4d5e77cad
Reviewed-on: https://go-review.googlesource.com/c/163558
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unwrap, Is and As are as defined in proposal
Issue #29934.

Also add Opaque for enforcing an error cannot
be unwrapped.

Change-Id: I4f3feaa42e3ee7477b588164ac622ba4d5e77cad
Reviewed-on: https://go-review.googlesource.com/c/163558
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
