diff options
| author | Andrew Gerrand <adg@golang.org> | 2011-11-02 12:00:13 +0900 |
|---|---|---|
| committer | Andrew Gerrand <adg@golang.org> | 2011-11-02 12:00:13 +0900 |
| commit | ede44c68a48ba579defa08d1df94b268c93ab8e3 (patch) | |
| tree | 26545c6f6727f85816f7472555789355578be4fa /doc/devel | |
| parent | 492098eb759bba2ff5c86b0a868158afe32e91f8 (diff) | |
| download | go-weekly.2011-11-02.tar.xz | |
weekly.2011-11-02weekly.2011-11-02
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5308077
Diffstat (limited to 'doc/devel')
| -rw-r--r-- | doc/devel/weekly.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/devel/weekly.html b/doc/devel/weekly.html index 67662563dd..52e622851f 100644 --- a/doc/devel/weekly.html +++ b/doc/devel/weekly.html @@ -14,6 +14,26 @@ hg pull hg update weekly.<i>YYYY-MM-DD</i> </pre> +<h2 id="2011-11-02">2011-11-02 (new error type)</h2> + +<pre> +This snapshot introduces the built-in error type, defined as + + type error interface { + Error() string + } + +The error type replaces os.Error. Notice that the method name has changed from +String to Error. Package fmt's Print formats both Stringers and errors: +in general there is no need to implement both String and Error methods. + +Gofix can update most code. If you have split your package across many files, +it may help to use the -force=error command-line option, which forces gofix to +apply the error fix even if it is not obvious that a particular file needs it. +As always, it is a good idea to read and test the changes that gofix made +before committing them to your version control system. +</pre> + <h2 id="2011-11-01">2011-11-01</h2> <pre> |
