@@ -9,6 +9,7 @@ <h2 id="introduction">Introduction to Go 1.1</h2>
9
9
TODO
10
10
- overview
11
11
- link back to Go 1 and also Go 1 Compatibility docs.
12
+ - links through body of text
12
13
13
14
< h2 id ="language "> Changes to the language</ h2 >
14
15
@@ -33,7 +34,8 @@ <h3 id="divzero">Integer division by zero</h3>
33
34
34
35
< h2 id ="impl "> Changes to the implementations and tools</ h2 >
35
36
36
- TODO: more
37
+ < li > TODO: more</ li >
38
+ < li > TODO: unicode: surrogate halves in compiler, libraries, runtime</ li >
37
39
38
40
< h3 id ="gc-flag "> Command-line flag parsing</ h3 >
39
41
@@ -59,7 +61,7 @@ <h3 id="int">Size of int on 64-bit platforms</h3>
59
61
< em > Updating</ em > :
60
62
Most programs will be unaffected by this change.
61
63
Because Go does not allow implicit conversions between distinct
62
- < a href ="/ref/spec#Numeric_types "> numeric types</ a > ,
64
+ < a href ="/ref/spec/ #Numeric_types "> numeric types</ a > ,
63
65
no programs will stop compiling due to this change.
64
66
However, programs that contain implicit assumptions
65
67
that < code > int</ code > is only 32 bits may change behavior.
@@ -129,8 +131,27 @@ <h3 id="gofix">Changes to go fix</h3>
129
131
to convert the code to Go 1.0 first.
130
132
</ p >
131
133
134
+ < h2 id ="performance "> Performance</ h2 >
135
+
136
+ < p >
137
+ TODO introduction
138
+ </ p >
139
+
140
+ < ul >
141
+ < li > TODO better code generation (inlining, ...?)</ li >
142
+ < li > TODO parallel gc</ li >
143
+ < li > TODO more precise gc</ li >
144
+ < li > TODO networking is more efficient (known to runtime)</ li >
145
+ </ ul >
146
+
132
147
< h2 id ="library "> Changes to the standard library</ h2 >
133
148
149
+ < h3 id ="bufio_scanner "> bufio.Scanner</ h3 >
150
+
151
+ < p >
152
+ TODO
153
+ </ p >
154
+
134
155
< h3 id ="debug_elf "> debug/elf</ h3 >
135
156
< p >
136
157
Previous versions of the debug/elf package intentionally skipped over the first
@@ -141,13 +162,6 @@ <h3 id="debug_elf">debug/elf</h3>
141
162
adjusted to account for the additional symbol and the change in symbol offsets.
142
163
</ p >
143
164
144
- < h3 id ="html_template "> html/template</ h3 >
145
-
146
- < p >
147
- Templates using the undocumented and only partially implemented
148
- "noescape" feature will break: that feature was removed.
149
- </ p >
150
-
151
165
< h3 id ="net "> net</ h3 >
152
166
153
167
< p >
@@ -168,6 +182,20 @@ <h3 id="net">net</h3>
168
182
the < code > UnixConn</ code > .
169
183
</ p >
170
184
185
+ < h3 id ="reflect "> reflect</ h3 >
186
+
187
+ < p >
188
+ TODO:
189
+ < code > reflect</ code > : Select, ChanOf, MakeFunc, MapOf, SliceOf, Convert, Type.ConvertibleTo
190
+ </ p >
191
+
192
+ < h3 id ="runtime "> runtime</ h3 >
193
+
194
+ < p >
195
+ TODO:
196
+ < code > runtime</ code > : BlockProfile
197
+ </ p >
198
+
171
199
< h3 id ="time "> time</ h3 >
172
200
< p >
173
201
On FreeBSD, Linux, NetBSD, OS X and OpenBSD, previous versions of the time package
@@ -182,6 +210,10 @@ <h3 id="time">time</h3>
182
210
external storage.
183
211
</ p >
184
212
213
+ < p > TODO:
214
+ < code > time</ code > : ParseInLocation, Timer.Reset, Time.YearDay
215
+ </ p >
216
+
185
217
< h3 id ="exp_old "> Exp and old subtrees moved to go.exp subrepo</ h3 >
186
218
187
219
< p >
@@ -204,4 +236,217 @@ <h3 id="exp_old">Exp and old subtrees moved to go.exp subrepo</h3>
204
236
import "code.google.com/p/go.exp/ssa"
205
237
</ pre >
206
238
207
- < h3 id ="TODO "> TODO</ h3 >
239
+ < h3 id ="minor_library_changes "> Minor changes to the library</ h3 >
240
+
241
+ < p >
242
+ The following list summarizes a number of minor changes to the library, mostly additions.
243
+ See the relevant package documentation for more information about each change.
244
+ </ p >
245
+
246
+ < ul >
247
+ < li >
248
+ The < a href ="/pkg/bytes/ "> < code > bytes</ code > </ a > package has two new functions,
249
+ < a href ="/pkg/bytes/#TrimPrefix "> < code > TrimPrefix</ code > </ a >
250
+ and
251
+ < a href ="/pkg/bytes/#TrimSuffix "> < code > TrimSuffix</ code > </ a > ,
252
+ with self-evident properties.
253
+ Also, the < a href ="/pkg/bytes/#Buffer "> < code > Buffer</ code > </ a > type
254
+ has a new method
255
+ < a href ="/pkg/bytes/#Buffer.Grow "> < code > Grow</ code > </ a > that
256
+ provides some control over memory allocation inside the buffer.
257
+ Finally, the
258
+ < a href ="/pkg/bytes/#Reader "> < code > Reader</ code > </ a > type now has a
259
+ < a href ="/pkg/strings/#Reader.WriteTo "> < code > WriteTo</ code > </ a > method
260
+ so it implements the
261
+ < a href ="/pkg/io/#WriterTo "> < code > io.WriterTo</ code > </ a > interface.
262
+ </ li >
263
+
264
+ < li >
265
+ The < a href ="/pkg/crypto/hmac/ "> < code > crypto/hmac</ code > </ a > package has a new function,
266
+ < a href ="/pkg/crypto/hmac/#Equal "> < code > Equal</ code > </ a > , to compare two MACs.
267
+ </ li >
268
+
269
+ < li > TODO:
270
+ < code > crypto/x509</ code > : DecryptPEMBlock, EncryptPEMBlock etc.
271
+ </ li >
272
+
273
+ < li > TODO:
274
+ < code > database/sql/driver</ code > : Queryer
275
+ </ li >
276
+
277
+ < li > TODO:
278
+ < code > database/sql</ code > : Ping, SetMaxIdleConns
279
+ </ li >
280
+
281
+ < li > TODO:
282
+ < code > encoding/json</ code > : Decoder.Buffered, UseNumber, Number
283
+ </ li >
284
+
285
+ < li > TODO:
286
+ < code > encoding/xml</ code > : EscapeText Encoder.Indent
287
+ </ li >
288
+
289
+ < li >
290
+ In the < a href ="/pkg/go/ast/ "> < code > go/ast</ code > </ a > package, a
291
+ new type < a href ="/pkg/go/ast/#CommentMap "> < code > CommentMap</ code > </ a >
292
+ and associated methods makes it easier to extract and process comments in Go programs.
293
+ </ li >
294
+
295
+ < li >
296
+ In the < a href ="/pkg/go/doc/ "> < code > go/doc</ code > </ a > package,
297
+ the parser now keeps better track of stylized annotations such as < code > TODO(joe)</ code >
298
+ throughout the code,
299
+ information that the < a href ="/cmd/godoc/ "> < code > godoc</ code > </ a >
300
+ command can filter or present according to the value of the < code > -notes</ code > flag.
301
+ </ li >
302
+
303
+ < li > TODO:
304
+ < code > go/format</ code > : Node, Source
305
+ </ li >
306
+
307
+ < li >
308
+ The undocumented and only partially implemented "noescape" feature of the
309
+ < a href ="/pkg/html/template/ "> html/template</ a >
310
+ package has been removed; programs that depend on it will break.
311
+ </ li >
312
+
313
+ < li >
314
+ The < a href ="/pkg/io/ "> io</ a > package now exports the
315
+ < a href ="/pkg/io/#ByteWriter "> < code > io.ByteWriter</ code > </ a > interface to capture the common
316
+ functionality of writing a byte at a time.
317
+ </ li >
318
+
319
+ < li >
320
+ The < a href ="/pkg/log/syslog/ "> < code > log/syslog</ code > </ a > package now provides better support
321
+ for OS-specific logging features.
322
+ </ li >
323
+
324
+ < li >
325
+ The < a href ="/pkg/math/big/ "> < code > math/big</ code > </ a > package's
326
+ < a href ="/pkg/math/big/#Int "> < code > Int</ code > </ a > type now has
327
+ now has methods
328
+ < a href ="/pkg/math/big/#Int.MarshalJSON "> < code > MarshalJSON</ code > </ a >
329
+ and
330
+ < a href ="/pkg/math/big/#Int.UnmarshalJSON "> < code > UnmarshalJSON</ code > </ a >
331
+ to convert to and from a JSON representation.
332
+ Also,
333
+ < a href ="/pkg/math/big/#Int "> < code > Int</ code > </ a >
334
+ can now convert directly to and from a < code > uint64</ code > using
335
+ < a href ="/pkg/math/big/#Int.Uint64 "> < code > Uint64</ code > </ a >
336
+ and
337
+ < a href ="/pkg/math/big/#Int.SetUint64 "> < code > SetUint64</ code > </ a > ,
338
+ while
339
+ < a href ="/pkg/math/big/#Rat "> < code > Rat</ code > </ a >
340
+ can do the same with < code > float64</ code > using
341
+ < a href ="/pkg/math/big/#Rat.Float64 "> < code > Float64</ code > </ a >
342
+ and
343
+ < a href ="/pkg/math/big/#Rat.SetFloat64 "> < code > SetFloat64</ code > </ a > .
344
+ </ li >
345
+
346
+ < li > TODO:
347
+ < code > mime/multipart</ code > : Writer.SetBoundary
348
+ </ li >
349
+
350
+ < li >
351
+ The new < a href ="/pkg/net/http/cookiejar/ "> net/http/cookiejar</ a > package provides the basics for managing HTTP cookies.
352
+ </ li >
353
+
354
+ < li > TODO:
355
+ < code > net/http</ code > : ParseTime, CloseNotifier, Request.PostFormValue, ServeMux.Handler, Transport.CancelRequest
356
+ </ li >
357
+
358
+ < li > TODO:
359
+ < code > net/mail</ code > : ParseAddress, ParseAddressList
360
+ </ li >
361
+
362
+ < li > TODO:
363
+ < code > net/smtp</ code > : Client.Hello
364
+ </ li >
365
+
366
+ < li > TODO:
367
+ < code > net/textproto</ code > : TrimBytes, TrimString
368
+ </ li >
369
+
370
+ < li >
371
+ < code > net</ code > : DialOption, DialOpt, ListenUnixgram, LookupNS, IPConn.ReadMsgIP, IPConn.WriteMsgIP, UDPConn.ReadMsgUDP, UDPConn.WriteMsgUDP, UnixConn.CloseRead, UnixConn.CloseWrite
372
+ </ li >
373
+
374
+ < li >
375
+ The new method < a href ="/pkg/os/#FileMode.IsRegular "> < code > os.FileMode.IsRegular</ code > </ a > makes it easy to ask if a file is a plain file.
376
+ </ li >
377
+
378
+ < li > TODO:
379
+ < code > pkg/image</ code > : new subsamplings
380
+ </ li >
381
+
382
+ < li >
383
+ The < a href ="/pkg/regexp/ "> < code > regexp</ code > </ a > package
384
+ now supports Unix-original lefmost-longest matches through the
385
+ < a href ="/pkg/regexp/#Regexp.Longest "> < code > Regexp.Longest</ code > </ a >
386
+ method, while
387
+ < a href ="/pkg/regexp/#Regexp.Split "> < code > Regexp.Split</ code > </ a > slices
388
+ strings into pieces based on separators defined by the regular expression.
389
+ </ li >
390
+
391
+ < li > TODO:
392
+ < code > runtime/debug</ code > : FreeOSMemory, ReadGCStats, SetGCPercent
393
+ </ li >
394
+
395
+ < li >
396
+ The < a href ="/pkg/sort/ "> < code > sort</ code > </ a > package has a new function,
397
+ < a href ="/pkg/sort/#Reverse "> < code > Reverse</ code > </ a > .
398
+ Wrapping the argument of a call to
399
+ < a href ="/pkg/sort/#Sort "> < code > sort.Sort</ code > </ a >
400
+ with a call to < code > Reverse</ code > causes the sort order to be reversed.
401
+ </ li >
402
+
403
+ < li >
404
+ The < a href ="/pkg/strings/ "> < code > strings</ code > </ a > package has two new functions,
405
+ < a href ="/pkg/strings/#TrimPrefix "> < code > TrimPrefix</ code > </ a >
406
+ and
407
+ < a href ="/pkg/strings/#TrimSuffix "> < code > TrimSuffix</ code > </ a >
408
+ with self-evident properties, and the the new method
409
+ < a href ="/pkg/strings/#Reader.WriteTo "> < code > Reader.WriteTo</ code > </ a > so the
410
+ < a href ="/pkg/strings/#Reader "> < code > Reader</ code > </ a >
411
+ type now implements the
412
+ < a href ="/pkg/io/#WriterTo "> < code > io.WriterTo</ code > </ a > interface.
413
+ </ li >
414
+
415
+ < li >
416
+ The < a href ="/pkg/syscall/ "> < code > syscall</ code > </ a > package has received many updates to make it more inclusive of constants and system calls for each supported operating system.
417
+ </ li >
418
+
419
+ < li >
420
+ The < a href ="/pkg/testing/ "> < code > testing</ code > </ a > package now automates the generation of allocation
421
+ statistics in benchmarks using the new
422
+ < a href ="/pkg/testing/#AllocsPerRun "> < code > AllocsPerRun</ code > </ a > function and the
423
+ < a href ="/pkg/testing/#BenchmarkResult.AllocsPerOp "> < code > AllocsPerOp</ code > </ a > method of
424
+ < a href ="/pkg/testing/#BenchmarkResult "> < code > BenchmarkResult</ code > </ a > .
425
+ There is also a new
426
+ < a href ="/pkg/testing/#Verbose "> < code > Verbose</ code > </ a > function to test the state of the < code > -v</ code >
427
+ command-line flag,
428
+ and a new
429
+ < a href ="/pkg/testing/#B.Skip "> < code > Skip</ code > </ a > method of
430
+ < a href ="/pkg/testing/#B "> < code > testing.B</ code > </ a > and
431
+ < a href ="/pkg/testing/#T "> < code > testing.T</ code > </ a >
432
+ to simplify skipping an inappropriate test.
433
+ </ li >
434
+
435
+ < li >
436
+ In the < a href ="/pkg/text/template/ "> < code > text/template</ code > </ a >
437
+ and
438
+ < a href ="/pkg/html/template/ "> < code > html/template</ code > </ a > packages,
439
+ templates can now use parentheses to group the elements of pipelines, simplifying the construction of complex pipelines.
440
+ TODO: Link to example.
441
+ </ li >
442
+
443
+ < li >
444
+ In the < a href ="/pkg/unicode/utf8/ "> < code > unicode/utf8</ code > </ a > package,
445
+ the new function < a href ="/pkg/unicode/utf8/#ValidRune "> < code > ValidRune</ code > </ a > reports whether the rune is a valid Unicode code point.
446
+ To be valid, a rune must be in range and not be a surrogate half.
447
+ </ li >
448
+
449
+ < li >
450
+ The implementation of the < a href ="/pkg/unicode/ "> < code > unicode</ code > </ a > package has been updated to Unicode version 6.2.0.
451
+ </ li >
452
+ </ ul >
0 commit comments