~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to doc/devel/release.html

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
hg update release.r<i>NN</i>
15
15
</pre>
16
16
 
 
17
<h2 id="r59">r59 (released 2011/08/01)</h2>
 
18
 
 
19
<p>
 
20
The r59 release corresponds to 
 
21
<code><a href="weekly.html#2011-07-07">weekly.2011-07-07</a></code>.
 
22
This section highlights the most significant changes in this release.
 
23
For a more detailed summary, see the
 
24
<a href="weekly.html#2011-07-07">weekly release notes</a>.
 
25
For complete information, see the
 
26
<a href="http://code.google.com/p/go/source/list?r=release-branch.r59">Mercurial change list</a>.
 
27
</p>
 
28
 
 
29
<h3 id="r59.lang">Language</h3>
 
30
 
 
31
<p>
 
32
This release includes a language change that restricts the use of
 
33
<code>goto</code>.  In essence, a <code>goto</code> statement outside a block
 
34
cannot jump to a label inside that block. Your code may require changes if it
 
35
uses <code>goto</code>.
 
36
See <a href="http://code.google.com/p/go/source/detail?r=dc6d3cf9279d">this
 
37
changeset</a> for how the new rule affected the Go tree.
 
38
</p>
 
39
 
 
40
<h3 id="r59.pkg">Packages</h3>
 
41
 
 
42
<p>
 
43
As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
 
44
necessary for these changes to package APIs.
 
45
</p>
 
46
 
 
47
<p>
 
48
<a href="/pkg/http">Package http</a> has a new
 
49
<a href="/pkg/http/#FileSystem">FileSystem</a> interface that provides access
 
50
to files. The <a href="/pkg/http/#FileServer">FileServer</a> helper now takes a
 
51
<code>FileSystem</code> argument instead of an explicit file system root. By
 
52
implementing your own <code>FileSystem</code> you can use the
 
53
<code>FileServer</code> to serve arbitrary data.
 
54
</p>
 
55
 
 
56
<p>
 
57
<a href="/pkg/os/">Package os</a>'s <code>ErrorString</code> type has been
 
58
hidden. Most uses of <code>os.ErrorString</code> can be replaced with
 
59
<a href="/pkg/os/#NewError">os.NewError</a>.
 
60
</p>
 
61
 
 
62
<p>
 
63
<a href="/pkg/reflect/">Package reflect</a> supports a new struct tag scheme
 
64
that enables sharing of struct tags between multiple packages.
 
65
In this scheme, the tags must be of the form:
 
66
</p>
 
67
<pre>
 
68
        `key:"value" key2:"value2"`
 
69
</pre>
 
70
<p>
 
71
The <a href="/pkg/reflect/#StructField">StructField</a> type's Tag field now
 
72
has type <a href="/pkg/reflect/#StructTag">StructTag</a>, which has a
 
73
<code>Get</code> method. Clients of <a href="/pkg/json">json</a> and
 
74
<a href="/pkg/xml">xml</a> will need to be updated. Code that says
 
75
</p>
 
76
<pre>
 
77
        type T struct {
 
78
                X int "name"
 
79
        }
 
80
</pre>
 
81
<p>
 
82
should become
 
83
</p>
 
84
<pre>
 
85
        type T struct {
 
86
                X int `json:"name"`  // or `xml:"name"`
 
87
        }
 
88
</pre>
 
89
<p>
 
90
Use <a href="/cmd/govet/">govet</a> to identify struct tags that need to be
 
91
changed to use the new syntax.
 
92
</p>
 
93
 
 
94
<p>
 
95
<a href="/pkg/sort/">Package sort</a>'s <code>IntArray</code> type has been
 
96
renamed to <a href="/pkg/sort/#IntSlice">IntSlice</a>, and similarly for
 
97
<a href="/pkg/sort/#Float64Slice">Float64Slice</a> and
 
98
<a href="/pkg/sort/#StringSlice">StringSlice</a>.
 
99
</p>
 
100
 
 
101
<p>
 
102
<a href="/pkg/strings/">Package strings</a>'s <code>Split</code> function has
 
103
itself been split into <a href="/pkg/strings/#Split">Split</a> and
 
104
<a href="/pkg/strings/#SplitN">SplitN</a>.
 
105
<code>SplitN</code> is the same as the old <code>Split</code>.
 
106
The new <code>Split</code> is equivalent to <code>SplitN</code> with a final
 
107
argument of -1.
 
108
</p>
 
109
 
 
110
<a href="/pkg/image/draw/">Package image/draw</a>'s
 
111
<a href="/pkg/image/draw/#Draw">Draw</a> function now takes an additional
 
112
argument, a compositing operator.
 
113
If in doubt, use <a href="/pkg/image/draw/#Op">draw.Over</a>.
 
114
</p>
 
115
 
 
116
<h3 id="r59.cmd">Tools</h3>
 
117
 
 
118
<p>
 
119
<a href="/cmd/goinstall/">Goinstall</a> now installs packages and commands from
 
120
arbitrary remote repositories (not just Google Code, Github, and so on).
 
121
See the <a href="/cmd/goinstall/">goinstall documentation</a> for details.
 
122
</p>
 
123
 
17
124
<h2 id="r58">r58 (released 2011/06/29)</h2>
18
125
 
19
126
<p>