<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/errors, branch master</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>errors: improve the godoc for Join and Unwrap</title>
<updated>2023-03-30T23:49:50+00:00</updated>
<author>
<name>Daniel Nephin</name>
<email>dnephin@gmail.com</email>
</author>
<published>2023-03-30T16:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=c0fd7f79fe445ad49e11bf42c8c785cb71b3bedf'/>
<id>c0fd7f79fe445ad49e11bf42c8c785cb71b3bedf</id>
<content type='text'>
Document that errors returned by Join always implement Unwrap []error.

Explicitly state that Unwrap does not unwrap errors
with an Unwrap() []error method.

Change-Id: Id610345dcf43ca54a9dde157e56c5815c5112073
GitHub-Last-Rev: 7a0ec450bd0b2b38eecb5b94eaec485f4a6debbd
GitHub-Pull-Request: golang/go#59301
Reviewed-on: https://go-review.googlesource.com/c/go/+/480021
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Auto-Submit: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@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>
Document that errors returned by Join always implement Unwrap []error.

Explicitly state that Unwrap does not unwrap errors
with an Unwrap() []error method.

Change-Id: Id610345dcf43ca54a9dde157e56c5815c5112073
GitHub-Last-Rev: 7a0ec450bd0b2b38eecb5b94eaec485f4a6debbd
GitHub-Pull-Request: golang/go#59301
Reviewed-on: https://go-review.googlesource.com/c/go/+/480021
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Auto-Submit: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: clarify Join documentation</title>
<updated>2023-03-17T21:12:15+00:00</updated>
<author>
<name>David Bendory</name>
<email>bendory@users.noreply.github.com</email>
</author>
<published>2023-03-17T14:04:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=f53a95fe393b0a23592a54cf83e3d25cfa4bdbdb'/>
<id>f53a95fe393b0a23592a54cf83e3d25cfa4bdbdb</id>
<content type='text'>
The previous documentation used a double-negative in describing Join behavior; this use of language could be confusing.

This update removes the double-negative.

Change-Id: If13e88682e865314a556e7d381143a97fa5486d9
GitHub-Last-Rev: 92b3f88a5d49229e71adafcfa7b1d01dcb7646f3
GitHub-Pull-Request: golang/go#59082
Reviewed-on: https://go-review.googlesource.com/c/go/+/477095
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous documentation used a double-negative in describing Join behavior; this use of language could be confusing.

This update removes the double-negative.

Change-Id: If13e88682e865314a556e7d381143a97fa5486d9
GitHub-Last-Rev: 92b3f88a5d49229e71adafcfa7b1d01dcb7646f3
GitHub-Pull-Request: golang/go#59082
Reviewed-on: https://go-review.googlesource.com/c/go/+/477095
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add ErrUnsupported</title>
<updated>2023-03-11T05:07:02+00:00</updated>
<author>
<name>Andy Pan</name>
<email>panjf2000@gmail.com</email>
</author>
<published>2023-03-02T03:57:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=70f98a251efdbfd619c4ff466a43da299ad04752'/>
<id>70f98a251efdbfd619c4ff466a43da299ad04752</id>
<content type='text'>
Fixes #41198

Change-Id: Ib33a11d0eb311f8e2b81de24d11df49e00b2fc81
Reviewed-on: https://go-review.googlesource.com/c/go/+/473935
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Andy Pan &lt;panjf2000@gmail.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #41198

Change-Id: Ib33a11d0eb311f8e2b81de24d11df49e00b2fc81
Reviewed-on: https://go-review.googlesource.com/c/go/+/473935
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Andy Pan &lt;panjf2000@gmail.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: move example functions into example_test file</title>
<updated>2023-01-20T21:55:10+00:00</updated>
<author>
<name>fangguizhen</name>
<email>1297394526@qq.com</email>
</author>
<published>2023-01-19T23:21:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=27b6ace2b4b068905eb2963e656e3cefcba32222'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add test for Join</title>
<updated>2022-10-17T21:48:12+00:00</updated>
<author>
<name>fangguizhen</name>
<email>1297394526@qq.com</email>
</author>
<published>2022-10-17T18:32:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=26b48442569102226baba1d9b4a83aaee3d06611'/>
<id>26b48442569102226baba1d9b4a83aaee3d06611</id>
<content type='text'>
Change-Id: I77c61211a488c66f1d445c0bf01e35aaf4f83565
GitHub-Last-Rev: c411a56a3b5215e6dd093be7069affb176b48dfd
GitHub-Pull-Request: golang/go#56279
Reviewed-on: https://go-review.googlesource.com/c/go/+/443316
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I77c61211a488c66f1d445c0bf01e35aaf4f83565
GitHub-Last-Rev: c411a56a3b5215e6dd093be7069affb176b48dfd
GitHub-Pull-Request: golang/go#56279
Reviewed-on: https://go-review.googlesource.com/c/go/+/443316
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors, fmt: add support for wrapping multiple errors</title>
<updated>2022-09-29T18:40:40+00:00</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-09-22T17:43:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=4a0a2b33dfa3c99250efa222439f2c27d6780e4a'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<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>errors: improve wording in As doc comment</title>
<updated>2021-11-02T20:59:34+00:00</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josharian@gmail.com</email>
</author>
<published>2021-11-02T18:05:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=79024cf33d0cea53a0c75f428d79a9f971f12b5b'/>
<id>79024cf33d0cea53a0c75f428d79a9f971f12b5b</id>
<content type='text'>
"so" didn't have an antecedent.

Change-Id: I27f7b334decea7bc34bfa3f3f2d3a79874c6fe90
Reviewed-on: https://go-review.googlesource.com/c/go/+/360797
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"so" didn't have an antecedent.

Change-Id: I27f7b334decea7bc34bfa3f3f2d3a79874c6fe90
Reviewed-on: https://go-review.googlesource.com/c/go/+/360797
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: mention Is methods should not call Unwrap</title>
<updated>2021-10-19T18:42:57+00:00</updated>
<author>
<name>Matt T. Proud</name>
<email>matt.proud@gmail.com</email>
</author>
<published>2021-10-19T08:09:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=7999fd4710e7f987e86d7b32dd9af31ced4810ba'/>
<id>7999fd4710e7f987e86d7b32dd9af31ced4810ba</id>
<content type='text'>
errors.Is internally unwraps the error until the error matches the
target. Because of this, a user-authored Is method on an error type
need not call errors.Unwrap on itself or the target, because that would
make the unwrapping operation O(N^2). It is a subtle detail to remind
authors for resource efficiency reasons.

Change-Id: Ic1ba59a5bdbfe2c7cb51a2cba2537ab6de4a13ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/356789
Reviewed-by: Jean de Klerk &lt;deklerk@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Trust: Jean de Klerk &lt;deklerk@google.com&gt;
Trust: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Jean de Klerk &lt;deklerk@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
errors.Is internally unwraps the error until the error matches the
target. Because of this, a user-authored Is method on an error type
need not call errors.Unwrap on itself or the target, because that would
make the unwrapping operation O(N^2). It is a subtle detail to remind
authors for resource efficiency reasons.

Change-Id: Ic1ba59a5bdbfe2c7cb51a2cba2537ab6de4a13ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/356789
Reviewed-by: Jean de Klerk &lt;deklerk@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Trust: Jean de Klerk &lt;deklerk@google.com&gt;
Trust: Damien Neil &lt;dneil@google.com&gt;
Run-TryBot: Jean de Klerk &lt;deklerk@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
