From fd089e27d7260cee1c7ca449c41cdd0341ebc6cb Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 4 May 2011 15:46:02 +0200 Subject: Imported Upstream version 2011.04.27 --- doc/all.css | 5 +- doc/devel/index.html | 3 +- doc/devel/release.html | 3054 ++++++++++++++++++++++++++++-- doc/devel/roadmap.html | 10 +- doc/devel/weekly.html | 2944 ---------------------------- doc/install.html | 2 +- lib/codereview/codereview.py | 140 +- src/Make.cmd | 2 +- src/cmd/5a/lex.c | 53 +- src/cmd/6a/lex.c | 53 +- src/cmd/8a/lex.c | 53 +- src/cmd/cc/lex.c | 58 +- src/cmd/prof/gopprof | 9 +- src/pkg/compress/flate/deflate.go | 29 +- src/pkg/http/pprof/pprof.go | 14 +- src/pkg/http/transfer.go | 20 - src/pkg/image/image.go | 58 +- src/pkg/image/jpeg/writer.go | 32 +- src/pkg/image/jpeg/writer_test.go | 28 - src/pkg/image/png/reader.go | 22 +- src/pkg/image/png/writer.go | 29 +- src/pkg/image/png/writer_test.go | 40 +- src/pkg/mime/multipart/multipart.go | 197 +- src/pkg/mime/multipart/multipart_test.go | 125 +- src/pkg/reflect/all_test.go | 22 +- src/pkg/reflect/value.go | 9 +- src/pkg/runtime/linux/arm/sys.s | 15 +- src/pkg/sync/atomic/asm_linux_arm.s | 21 +- src/pkg/xml/read.go | 9 +- src/pkg/xml/xml_test.go | 81 +- 30 files changed, 3349 insertions(+), 3788 deletions(-) delete mode 100644 doc/devel/weekly.html diff --git a/doc/all.css b/doc/all.css index e496388ef..dd00d1adb 100644 --- a/doc/all.css +++ b/doc/all.css @@ -139,8 +139,9 @@ h1#title { padding: 0; } #content h2 { - border-top: 2px solid #ddd; - padding: 8px 5px; + border-top: 1px solid #ddd; + background: #E2E7F0; + padding: 5px; margin: 1.5em 0 0; } #content .subtitle { diff --git a/doc/devel/index.html b/doc/devel/index.html index ae405bf52..b9b526b94 100644 --- a/doc/devel/index.html +++ b/doc/devel/index.html @@ -2,8 +2,7 @@

@@ -87,6 +91,8 @@ Packages roadmap

diff --git a/doc/devel/weekly.html b/doc/devel/weekly.html deleted file mode 100644 index 5cb002f73..000000000 --- a/doc/devel/weekly.html +++ /dev/null @@ -1,2944 +0,0 @@ - - -

This page summarizes the changes between tagged weekly snapshots of Go. -For full details, see the Mercurial change log.

- -

Weekly snapshots occur often and may not be stable. -If stability of API and code is more important than having the -latest features, use the official releases instead.

- -

To update to a specific snapshot, use:

- -
-hg pull
-hg update weekly.YYYY-MM-DD
-
- -

2011-04-27 (base for r57)

- -
-This release includes revisions to the reflect package to make it more
-efficient, after the last weekly’s major API update. If your code uses reflect
-it may require further changes, not all of which can be made automatically by
-gofix. For the full details of the change, see
-	http://codereview.appspot.com/4435042
-Also, the Typeof and NewValue functions have been renamed to TypeOf and ValueOf.
-
-Other changes:
-* 5c: make alignment rules match 5g, just like 6c matches 6g.
-* 8g, 8l: fix "set but not used" gcc error (thanks Fazlul Shahriar).
-* all-qemu.bash: remove DISABLE_NET_TESTS.
-* build: remove DISABLE_NET_TESTS.
-* builder: build multiple targets in parallel.
-* cgo: avoid "incompatible pointer type" warning (thanks Albert Strasheim).
-* codereview: add 'hg undo' command, various other fixes.
-* compress/flate: dictionary support.
-* compress/zlib: add FDICT flag in Reader/Writer (thanks Ross Light).
-* container/heap: fix circular dependency in test.
-* crypto/openpgp: better handling of keyrings.
-* crypto/rsa: support > 3 primes.
-* crypto/tls: add server-side OCSP stapling support.
-* crypto/x509: memorize chain building.
-* crypto: move certificate verification into x509.
-* dashboard: build most recent revision first.
-* doc: mention make version in install.html.
-* expvar: add Func for functions that return values that are JSON marshalable.
-* fmt: decrease recursion depth in tests to permit them to run under gccgo,
-	tweak the doc for %U.
-* gc: allow complex types to be receiver types (thanks Robert Hencke),
-	correct handling of unexported method names in embedded interfaces,
-	explain why invalid receiver types are invalid,
-	fix copy([]int, string) error message (thanks Quan Yong Zhai),
-	fix 'invalid recursive type' error (thanks Lorenzo Stoakes),
-	many bug fixes.
-* go spec: attempt at clarifying language for "append",
-	for map types, mention indexing operations.
-* go/types: update for export data format change.
-* gob: fix handling of indirect receivers for GobDecoders,
-	fix trivial bug in map marshaling,
-	have errorf always prefix the message with "gob: ",
-	test case for indirection to large field,
-	use new Implements and AssignableTo methods in reflect,
-	when decoding a string, allocate a string, not a []byte.
-* gobuilder: permit builders of the form goos-goarch-foo,
-	respect MAKEFLAGS if provided (thanks Dave Cheney).
-* godoc: use "search" input type for search box (thanks Dmitry Chestnykh).
-* gofix: add support for reflect rename.
-* gofmt: add -d (diff) (thanks David Crawshaw),
-	don't crash when rewriting nil interfaces in AST,
-	exclude test case that doesn't compile w/o errors,
-	gofmt test harness bug fix.
-* goinstall: support GOPATH; building and installing outside the Go tree,
-	support building executable commands.
-* gopack: fix prefix bug,
-	preserve safe flag when not adding unsafe objects to archive.
-* gotest: add timing, respect $GOARCH,
-	generate gofmt-compliant code.
-* http/cgi: copy some PATH environment variables to child,
-	improve Location response handling,
-	pass some default environment variables.
-* http/fcgi: new package (thanks Evan Shaw).
-* http: add NewRequest helper,
-	add MultipartForm, ParseMultipartForm, and FormFile to Request,
-	be clear when failing to connect to a proxy,
-	bug fixes and new tests,
-	consume request bodies before replying,
-	don't quote Set-Cookie Domain and Path (thanks Petar Maymounkov),
-	fix IP confusion in TestServerTimeouts,
-	handler timeout support,
-	ServerConn, ClientConn: add real Close (thanks Petar Maymounkov),
-	make Client redirect policy configurable,
-	put a limit on POST size,
-	reverse proxy handler.
-* image/jpeg: add an encoder,
-	decode to a YCbCr image instead of an RGBA image.
-* ioutil: add Discard.
-* json: keep track of error offset in SyntaxError.
-* ld: defend against some broken object files,
-	do not emit empty dwarf pe sections (thanks Alex Brainman),
-	fix 6l -d on Mac, diagnose invalid use of -d,
-	fix Plan 9 symbol table (thanks Anthony Martin),
-	remove MachoLoad limit.
-* make: prevent rm provoking 'text file busy' errors (thanks Lorenzo Stoakes).
-* mime/multipart: add ReadForm for parsing multipart forms,
-	limit line length to prevent abuse.
-* mime: RFC 2231 continuation / non-ASCII support,
-	bunch more tests, few minor parsing fixes.
-* misc/goplay: fix Tab and Shift+Enter in Firefox (thanks Dmitry Chestnykh).
-* net: disable one more external network test,
-	fix EAI_BADFLAGS error on freebsd (thanks Mikio Hara),
-	fix ParseIP (thanks Quan Yong Zhai),
-	fix dialgoogle_test.go (thanks Quan Yong Zhai),
-	try /etc/hosts before loading DNS config (thanks Dmitry Chestnykh),
-	use C library resolver on FreeBSD, Linux, OS X / amd64, 386.
-* os/user: new package to look up users.
-* os: Open with O_APPEND|O_CREATE to append on Windows (thanks Alex Brainman),
-	fix race in ReadAt/WriteAt on Windows (thanks Alex Brainman),
-	turn EPIPE exit into panic.
-* rc/env.bash: fix to build on windows under msys (thanks Joe Poirier).
-* reflect: allow Slice of arrays,
-	fix Copy of arrays (thanks Gustavo Niemeyer),
-	require package qualifiers to match during interface check,
-	add Type.Implements, Type.AssignableTo, Value.CallSlice,
-	make Set match Go.
-* rpc: allow the first argument of a method to be a value rather than a pointer,
-	run benchmarks over HTTP as well as direct network connections.
-* run.bash: remove redundant rebuilds.
-* runtime/plan9: warning remediation for Plan 9 (thanks Lucio De Re),
-* runtime: many bug fixes,
-	fix GOMAXPROCS vs garbage collection bug (thanks Dmitriy Vyukov),
-	fix mkversion to output valid path separators (thanks Peter Mundy),
-	more graceful out-of-memory crash,
-	require package qualifiers to match during interface check,
-	skip functions with no lines when building src line table,
-	turn "too many EPIPE" into real SIGPIPE.
-* src/pkg: make package doc comments consistently start with "Package foo".
-* syscall: Madvise and Mprotect for Linux (thanks Albert Strasheim),
-	Mlock, Munlock, Mlockall, Munlockall on Linux (thanks Albert Strasheim),
-	add BPF support for darwin/386, darwin/amd64 (thanks Mikio Hara),
-	correct Windows CreateProcess input parameters (thanks Alex Brainman),
-	fix Ftruncate under linux/arm5 (thanks Dave Cheney),
-	permit StartProcess to hide the executed program on windows (thanks Vincent Vanackere).
-* test/bench: update timings; moving to new machine.
-* time: support Irix 6 location for zoneinfo files.
-* tutorial: modernize the definition and use of Open,
-	replace the forever loops with finite counts in sieve programs.
-* websocket: include *http.Request in websocket.Conn.
-* xml: Parser hook for non-UTF-8 charset converters.
-
- -

2011-04-13

- -
-weekly.2011-04-13
-
-This weekly snapshot includes major changes to the reflect package and the
-os.Open function.  Code that uses reflect or os.Open will require updating,
-which can be done mechanically using the gofix tool.
-
-The reflect package's Type and Value types have changed.  Type is now an
-interface that implements all the possible type methods.  Instead of a type
-switch on a reflect.Type t, switch on t.Kind().  Value is now a struct value
-that implements all the possible value methods.  Instead of a type switch on a
-reflect.Value v, switch on v.Kind().  See the change for the full details:
-        http://code.google.com/p/go/source/detail?r=843855f3c026
-
-The os package's Open function has been replaced by three functions:
-        OpenFile(name, flag, perm) // same as old Open
-        Open(name) // same as old Open(name, O_RDONLY, 0)
-        Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)
-
-To update your code to use the new APIs, run "gofix path/to/code".  Gofix can’t
-handle all situations perfectly, so read and test the changes it makes before
-committing them.
-
-Other changes:
-* archive/zip: add func OpenReader, type ReadCloser (thanks Dmitry Chestnykh).
-* asn1: Implement correct marshaling of length octets (thanks Luit van Drongelen).
-* big: don't crash when printing nil ints.
-* bufio: add ReadLine, to replace encoding/line.
-* build: make the build faster, quieter.
-* codereview: automatically port old diffs forward,
-        drop Author: line on self-clpatch,
-        recognize code URL without trailing slash.
-* crypto/block: remove deprecated package.
-* crypto/des: new package implementating DES and TDEA (thanks Yasuhiro Matsumoto).
-* crypto/ecdsa, crypto/rsa: use io.ReadFull to read from random source (thanks Dmitry Chestnykh).
-* crypto/rsa: add 3-prime support,
-        add support for precomputing CRT values,
-        flip the CRT code over so that it matches PKCS#1.
-* crypto/x509: expose complete DER data (thanks Mikkel Krautz).
-* doc: new "Functions" codewalk (thanks John DeNero).
-* doc/roadmap: add sections on tools, packages.
-* fmt: allow %U for unsigned integers.
-* gc: fixes and optimizations.
-* go/printer, gofmt: use blank to separate import rename from import path.
-* go/scanner: better TokenString output.
-* go/types: new Go type hierarchy implementation for AST.
-* godashboard: show packages at launchpad.net (thanks Gustavo Niemeyer).
-* gofix: add -diff, various fixes and helpers.
-* gotest: fix a bug in error handling,
-        fixes for [^.]_test file pattern (thanks Peter Mundy),
-        handle \r\n returned by gomake on Windows (thanks Alex Brainman).
-* gotype: use go/types GcImporter.
-* govet: make name-matching for printf etc. case-insensitive.
-* http: allow override of Content-Type for ServeFile,
-        client gzip support,
-        do not listen on 0.0.0.0 during test,
-        flesh out server Expect handling + tests.
-* image/ycbcr: new package.
-* image: allow "?" wildcards when registering image formats.
-* io: fixes for Read with n > 0, os.EOF (thanks Robert Hencke).
-* ld: correct Plan 9 compiler warnings (thanks Lucio De Re),
-        ELF header function declarations (thanks Lucio De Re),
-        fix Mach-O X86_64_RELOC_SIGNED relocations (thanks Mikkel Krautz),
-        fix Mach-O bss bug (thanks Mikkel Krautz),
-        fix dwarf decoding of strings for struct's fieldnames (thanks Luuk van Dijk),
-        fixes and optimizations (25% faster).
-* log: generalize getting and setting flags and prefix.
-* misc/cgo/life: enable build and test on Windows (thanks Alex Brainman).
-* misc/vim: add plugin with Fmt command (thanks Dmitry Chestnykh),
-        update type highlighting for new reflect package.
-* net: disable multicast tests by default (thanks Dave Cheney),
-        sort records returned by LookupMX (thanks Corey Thomasson).
-* openpgp: Fix improper := shadowing (thanks Gustavo Niemeyer).
-* os: rename Open to OpenFile, add new Open, Create,
-        fix Readdir in Plan 9 (thanks Fazlul Shahriar).
-* os/inotify: use _test for test files, not _obj.
-* pkg/path: enable tests on Windows (thanks Alex Brainman).
-* reflect: new Type and Value API.
-* src/pkg/Makefile: trim per-directory make output except on failure.
-* syscall: Add DT_* and MADV_* constants on Linux (thanks Albert Strasheim),
-        add Mmap, Munmap on Linux, FreeBSD, OS X,
-        fix StartProcess in Plan 9 (thanks Fazlul Shahriar),
-        fix Windows Signaled (thanks Alex Brainman).
-* test/bench: enable build and test on Windows (thanks Alex Brainman).
-
- -

2011-04-04

- -
-This release includes changes to the net package. Your code will require
-changes if it uses the Dial or LookupHost functions.
-
-The laddr argument has been removed from net.Dial, and the cname return value
-has been removed from net.LookupHost. The new net.LookupCNAME function can be
-used  to find the canonical host for a given name.  You can update your
-networking code with gofix.
-
-The gotest shell script has been replaced by a Go program, making testing
-significantly faster.
-
-Other changes:
-* asn1: extensions needed for parsing Kerberos.
-* bufio: Write and WriteString cleanup (thanks Evan Shaw).
-* bytes, strings: simplify Join (thanks Evan Shaw).
-* crypto/cipher: bad CTR IV length now triggers panic.
-* crypto/tls: extend NPN support to the client,
-	added X509KeyPair function to parse a Certificate from memory.
-* crypto/x509: parse Extended Key Usage extension (thanks Mikkel Krautz).
-* debug/gosym: remove need for gotest to run preparatory commands.
-* fmt: implement precision (length of input) values for %q: %.20q.
-* go/parser: fix scoping for local type declarations (thanks Roger Peppe),
-	package name must not be the blank identifier.
-* go/printer, gofmt: remove special case for multi-line raw strings.
-* gopack: add P flag to remove prefix from filename information.
-* gotest: add -test.timeout option,
-	replace the shell script with the compiled program written in go,
-	execute gomake properly on Windows (thanks Alex Brainman).
-* gotry: move into its own directory, separate from gotest.
-* gotype: support for more tests, added one new test.
-* http: add Transport.MaxIdleConnsPerHost,
-	use upper case hex in URL escaping (thanks Matt Jones).
-* httptest: add NewTLSServer.
-* misc/kate: reorganize, remove closed() (thanks Evan Shaw).
-* misc/notepadplus: support for notepad++ (thanks Anthony Starks).
-* net: implement non-blocking connect (thanks Alexey Borzenkov).
-* os: fix MkdirAll("/thisdoesnotexist") (thanks Albert Strasheim),
-	Plan 9 support (thanks Yuval Pavel Zholkover),
-	add a few missing Plan 9 errors (thanks Andrey Mirtchovski),
-	fix FileInfo.Name returned by Stat (thanks David Forsythe).
-* path/filepath.Glob: add an error return,
-	don't drop known matches on error.
-* path/filepath: add support for Plan 9 (thanks Andrey Mirtchovski).
-* scanner: treat line comments like in Go.
-* syscall: Plan 9 support (thanks Yuval Pavel Zholkover),
-	StartProcess Chroot and Credential (thanks Albert Strasheim),
-	add BPF support for freebsd/386, freebsd/amd64 (thanks Mikio Hara),
-	make [Raw]Syscall6 pass 6th arg on linux/386 (thanks Evan Shaw).
-
- -

2011-03-28

- -
-This weekly release includes improved support for testing.
-
-Memory and CPU profiling is now available via the gotest tool. Gotest will
-produce memory and CPU profiling data when invoked with the -test.memprofile
-and -test.cpuprofile flags. Run "godoc gotest" for details.
-
-We have also introduced a way for tests to run quickly when an exhaustive test
-is unnecessary. Gotest’s new -test.short flag in combination with the testing
-package’s new Short function allows you to write tests that can be run in
-normal or "short" mode; short mode is now used by all.bash to reduce
-installation time.
-The Makefiles know about the flag - you can just run "make testshort".
-
-Other changes:
-* .hgignore: Ignore all goinstalled packages (thanks Evan Shaw).
-* build: add all-qemu.bash, handful of arm fixes,
-        add support for SWIG, and add two SWIG examples,
-        diagnose Ubuntu's buggy copy of gold,
-        handle broken awk in version.bash (thanks Dave Cheney),
-        reenable clean.bash without gomake (thanks Gustavo Niemeyer).
-* cgo: fix index-out-of-bounds bug.
-* codereview: permit CLs of the form weekly.DATE
-* crypto/ecdsa: truncate hash values.
-* crypto/openpgp: add DSA signature support.
-* dashboard: remove old python/bash builder, update README.
-* doc: explain release and weekly tags in install.html.
-* exec: document dir option for Run (thanks Gustavo Niemeyer).
-* flag: document Nflag function (thanks Fazlul Shahriar).
-* gc: remove interim ... error which rejects valid code.
-* go/ast: implemented NewPackage,
-        merge CaseClause and TypeCaseClause.
-* go/parser: fix memory leak by making a copy of token literals,
-        resolve identifiers properly.
-* go/printer, gofmt: avoid exponential layout algorithm,
-        gofmt: simplify struct formatting and respect line breaks.
-* go/scanner: to interpret line comments with Windows filenames (thanks Alex Brainman).
-* go/token: use array instead of map for token->string table.
-* gob: optimizations to reduce allocations,
-        use pointers in bootstrapType so interfaces behave properly.
-* gobuilder: recognize CLs of the form weekly.DATE.
-* godefs: handle volatile.
-* godoc: add -template flag to specify custom templates,
-        fix path problem for windows (thanks Yasuhiro Matsumoto).
-* gofix: httpserver - rewrite rw.SetHeader to rw.Header.Set.
-* gofmt: add profiling flag.
-* gopprof: fix bug: do not rotate 180 degrees for large scrolls,
-        update list of memory allocation functions.
-* gotest: fix gofmt issue in generated _testmain.go.
-* http: add NewProxyClientConn,
-        avoid crash when asked for multiple file ranges,
-        don't chunk 304 responses,
-        export Transport, add keep-alive support.
-* ld: return > 0 exit code on unsafe import.
-* misc/bbedit: remove closed keyword (thanks Anthony Starks).
-* misc/emacs: gofmt: don't clobber the current buffer on failure.
-* misc/vim: remove 'closed' as a builtin function.
-* net: add FileConn, FilePacketConn, FileListener (thanks Albert Strasheim),
-        don't force epoll/kqueue to wake up in order to add new events,
-        let OS-specific AddFD routine wake up polling thread,
-        use preallocated buffer for epoll and kqueue/kevent.
-* path/filepath: add EvalSymlinks function,
-        fix TestEvalSymlinks when run under symlinked GOROOT.
-* path: work for windows (thanks Yasuhiro Matsumoto).
-* rpc: increase server_test timeout (thanks Gustavo Niemeyer),
-        optimizations to reduce allocations.
-* runtime: fix darwin/amd64 thread VM footprint (thanks Alexey Borzenkov),
-        fix gdb support for goroutines,
-        more stack split fixes,
-        os-specific types and code for setitimer,
-        update defs.h for freebsd-386 (thanks Devon H. O'Dell).
-* strings: Map: avoid allocation when string is unchanged.
-* syscall: GetsockoptInt (thanks Albert Strasheim),
-        StartProcess fixes for windows (thanks Alex Brainman),
-        permit non-blocking syscalls,
-        rename from .sh to .pl, because these files are in Perl.
-* test: enable tests using v, ok := <-ch syntax (thanks Robert Hencke).
-* time: give a helpful message when we can't set the time zone for testing.
-        isolate syscall reference in sys.go.
-
- -

2011-03-15

- -
-This week's release introduces a new release tagging scheme. We intend to
-continue with our weekly releases, but have renamed the existing tags from
-"release" to "weekly". The "release" tag will now be applied to one hand-picked
-stable release each month or two.
-
-The revision formerly tagged "release.2011-03-07.1" (now "weekly.2011-03-07.1")
-has been nominated our first stable release, and has been given the tag
-"release.r56". As we tag each stable release we will post an announcement to
-the new golang-announce mailing list:
-  http://groups.google.com/group/golang-announce
-
-You can continue to keep your Go installation updated using "hg update
-release", but now you should only need to update once we tag a new stable
-release, which we will announce here. If you wish to stay at the leading edge,
-you should switch to the weekly tag with "hg update weekly".
-
-
-This weekly release includes significant changes to the language spec and the
-http, os, and syscall packages. Your code may need to be changed. It also
-introduces the new gofix tool.
-
-The closed function has been removed from the language. The syntax for channel
-receives has been changed to return an optional second value, a boolean value
-indicating whether the channel is closed. This code:
-	v := <-ch
-	if closed(ch) {
-		// channel is closed
-	}
-should now be written as:
-	v, ok := <-ch
-	if !ok {
-		// channel is closed
-	}
-
-It is now illegal to declare unused labels, just as it is illegal to declare
-unused local variables.
-
-The new gofix tool finds Go programs that use old APIs and rewrites them to use
-newer ones.  After you update to a new Go release, gofix helps make the
-necessary changes to your programs. Gofix will handle the http, os, and syscall
-package changes described below, and we will update the program to keep up with
-future changes to the libraries.
-
-The Hijack and Flush methods have been removed from the http.ResponseWriter
-interface and are accessible via the new http.Hijacker and http.Flusher
-interfaces. The RemoteAddr and UsingTLS methods have been moved from
-http.ResponseWriter to http.Request.
-
-The http.ResponseWriter interface's SetHeader method has been replaced by a
-Header() method that returns the response's http.Header. Caller code needs to
-change. This code:
-	rw.SetHeader("Content-Type", "text/plain")
-should now be written as:
-	rw.Header().Set("Content-Type", "text/plain")
-The os and syscall packages' StartProcess functions now take their final three
-arguments as an *os.ProcAttr and *syscall.ProcAttr values, respectively. This
-code:
-	os.StartProcess(bin, args, env, dir, fds)
-should now be written as:
-	os.StartProcess(bin, args, &os.ProcAttr{Files: fds, Dir: dir, Env: env})
-
-The gob package will now encode and decode values of types that implement the
-gob.GobEncoder and gob.GobDecoder interfaces. This allows types with unexported
-fields to transmit self-consistent descriptions; one instance is big.Int and
-big.Rat.
-
-Other changes:
-* 5l, 6l, 8l: reduce binary size about 40% by omitting symbols for type, string, go.string.
-* 5l, 8l: output missing section symbols (thanks Anthony Martin).
-* 6l, 8l: fix gdb crash.
-* Make.cmd: also clean _test* (thanks Gustavo Niemeyer).
-* big: implemented custom Gob(En/De)coder for Int type.
-* build: remove duplicate dependency in Make.cmd (thanks Robert Hencke),
-        run gotest in misc/cgo/test.
-* codereview.py: don't suggest change -d if user is not CL author (thanks Robert Hencke).
-* compress/lzw: benchmark a range of input sizes.
-* crypto/ecdsa: add package.
-* crypto/elliptic: add the N value of each curve.
-* crypto/openpgp: bug fixes and fix misnamed function.
-* crypto/tls: fix compile error (thanks Dave Cheney).
-* doc: Effective Go: some small cleanups,
-        update FAQ. hello, world is now 1.1MB, down from 1.8MB,
-        update codelab wiki to fix template.Execute argument order.
-* flag: visit the flags in sorted order, for nicer messages.
-* fmt: do not export EOF = -1.
-* fmt: make ScanState.Token more general (thanks Roger Peppe).
-* gc: diagnose unused labels,
-        fix handling of return values named _,
-        include all dependencies in export metadata,
-        make unsafe.Pointer its own kind of type, instead of an equivalent to *any.
-* go/ast, go/parser: populate identifier scopes at parse time.
-* go/ast: add FileSet parameter to ast.Print and ast.Fprint.
-* go/parser: first constant in a constant declaration must have a value.
-* gob: efficiency and reliability fixes.
-* gofmt: remove -trace and -ast flags.
-* goinstall: handle $(GOOS) and $(GOARCH) in filenames,
-        handle .c files with gc when cgo isn't used, and
-        handle .s files with gc (thanks Gustavo Niemeyer).
-* gopack: omit time stamps, makes output deterministic.
-* gotype: commandline tool to typecheck go programs.
-* govet: handle '*' in print format strings.
-* hash: new FNV-1a implementation (thanks Pascal S. de Kloe).
-* http/cgi: child support (e.g. Go CGI under Apache).
-* http: adapt Cookie code to follow IETF draft (thanks Petar Maymounkov),
-        add test for fixed HTTP/1.0 keep-alive issue,
-        don't hit external network in client_test.go,
-        fix transport crash when request URL is nil,
-        rename interface Transport to RoundTripper,
-        run tests even with DISABLE_NET_TESTS=1.
-* httptest: default the Recorder status code to 200 on a Write.
-* io/ioutil: clean-up of ReadAll and ReadFile.
-* ioutil: add NopCloser.
-* ld: preserve symbol sizes during data layout.
-* lib9, libmach: Change GOOS references to GOHOSTOS (thanks Evan Shaw).
-* libmach: correct string comparison to revive 6cov on darwin (thanks Dave Cheney).
-* misc/vim: Add indent script for Vim (thanks Ross Light).
-* net, os, syslog: fixes for Solaris support.
-* net: don't loop to drain wakeup pipe.
-* nm: document -S flag.
-* openpgp: add PublicKey KeyId string accessors.
-* rpc: optimizations, add benchmarks and memory profiling,
-        use httptest.Server for tests (thanks Robert Hencke).
-* runtime: reduce lock contention via wakeup on scheduler unlock,
-        scheduler, cgo reorganization,
-        split non-debugging malloc interface out of debug.go into mem.go.
-* spec: clarify return statement rules.
-* strings: add IndexRune tests, ASCII fast path,
-        better benchmark names; add BenchmarkIndex.
-* syscall: implement Mount and Unmount for linux,
-        implement Reboot for linux.
-* time: fix Time.ZoneOffset documentation (thanks Peter Mundy).
-* tls: move PeerCertificates to ConnectionState.
-
- -

2011-03-07 (base for r56)

- -
-This release includes changes to the reflect and path packages.
-Code that uses reflect or path may need to be updated.
-
-The reflect package's Value.Addr method has been renamed to Value.UnsafeAddr.
-Code that uses the Addr method will have to call UnsafeAddr instead.
-
-The path package has been split into two packages: path and path/filepath.
-Package path manipulates slash-separated paths, regardless of operating system.
-Package filepath implements the local operating system's native file paths.
-OS-specific functioanlity in pacakge path, such as Walk, moved to filepath.
-
-Other changes:
-* build: fixes and simplifications (thanks Dave Cheney),
-        move $GOBIN ahead of /bin, /usr/bin in build $PATH.
-* bzip2: speed up decompression.
-* cgo: fix dwarf type parsing (thanks Gustavo Niemeyer),
-        put temporary source files in _obj (thanks Roger Peppe),
-        fix bug involving 0-argument callbacks.
-* compress/lzw: optimizations.
-* doc: add FAQ about "implements",
-        add FAQ about large binaries ,
-        add FAQ about stack vs heap allocation,
-        add internationalization to roadmap,
-        describe platform-specific conventions in code.html.
-* fmt: allow recursive calls to Fscan etc (thanks Roger Peppe),
-        make %#p suppress leading 0x.
-* gc, gopack: add some missing flags to the docs.
-* gc: fix init of packages named main (thanks Gustavo Niemeyer),
-* gob: make recursive map and slice types work, and other fixes.
-        tentative support for GobEncoder/GobDecoder interfaces.
-* gobuilder: add -package flag to build external packages and -v for verbose.
-* gofmt: exclude test file that is not legal Go.
-* goinstall: protect against malicious filenames (thanks Roger Peppe).
-* goyacc: provide -p flag to set prefix for names, documentation update.
-* http: add cookie support (thanks Petar Maymounkov),
-        allow handlers to send non-chunked responses,
-        export ParseHTTPVersion,
-        expose Client's Transport,
-        use WriteProxy,
-        rename ClientTransport to Transport.
-* http/cgi: new package.
-* http/httptest: new package.
-* image: add a decoding test for common file formats.
-* io/ioutil: add TempDir.
-* mime/multipart: Header changed from map to MIMEHeader
-* path/filepath: new OS-specific path support (thanks Gustavo Niemeyer).
-* reflect: add PtrTo, add Value.Addr (old Addr is now UnsafeAddr).
-* runtime: use kernel-supplied compare-and-swap on linux/arm.
-* spec: minor clarification of scope rule for functions.
-* sync/atomic: new package to expose atomic operations.
-* syscall: regenerate zerrors_freebsd_amd64.go (thanks Mikio Hara),
-        work around FreeBSD execve kernel bug (thanks Devon H. O'Dell).
-* template: document the delimiters.
-* testing: run GC before each benchmark run (thanks Roger Peppe).
-* unsafe: fix the documentation.
-* websocket: use httptest.Server for tests (thanks Robert Hencke).
-* xml: permit nested directives (thanks Chris Dollin).
-
- -

2011-02-24

- -
-This release includes changes to the http package and a small language change.
-Your code will require changes if it manipulates http Headers or omits the
-condition in if statements.
-
-The new http.Header type replaces map[string]string in the Header and Trailer
-fields of http.Request and http.Response.
-A Header value can be manipulated via its Get, Set, Add, and Del methods.
-See http://golang.org/pkg/http/#Header
-
-The condition is now mandatory in if statements.
-Previously it would default to true, as in switch and for statements.
-This code is now illegal:
-	if x := foo(); {
-		// code that is always executed
-	}
-The same effect can be achieved like this:
-	if x := foo(); true {
-		// code
-	}
-Or, in a simpler form:
-	{
-		x := foo()
-		// code
-	}
-
-Other changes:
-* 6l: new -Hwindowsgui flag allows to build windows gui pe (thanks Alex Brainman),
-	pe fixes (thanks Wei Guangjing).
-* 8l, 6l: allow for more os threads to be created on Windows (thanks Alex Brainman),
-* build: reduce the use of subshells in recursive make, and
-	remove unused NaCl conditional from make.bash (thanks Dave Cheney).
-* codereview: fix clpatch with empty diffs (thanks Gustavo Niemeyer).
-* compress/bzip2: add package.
-* compress/lzw: implement a decoder.
-* crypto/openpgp: add package.
-* crypto/rand: add read buffer to speed up small requests (thanks Albert Strasheim).
-* crypto/rsa: left-pad OAEP results when needed.
-* crypto/tls: make protocol negotiation failure fatal.
-* fmt: stop giving characters to the Scan method of Scanner when we hit a newline in Scanln.
-* gc: interface error message fixes,
-	make string const comparison unsigned (thanks Jeff R. Allen).
-* go spec: minor clarification on channel types.
-* go/ast, parser: condition in if statement is mandatory.
-* gob: compute information about a user's type once.
-	protect against pure recursive types.
-* godoc: accept symbolic links as path names provided to -path,
-	add robots.txt, log errors when reading filter files.
-* html: tokenize HTML comments.
-* http: add proxy support (thanks Yasuhiro Matsumoto),
-	implement with net/textproto (thanks Petar Maymounkov),
-	send full URL in proxy requests,
-	introduce start of Client and ClientTransport.
-* image/png: support for more formats (thanks Mikael Tillenius).
-* json: only use alphanumeric tags,
-	use base64 to encode []byte (thanks Roger Peppe).
-* ld: detect stack overflow due to NOSPLIT, drop rpath, support weak symbols.
-* misc/dashboard/builder: talk to hg with utf-8 encoding.
-* misc/dashboard: notify golang-dev on build failure.
-* net: *netFD.Read to return os.EOF on eof under windows (thanks Alex Brainman),
-	add IPv4 multicast to UDPConn (thanks Dave Cheney),
-	more accurate IPv4-in-IPv6 API test (thanks Mikio Hara),
-	reject invalid net:proto network names (thanks Olivier Antoine).
-* netchan: allow use of arbitrary connections (thanks Roger Peppe).
-* os: add ENODATA and ENOTCONN (thanks Albert Strasheim).
-* reflect: add a couple of sentences explaining how Methods operate,
-	add a secret method to ArrayOrSliceType to ensure it's only implemented by arrays and slices,
-	add pointer word to CommonType (placeholder for future work).
-* runtime-gdb.py: gdb pretty printer for go strings properly handles length.
-* runtime: various bug fixes, more complete stack traces,
-	record $GOROOT_FINAL for runtime.GOROOT.
-* spec: delete incorrect mention of selector working on pointer to interface type.
-* sync: add Cond (thanks Gustavo Niemeyer).
-* syscall: add MCL_* flags for mlockall (thanks Albert Strasheim),
-	implement chmod() for win32 (thanks Yasuhiro Matsumoto).
-* test/bench: update timings for new GC.
-* testing: rename cmdline flags to avoid conflicts (thanks Gustavo Niemeyer).
-* textproto: introduce Header type (thanks Petar Maymounkov).
-* websocket: use new interface to access Header.
-
- -

2011-02-15

- -
-This release includes changes to the io, os, and template packages.
-You may need to update your code.
-
-The io.ReadByter and io.ReadRuner interface types have been renamed to
-io.ByteReader and io.RuneReader respectively.
-
-The os package's ForkExec function has been superseded by the new StartProcess
-function and an API built around the Process type:
-	http://golang.org/pkg/os/#Process
-
-The order of arguments to template.Execute has been reversed to be consistent
-the notion of "destination first", as with io.Copy, fmt.Fprint, and others.
-
-Gotest now works for package main in directories using Make.cmd-based makefiles.
-
-The memory allocation runtime problems from the last release are not completely
-fixed.  The virtual memory exhaustion problems encountered by people using
-ulimit -v have been fixed, but there remain known garbage collector problems
-when using GOMAXPROCS > 1.
-
-Other changes:
-* 5l: stopped generating 64-bit eor.
-* 8l: more work on plan9 support (thanks Yuval Pavel Zholkover).
-* archive/zip: handle files with data descriptors.
-* arm: working peep-hole optimizer.
-* asn1: marshal true as 255, not 1.
-* buffer.go: minor optimization, expanded comment.
-* build: drop syslog on DISABLE_NET_TESTS=1 (thanks Gustavo Niemeyer),
-       allow clean.bash to work on fresh checkout,
-       change "all tests pass" message to be more obvious,
-       fix spaces in GOROOT (thanks Christopher Nielsen).
-* bytes: fix bug in buffer.ReadBytes (thanks Evan Shaw).
-* 5g: better int64 code,
-       don't use MVN instruction.
-* cgo: don't run cgo when not compiling (thanks Gustavo Niemeyer),
-       fix _cgo_run timestamp file order (thanks Gustavo Niemeyer),
-       fix handling of signed enumerations (thanks Gustavo Niemeyer),
-       os/arch dependent #cgo directives (thanks Gustavo Niemeyer),
-       rename internal f to avoid conflict with possible C global named f.
-* codereview: fix hgpatch on windows (thanks Yasuhiro Matsumoto),
-       record repository, base revision,
-       use cmd.communicate (thanks Yasuhiro Matsumoto).
-* container/ring: replace Iter() with Do().
-* crypto/cipher: add resync open to OCFB mode.
-* crypto/openpgp/armor: bug fixes.
-* crypto/openpgp/packet: new subpackage.
-* crypto/tls: load a chain of certificates from a file,
-       select best cipher suite, not worst.
-* crypto/x509: add support for name constraints.
-* debug/pe: ImportedSymbols fixes (thanks Wei Guangjing).
-* doc/code: update to reflect that package names need not be unique.
-* doc/codelab/wiki: a bunch of fixes (thanks Andrey Mirtchovski).
-* doc/install: update for new versions of Mercurial.
-* encoding/line: fix line returned after EOF.
-* flag: allow hexadecimal (0xFF) and octal (0377) input for integer flags.
-* fmt.Scan: scan binary-exponent floating format, 2.4p-3,
-       hexadecimal (0xFF) and octal (0377) integers.
-* fmt: document %%; also %b for floating point.
-* gc, ld: detect stale or incompatible object files,
-       package name main no longer reserved.
-* gc: correct receiver in method missing error (thanks Lorenzo Stoakes),
-       correct rounding of denormal constants (thanks Eoghan Sherry),
-       select receive bug fix.
-* go/printer, gofmt: smarter handling of multi-line raw strings.
-* go/printer: line comments must always end in a newline,
-       remove notion of "Styler", remove HTML mode.
-* gob: allow Decode(nil) and have it just discard the next value.
-* godoc: use IsAbs to test for absolute paths (fix for win32) (thanks Yasuhiro Matsumoto),
-       don't hide package lookup error if there's no command with the same name.
-* gotest: enable unit tests for main programs.
-* http: add Server type supporting timeouts,
-       add pipelining to ClientConn, ServerConn (thanks Petar Maymounkov),
-       handle unchunked, un-lengthed HTTP/1.1 responses.
-* io: add RuneReader.
-* json: correct Marshal documentation.
-* netchan: graceful handling of closed connection (thanks Graham Miller).
-* os: implement new Process API (thanks Alex Brainman).
-* regexp tests: make some benchmarks more meaningful.
-* regexp: add support for matching against text read from RuneReader interface.
-* rpc: make more tolerant of errors, properly discard values (thanks Roger Peppe).
-* runtime: detect failed thread creation on Windows,
-       faster allocator, garbage collector,
-       fix virtual memory exhaustion,
-       implemented windows console ctrl handler (SIGINT) (thanks Hector Chu),
-       more detailed panic traces, line number work,
-       improved Windows callback handling (thanks Hector Chu).
-* spec: adjust notion of Assignability,
-       allow import of packages named main,
-       clarification re: method sets of newly declared pointer types,
-       fix a few typos (thanks Anthony Martin),
-       fix Typeof() return type (thanks Gustavo Niemeyer),
-       move to Unicode 6.0.
-* sync: diagnose Unlock of unlocked Mutex,
-       new Waitgroup type (thanks Gustavo Niemeyer).
-* syscall: add SetsockoptIpMreq (thanks Dave Cheney),
-       add sockaddr_dl, sysctl with routing message support for darwin, freebsd (thanks Mikio Hara),
-       do not use NULL for zero-length read, write,
-       implement windows version of Fsync (thanks Alex Brainman),
-       make ForkExec acquire the ForkLock under windows (thanks Hector Chu),
-       make windows API return errno instead of bool (thanks Alex Brainman),
-       remove obsolete socket IO control (thanks Mikio Hara).
-* template: add simple formatter chaining (thanks Kyle Consalus),
-       allow a leading '*' to indirect through a pointer.
-* testing: include elapsed time in test output
-* windows: replace remaining __MINGW32__ instances with _WIN32 (thanks Joe Poirier).
-
- -

2011-02-01

- -
-This release includes significant changes to channel operations and minor
-changes to the log package. Your code will require modification if it uses
-channels in non-blocking communications or the log package's Exit functions.
-
-Non-blocking channel operations have been removed from the language.
-The equivalent operations have always been possible using a select statement
-with a default clause.  If a default clause is present in a select, that clause
-will execute (only) if no other is ready, which allows one to avoid blocking on
-a communication.
-
-For example, the old non-blocking send operation,
-
-	if ch <- v {
-		// sent
-	} else {
-		// not sent
-	}
-
-should be rewritten as,
-
-	select {
-	case ch <- v:
-		// sent
-	default:
-		// not sent
-	}
-
-Similarly, this receive,
-
-	v, ok := <-ch
-	if ok {
-		// received
-	} else {
-		// not received
-	}
-
-should be rewritten as,
-
-	select {
-	case v := <-ch:
-		// received
-	default:
-		// not received
-	}
-
-This change is a prelude to redefining the 'comma-ok' syntax for a receive.
-In a later release, a receive expression will return the received value and an
-optional boolean indicating whether the channel has been closed. These changes
-are being made in two stages to prevent this semantic change from silently
-breaking code that uses 'comma-ok' with receives.
-There are no plans to have a boolean expression form for sends.
-
-Sends to a closed channel will panic immediately. Previously, an unspecified
-number of sends would fail silently before causing a panic.
-
-The log package's Exit, Exitf, and Exitln functions have been renamed Fatal,
-Fatalf, and Fatalln respectively. This brings them in line with the naming of
-the testing package. 
-
-The port to the "tiny" operating system has been removed. It is unmaintained
-and untested. It was a toy to show that Go can run on raw hardware and it
-served its purpose. The source code will of course remain in the repository
-history, so it could be brought back if needed later.
-
-This release also changes some of the internal structure of the memory
-allocator in preparation for other garbage collector changes. 
-If you run into problems, please let us know.
-There is one known issue that we are aware of but have not debugged yet:
-	http://code.google.com/p/go/issues/detail?id=1464&.
-
-Other changes in this release:
-* 5l: document -F, force it on old ARMs (software floating point emulation)
-* 6g: fix registerization of temporaries (thanks Eoghan Sherry),
-        fix uint64(uintptr(unsafe.Pointer(&x))).
-* 6l: Relocate CMOV* instructions (thanks Gustavo Niemeyer),
-        windows/amd64 port (thanks Wei Guangjing).
-* 8l: add PE dynexport, emit DWARF in Windows PE, and
-        code generation fixes (thanks Wei Guangjing).
-* bufio: make Flush a no-op when the buffer is empty.
-* bytes: Add Buffer.ReadBytes, Buffer.ReadString (thanks Evan Shaw).
-* cc: mode to generate go-code for types and variables.
-* cgo: define CGO_CFLAGS and CGO_LDFLAGS in Go files (thanks Gustavo Niemeyer),
-        windows/386 port (thanks Wei Guangjing).
-* codereview: fix windows (thanks Hector Chu),
-        handle file patterns better,
-        more ASCII vs. Unicode nonsense.
-* crypto/dsa: add support for DSA.
-* crypto/openpgp: add s2k.
-* crypto/rand: use defer to unlock mutex (thanks Anschel Schaffer-Cohen).
-* crypto/rsa: correct docstring for SignPKCS1v15.
-* crypto: add package, a common place to store identifiers for hash functions.
-* doc/codelab/wiki: update to work with template changes, add to run.bash.
-* doc/spec: clarify address operators.
-* ebnflint: exit with non-zero status on error.
-* encoding/base32: new package (thanks Miek Gieben).
-* encoding/line: make it an io.Reader too.
-* exec: use custom error for LookPath (thanks Gustavo Niemeyer).
-* fmt/doc: define width and precision for strings.
-* gc: clearer error for struct == struct,
-        fix send precedence,
-        handle invalid name in type switch,
-        special case code for single-op blocking and non-blocking selects.
-* go/scanner: fix build (adjust scanner EOF linecount).
-* gob: better debugging, commentary,
-        make nested interfaces work,
-        report an error when encoding a non-empty struct with no public fields.
-* godoc: full text index for whitelisted non-Go files,
-        show line numbers for non-go files (bug fix).
-* gofmt -r: match(...) arguments may be nil; add missing guards.
-* govet: add Panic to the list of functions.
-* http: add host patterns (thanks Jose Luis Vázquez González),
-        follow relative redirect in Get.
-* json: handle capital floating point exponent (1E100) (thanks Pieter Droogendijk).
-* ld: add -I option to set ELF interpreter,
-        more robust decoding of reflection type info in generating dwarf.
-* lib9: update to Unicode 6.0.0.
-* make.bash: stricter selinux test (don't complain unless it is enabled).
-* misc/vim: Import/Drop commands (thanks Gustavo Niemeyer),
-        set 'syntax sync' to a large value (thanks Yasuhiro Matsumoto).
-* net: fix race condition in test,
-        return cname in LookupHost.
-* netchan: avoid race condition in test,
-        fixed documentation for import (thanks Anschel Schaffer-Cohen).
-* os: add ETIMEDOUT (thanks Albert Strasheim).
-* runtime: generate Go defs for C types,
-        implementation of callback functions for windows (thanks Alex Brainman),
-        make Walk web browser example work (thanks Hector Chu),
-        make select fairer,
-        prefer fixed stack allocator over general memory allocator,
-        simpler heap map, memory allocation.
-* scanner: fix Position returned by Scan, Pos,
-        don't read ahead in Init.
-* suffixarray: use binary search for both ends of Lookup (thanks Eric Eisner).
-* syscall: add missing network interface constants (thanks Mikio Hara).
-* template: treat map keys as zero, not non-existent (thanks Roger Peppe).
-* time: allow cancelling of After events (thanks Roger Peppe),
-        support Solaris zoneinfo directory.
-* token/position: added SetLinesForContent.
-* unicode: update to unicode 6.0.0.
-* unsafe: add missing case to doc for Pointer.
-
- -

2011-01-20

- -
-This release removes the float and complex types from the language.
-
-The default type for a floating point literal is now float64, and
-the default type for a complex literal is now complex128.
-
-Existing code that uses float or complex must be rewritten to
-use explicitly sized types.
-
-The two-argument constructor cmplx is now spelled complex.
-
- -

2011-01-19

- -
-The 5g (ARM) compiler now has registerization enabled.  If you discover it
-causes bugs, use 5g -N to disable the registerizer and please let us know.
-
-The xml package now allows the extraction of nested XML tags by specifying
-struct tags of the form "parent>child". See the XML documentation for an
-example: http://golang.org/pkg/xml/
-
-* 5a, 5l, 6a, 6l, 8a, 8l: handle out of memory, large allocations (thanks Jeff R. Allen).
-* 8l: pe changes (thanks Alex Brainman).
-* arm: fixes and improvements.
-* cc: fix vlong condition.
-* cgo: add complex float, complex double (thanks Sebastien Binet),
-        in _cgo_main.c define all provided symbols as functions.
-* codereview: don't mail change lists with no files (thanks Ryan Hitchman).
-* crypto/cipher: add OFB mode.
-* expvar: add Float.
-* fmt: document %X of string, []byte.
-* gc, runtime: make range on channel safe for multiple goroutines.
-* gc: fix typed constant declarations (thanks Anthony Martin).
-* go spec: adjust language for constant typing.
-* go/scanner: Make Init take a *token.File instead of a *token.FileSet.
-* godoc: bring back "indexing in progress" message,
-        don't double HTML-escape search result snippets,
-        enable qualified identifiers ("math.Sin") as query strings again,
-        peephole optimization for generated HTML,
-        remove tab before formatted section.
-* gofmt, go/printer: do not insert extra line breaks where they may break the code.
-* http: fix Content-Range and Content-Length in response (thanks Clement Skau),
-        fix scheme-relative URL parsing; add ParseRequestURL,
-        handle HEAD requests correctly,
-        support for relative URLs.
-* math: handle denormalized numbers in Frexp, Ilogb, Ldexp, and Logb (thanks Eoghan Sherry).
-* net, syscall: return source address in Recvmsg (thanks Albert Strasheim).
-* net: add LookupAddr (thanks Kyle Lemons),
-        add unixpacket (thanks Albert Strasheim),
-        avoid nil dereference if /etc/services can't be opened (thanks Corey Thomasson),
-        implement windows timeout (thanks Wei Guangjing).
-* netchan: do not block sends; implement flow control (thanks Roger Peppe).
-* regexp: reject bare '?'. (thanks Ben Lynn)
-* runtime/cgo: don't define crosscall2 in dummy _cgo_main.c.
-* runtime/debug: new package for printing stack traces from a running goroutine.
-* runtime: add per-pause gc stats,
-        fix arm reflect.call boundary case,
-        print signal information during panic.
-* spec: specify that int and uint have the same size.
-* syscall: correct WSTOPPED on OS X,
-        correct length of GNU/Linux abstract Unix domain sockaddr,
-        correct length of SockaddrUnix.
-* tutorial: make stdin, stdout, stderr work on Windows.
-* windows: implement exception handling (thanks Hector Chu).
-
- -

2011-01-12

- -
-The json, gob, and template packages have changed, and code that uses them
-may need to be updated after this release. They will no longer read or write
-unexported struct fields. When marshalling a struct with json or gob the
-unexported fields will be silently ignored. Attempting to unmarshal json or
-gob data into an unexported field will generate an error. Accessing an
-unexported field from a template will cause the Execute function to return
-an error.
-
-Godoc now supports regular expression full text search, and this
-functionality is now available on golang.org.
-
-Other changes:
-* arm: initial cut at arm optimizer.
-* bytes.Buffer: Fix bug in UnreadByte.
-* cgo: export unsafe.Pointer as void*, fix enum const conflict,
-        output alignment fix (thanks Gustavo Niemeyer).
-* crypto/block: mark as deprecated.
-* crypto/openpgp: add error and armor.
-* crypto: add twofish package (thanks Berengar Lehr).
-* doc/spec: remove Maxalign from spec.
-* encoding/line: new package for reading lines from an io.Reader.
-* go/ast: correct end position for Index and TypeAssert expressions.
-* gob: make (en|dec)code(Ui|I)nt methods rather than functions.
-* godefs: better handling of enums.
-* gofmt: don't attempt certain illegal rewrites,
-        rewriter matches apply to expressions only.
-* goinstall: preliminary support for cgo packages (thanks Gustavo Niemeyer).
-* hg: add cgo/_cgo_* to .hgignore.
-* http: fix text displayed in Redirect.
-* ld: fix exported dynamic symbols on Mach-O,
-        permit a Mach-O symbol to be exported in the dynamic symbol table.
-* log: add methods for exit and panic.
-* net: use closesocket api instead of CloseHandle on Windows (thanks Alex Brainman).
-* netchan: make fields exported for gob change.
-* os: add Sync to *File, wraps syscall.Fsync.
-* runtime/cgo: Add callbacks to support SWIG.
-* runtime: Restore scheduler stack position if cgo callback panics.
-* suffixarray: faster creation algorithm (thanks Eric Eisner).
-* syscall: fix mksysnum_linux.sh (thanks Anthony Martin).
-* time.NewTicker: panic for intervals <= 0.
-* time: add AfterFunc to call a function after a duration (thanks Roger Peppe),
-        fix tick accuracy when using multiple Tickers (thanks Eoghan Sherry).
- -

2011-01-06

- -
-This release includes several fixes and changes:
-
-* build: Make.pkg: use installed runtime.h for cgo.
-* cgo: disallow use of C.errno.
-* crypto/cipher: fix OCFB,
-        make NewCBCEncrypter return BlockMode.
-* doc: 6l: fix documentation of -L flag,
-        add golanguage.ru to foreign-language doc list,
-        effective go: explain the effect of repanicking better,
-        update Effective Go for template API change,
-        update contribution guidelines to prefix the change description.
-* encoding/binary: reject types with implementation-dependent sizes (thanks Patrick Gavlin).
-* exp/evalsimple fix handling of slices like s[:2] (thanks Sebastien Binet).
-* fmt: made format string handling more efficient,
-        normalize processing of format string.
-* gc: return constant floats for parts of complex constants (thanks Anthony Martin),
-        rewrite complex /= to l = l / r (thanks Patrick Gavlin),
-        fix &^=.
-* go/ast: provide complete node text range info.
-* gob: generate a better error message in one confusing place.
-* godoc: fix godoc -src (thanks Icarus Sparry).
-* goinstall: add -clean flag (thanks Kyle Lemons),
-        add checkout concept (thanks Caine Tighe),
-        fix -u for bzr (thanks Gustavo Niemeyer).
-* http: permit empty Reason-Phrase in response Status-Line.
-* io: fix Copyn EOF handling.
-* net: fix close of Listener (thanks Michael Hoisie).
-* regexp: fix performance bug, make anchored searches fail fast,
-        fix prefix bug.
-* runtime/cgo: fix stackguard on FreeBSD/amd64 (thanks Anthony Martin).
-* strconv: atof: added 'E' as valid token for exponent (thanks Stefan Nilsson),
-        update ftoa comment for 'E' and 'G'.
-* strings: fix description of FieldsFunc (thanks Roger Peppe).
-* syscall: correct Linux Splice definition,
-        make Access second argument consistently uint32.
-
- -

2010-12-22

- -
-A small release this week. The most significant change is that some 
-outstanding cgo issues were resolved.
-
-* cgo: handle references to symbols in shared libraries.
-* crypto/elliptic: add serialisation and key pair generation.
-* crypto/hmac: add HMAC-SHA256 (thanks Anthony Martin).
-* crypto/tls: add ECDHE support ("Elliptic Curve Diffie Hellman Ephemeral"),
-        add support code for generating handshake scripts for testing.
-* darwin, freebsd: ignore write failure (during print, panic).
-* exp/draw: remove Border function.
-* expvar: quote StringFunc output, same as String output.
-* hash/crc64: fix typo in Sum.
-* ld: allow relocations pointing at ELF .bss symbols, ignore stab symbols.
-* misc/cgo/life: fix, add to build.
-* regexp: add HasMeta, HasOperator, and String methods to Regexp.
-* suffixarray: implemented FindAllIndex regexp search.
-* test/bench: update numbers for regex-dna after speedup to regexp.
-* time: explain the formats a little better.
-
- -

2010-12-15

- -
-Package crypto/cipher has been started, to replace crypto/block.
-As part of the changes, rc4.Cipher's XORKeyStream method signature has changed from
-        XORKeyStream(buf []byte)
-to
-        XORKeyStream(dst, src []byte)
-to implement the cipher.Stream interface.  If you use crypto/block, you'll need
-to switch to crypto/cipher once it is complete.
-
-Package smtp's StartTLS now takes a *tls.Config argument.
-
-Package reflect's ArrayCopy has been renamed to Copy.  There are new functions
-Append and AppendSlice.
-
-The print/println bootstrapping functions now write to standard error.
-To write to standard output, use fmt.Print[ln].
-
-A new tool, govet, has been added to the Go distribution. Govet is a static
-checker for Go programs. At the moment, and for the forseeable future,
-it only checks arguments to print calls.
-
-The cgo tool for writing Go bindings for C code has changed so that it no
-longer uses stub .so files (like cgo_stdio.so).  Cgo-based packages using the
-standard Makefiles should build without any changes.  Any alternate build
-mechanisms will need to be updated.
-
-The C and Go compilers (6g, 6c, 8g, 8c, 5g, 5c) now align structs according to
-the maximum alignment of the fields they contain; previously they aligned
-structs to word boundaries.  This may break non-cgo-based code that attempts to
-mix C and Go.
-
-NaCl support has been removed. The recent linker changes broke NaCl support
-a month ago, and there are no known users of it.
-If necessary, the NaCl code can be recovered from the repository history.
-
-* 5g/8g, 8l, ld, prof: fix output of 32-bit values (thanks Eoghan Sherry).
-* [68]l and runtime: GDB support for interfaces and goroutines.
-* 6l, 8l: support for linking ELF and Mach-O .o files.
-* all: simplify two-variable ranges with unused second variable (thanks Ryan Hitchman).
-* arm: updated soft float support.
-* codereview: keep quiet when not in use (thanks Eoghan Sherry).
-* compress/flate: implement Flush, equivalent to zlib's Z_SYNC_FLUSH.
-* crypto/tls: use rand.Reader in cert generation example (thanks Anthony Martin).
-* dashboard: fix project tag filter.
-* debug/elf, debug/macho: add ImportedLibraries, ImportedSymbols.
-* doc/go_mem: goroutine exit is not special.
-* event.go: another print glitch from gocheck.
-* gc: bug fixes,
-        syntax error for incomplete chan type (thanks Ryan Hitchman).
-* go/ast: fix ast.Walk.
-* gob: document the byte count used in the encoding of values,
-        fix bug sending zero-length top-level slices and maps,
-        Register should use the original type, not the indirected one.
-* godashboard: support submitting projects with non-ascii names (thanks Ryan Hitchman)
-* godefs: guard against structs with pad fields
-* godoc: added textual search, to enable use -fulltext flag.
-* gofmt: simplify "x, _ = range y" to "x = range y".
-* gopack: allow ELF/Mach-O objects in .a files without clearing allobj.
-* go/token,scanner: fix comments so godoc aligns properly.
-* govet: on error continue to the next file (thanks Christopher Wedgwood).
-* html: improved parsing.
-* http: ServeFile handles Range header for partial requests.
-* json: check for invalid UTF-8.
-* ld: allow .o files with no symbols,
-        reading of ELF object files,
-        reading of Mach-O object files.
-* math: change float64 bias constant from 1022 to 1023 (thanks Eoghan Sherry),
-        rename the MinFloat constant to SmallestNonzeroFloat.
-* nm: silently ignore .o files in .a files.
-* os: fix test of RemoveAll.
-* os/inotify: new package (thanks Balazs Lecz).
-* os: make MkdirAll work with symlinks (thanks Ryan Hitchman).
-* regexp: speed up by about 30%; also simplify code for brackets.
-* runtime/linux/386: set FPU to 64-bit precision.
-* runtime: remove paranoid mapping at 0.
-* suffixarray: add Bytes function.
-* syscall: add network interface constants for linux/386, linux/amd64 (thanks Mikio Hara).
-* syscall/windows: restrict access rights param of OpenProcess(),
-        remove \r and \n from error messages (thanks Alex Brainman).
-* test/bench: fixes to timing.sh (thanks Anthony Martin).
-* time: fix bug in Ticker: shutdown using channel rather than memory.
-* token/position: provide FileSet.File, provide files iterator.
-* xml: disallow invalid Unicode code points (thanks Nigel Kerr).
-
- -

2010-12-08

- -
-This release includes some package changes. If you use the crypto/tls or
-go/parser packages your code may require changes.
-
-The crypto/tls package's Dial function now takes an additional *Config
-argument.  Most uses will pass nil to get the same default behavior as before.
-See the documentation for details:
-        http://golang.org/pkg/crypto/tls/#Config
-        http://golang.org/pkg/crypto/tls/#Dial
-
-The go/parser package's ParseFile function now takes a *token.FileSet as its
-first argument. This is a pointer to a data structure used to store
-position information. If you don't care about position information you
-can pass "token.NewFileSet()". See the documentation for details:
-        http://golang.org/pkg/go/parser/#ParseFile
-
-This release also splits the patent grant text out of the LICENSE file into a
-separate PATENTS file and changes it to be more like the WebM grant.
-These clarifications were made at the request of the Fedora project.
-
-Other changes:
-* [68]l: generate debug info for builtin structured types, prettyprinting in gdb.
-* 8l: add dynimport to import table in Windows PE (thanks Wei Guangjing).
-* 8l, runtime: fix Plan 9 386 build (thanks Yuval Pavel Zholkover).
-* all: fix broken calls to Printf etc.
-* bufio: make Reader.Read implement io.Reader semantics (thanks Roger Peppe).
-* build: allow archiver to be specified by HOST_AR (thanks Albert Strasheim).
-* bytes: add Buffer.UnreadRune, Buffer.UnreadByte (thanks Roger Peppe).
-* crypto/tls: fix build of certificate generation example (thanks Christian Himpel).
-* doc/install: describe GOHOSTOS and GOHOSTARCH.
-* errchk: accept multiple source files (thanks Eoghan Sherry).
-* exec.LookPath: return os.PathError instad of os.ENOENT (thanks Michael Hoisie)..
-* flag: fix format error in boolean error report,
-        handle multiple calls to flag.Parse.
-* fmt: add %U format for standard Unicode representation of code point values.
-* gc: fix method offsets of anonymous interfaces (thanks Eoghan Sherry),
-        skip undefined symbols in import . (thanks Eoghan Sherry).
-* go/scanner: remove Tokenize - was only used in tests
-* gobuilder: add buildroot command-line flag (thanks Devon H. O'Dell).
-* html: unescape numeric entities (thanks Ryan Hitchman).
-* http: Add EncodeQuery, helper for constructing query strings.
-* ld: fix dwarf decoding of 64-bit reflect values (thanks Eoghan Sherry).
-* math: improve accuracy of Exp2 (thanks Eoghan Sherry).
-* runtime: add Goroutines (thanks Keith Rarick).
-* sync: small naming fix for armv5 (thanks Dean Prichard).
-* syscall, net: Add Recvmsg and Sendmsg on Linux (thanks Albert Strasheim).
-* time: make After use fewer goroutines and host processes (thanks Roger Peppe).
-
- -

2010-12-02

- -
-Several package changes in this release may require you to update your code if
-you use the bytes, template, or utf8 packages. In all cases, any outdated code
-will fail to compile rather than behave erroneously.
-
-The bytes package has changed. Its Add and AddByte functions have been removed,
-as their functionality is provided by the recently-introduced built-in function
-"append". Any code that uses them will need to be changed:
-s = bytes.Add(s, b)    ->    s = append(s, b...)
-s = bytes.AddByte(b, c)    ->    s = append(s, b)
-s = bytes.Add(nil, c)    ->    append([]byte(nil), c)
-
-The template package has changed. Your code will need to be updated if it calls
-the HTMLFormatter or StringFormatter functions, or implements its own formatter
-functions. The function signature for formatter types has changed to:
-        func(wr io.Writer, formatter string, data ...interface{})
-to allow multiple arguments to the formatter.  No templates will need updating.
-See the change for examples:
-        http://code.google.com/p/go/source/detail?r=2c2be793120e
-
-The template change permits the implementation of multi-word variable
-instantiation for formatters. Before one could say
-        {field}
-or
-        {field|formatter}
-Now one can also say
-        {field1 field2 field3}
-or
-        {field1 field2 field3|formatter}
-and the fields are passed as successive arguments to the formatter,
-by analogy to fmt.Print.
-
-The utf8 package has changed. The order of EncodeRune's arguments has been
-reversed to satisfy the convention of "destination first".
-Any code that uses EncodeRune will need to be updated.
-
-Other changes:
-* [68]l: correct dwarf location for globals and ranges for arrays.
-* big: fix (*Rat) SetFrac64(a, b) when b < 0 (thanks Eoghan Sherry).
-* compress/flate: fix typo in comment (thanks Mathieu Lonjaret).
-* crypto/elliptic: use a Jacobian transform for better performance.
-* doc/code.html: fix reference to "gomake build" (thanks Anschel Schaffer-Cohen).
-* doc/roadmap: update gdb status.
-* doc/spec: fixed some omissions and type errors.
-* doc: some typo fixes (thanks Peter Mundy).
-* exp/eval: build fix for parser.ParseFile API change (thanks Anschel Schaffer-Cohen).
-* fmt: Scan accepts Inf and NaN,
-        allow "% X" as well as "% x".
-* go/printer: preserve newlines in func parameter lists (thanks Jamie Gennis).
-* http: consume request body before next request.
-* log: ensure writes are atomic (thanks Roger Peppe).
-* path: Windows support for Split (thanks Benny Siegert).
-* runtime: fix SysFree to really free memory on Windows (thanks Alex Brainman),
-        parallel definitions in Go for all C structs.
-* sort: avoid overflow in pivot calculation,
-        reduced stack depth to lg(n) in quickSort (thanks Stefan Nilsson).
-* strconv: Atof on Infs and NaNs.
-
- -

2010-11-23

- -
-This release includes a backwards-incompatible package change to the
-sort.Search function (introduced in the last release).
-See the change for details and examples of how you might change your code:
-        http://code.google.com/p/go/source/detail?r=102866c369
-
-* build: automatically #define _64BIT in 6c.
-* cgo: print required space after parameter name in wrapper function.
-* crypto/cipher: new package to replace crypto/block (thanks Adam Langley).
-* crypto/elliptic: new package, implements elliptic curves over prime fields (thanks Adam Langley).
-* crypto/x509: policy OID support and fixes (thanks Adam Langley).
-* doc: add link to codewalks,
-        fix recover() documentation (thanks Anschel Schaffer-Cohen),
-        explain how to write Makefiles for commands.
-* exec: enable more tests on windows (thanks Alex Brainman).
-* gc: adjustable hash code in typecheck of composite literals
-        (thanks to vskrap, Andrey Mirtchovski, and Eoghan Sherry).
-* gc: better error message for bad type in channel send (thanks Anthony Martin).
-* godoc: bug fix in relativePath,
-        compute search index for all file systems under godoc's observation,
-        use correct time stamp to indicate accuracy of search result.
-* index/suffixarray: use sort.Search.
-* net: add ReadFrom and WriteTo windows version (thanks Wei Guangjing).
-* reflect: remove unnecessary casts in Get methods.
-* rpc: add RegisterName to allow override of default type name.
-* runtime: free memory allocated by windows CommandLineToArgv (thanks Alex Brainman).
-* sort: simplify Search (thanks Roger Peppe).
-* strings: add LastIndexAny (thanks Benny Siegert).
-
- -

2010-11-10

- -
-The birthday release includes a new Search capability inside the sort package.
-It takes an unusual but very general and easy-to-use approach to searching
-arbitrary indexable sorted data.  See the documentation for details:
-    http://golang.org/pkg/sort/#Search
-
-The ARM port now uses the hardware floating point unit (VFP).  It still has a
-few bugs, mostly around conversions between unsigned integer and floating-point
-values, but it's stabilizing.
-
-In addition, there have been many smaller fixes and updates: 
-
-* 6l: generate dwarf variable names with disambiguating suffix.
-* container/list: make Remove return Value of removed element.
-    makes it easier to remove first or last item.
-* crypto: add cast5 (default PGP cipher),
-    switch block cipher methods to be destination first.
-* crypto/tls: use pool building for certificate checking
-* go/ast: change embedded token.Position fields to named fields
-    (preparation for a different position representation)
-* net: provide public access to file descriptors (thanks Keith Rarick)
-* os: add Expand function to evaluate environment variables.
-* path: add Glob (thanks Benny Siegert)
-* runtime: memequal optimization (thanks Graham Miller)
-    prefix all external symbols with "runtime·" to avoid
-    conflicts linking with external C libraries.
-
- -

2010-11-02

- -
-This release includes a language change: the new built-in function, append.
-Append makes growing slices much simpler. See the spec for details:
-        http://golang.org/doc/go_spec.html#Appending_and_copying_slices
-
-Other changes:
-* 8l: pe generation fixes (thanks Alex Brainman).
-* doc: Effective Go: append and a few words about "..." args.
-* build: fiddle with make variables.
-* codereview: fix sync and download in Python 2.7 (thanks Fazlul Shahriar).
-* debug/pe, cgo: add windows support (thanks Wei Guangjing).
-* go/ast: add Inspect function for easy AST inspection w/o a visitor.
-* go/printer: do not remove parens around composite literals starting with
-        a type name in control clauses.
-* go/scanner: bug fixes, revisions, and more tests.
-* gob: several fixes and documentation updates.
-* godoc: bug fix (bug introduced with revision 3ee58453e961).
-* gotest: print empty benchmark list in a way that gofmt will leave alone.
-* http server: correctly respond with 304 NotModified (thanks Michael Hoisie).
-* kate: update list of builtins (thanks Evan Shaw).
-* libutf: update to Unicode 5.2.0 to match pkg/unicode (thanks Anthony Martin).
-* misc/bbedit: update list of builtins (thanks Anthony Starks).
-* misc/vim: update list of builtins.
-* mkrunetype: install a Makefile and tweak it slightly so it can be built.
-* netchan: fix locking bug.
-* pidigits: minor improvements (thanks Evan Shaw).
-* rpc: fix client deadlock bug.
-* src: use append where appropriate (often instead of vector).
-* strings: add Contains helper function (thanks Brad Fitzpatrick).
-* syscall: SIO constants for Linux (thanks Albert Strasheim),
-        Stat(path) on windows (thanks Alex Brainman).
-* test/ken/convert.go: add conversion torture test.
-* testing: add Benchmark (thanks Roger Peppe).
-
- -

2010-10-27

- -
-*** This release changes the encoding used by package gob. 
-    If you store gobs on disk, see below. ***
-
-The ARM port (5g) now passes all tests. The optimizer is not yet enabled, and
-floating point arithmetic is performed entirely in software. Work is underway
-to address both of these deficiencies.
-
-The syntax for arrays, slices, and maps of composite literals has been
-simplified. Within a composite literal of array, slice, or map type, elements
-that are themselves composite literals may elide the type if it is identical to
-the outer literal's element type. For example, these expressions:
-	[][]int{[]int{1, 2, 3}, []int{4, 5}}
-	map[string]Point{"x": Point{1.5, -3.5}, "y": Point{0, 0}}
-can be simplified to:
-	[][]int{{1, 2, 3}, {4, 5}}
-	map[string]Point{"x": {1.5, -3.5}, "y": {0, 0}}
-Gofmt can make these simplifications mechanically when invoked with the 
-new -s flag.
-
-The built-in copy function can now copy bytes from a string value to a []byte.
-Code like this (for []byte b and string s): 
-	for i := 0; i < len(s); i++ {
-		b[i] = s[i]
-	}
-can be rewritten as:
-	copy(b, s)
-
-The gob package can now encode and decode interface values containing types
-registered ahead of time with the new Register function. These changes required
-a backwards-incompatible change to the wire format.  Data written with the old
-version of the package will not be readable with the new one, and vice versa.
-(Steps were made in this change to make sure this doesn't happen again.) 
-We don't know of anyone using gobs to create permanent data, but if you do this
-and need help converting, please let us know, and do not update to this release
-yet.  We will help you convert your data.
-
-Other changes:
-* 5g, 6g, 8g: generate code for string index instead of calling function.
-* 5l, 6l, 8l: introduce sub-symbols.
-* 6l/8l: global and local variables and type info.
-* Make.inc: delete unnecessary -fno-inline flag to quietgcc.
-* arm: precise float64 software floating point, bug fixes.
-* big: arm assembly, faster software mulWW, divWW.
-* build: only print "You need to add foo to PATH" when needed.
-* container/list: fix Remove bug and use pointer to self as identifier.
-* doc: show page title in browser title bar,
-        update roadmap.
-* encoding/binary: give LittleEndian, BigEndian specific types.
-* go/parser: consume auto-inserted semi when calling ParseExpr().
-* gobuilder: pass GOHOSTOS and GOHOSTARCH to build,
-        write build and benchmarking logs to disk.
-* goinstall: display helpful message when encountering a cgo package,
-        fix test for multiple package names (thanks Fazlul Shahriar).
-* gotest: generate correct gofmt-formatted _testmain.go.
-* image/png: speed up paletted encoding ~25% (thanks Brad Fitzpatrick).
-* misc: update python scripts to specify python2 as python3 is now "python".
-* net: fix comment on Dial to mention unix/unixgram.
-* rpc: expose Server type to allow multiple RPC Server instances.
-* runtime: print unknown types in panic.
-* spec: append built-in (not yet implemented).
-* src: gofmt -s -w src misc.
-        update code to use copy-from-string.
-* test/bench: update numbers.
-* websocket: fix short Read.
-
- -

2010-10-20

- -
-This release removes the log package's deprecated functions.
-Code that has not been updated to use the new interface will break.
-See the previous release notes for details:
-	http://golang.org/doc/devel/release.html#2010-10-13
-
-Also included are major improvements to the linker. It is now faster, 
-uses less memory, and more parallelizable (but not yet parallel).
-
-The nntp package has been removed from the standard library.
-Its new home is the nntp-go project at Google Code:
-	http://code.google.com/p/nntp-go
-You can install it with goinstall:
-	goinstall nntp-go.googlecode.com/hg/nntp
-And import it in your code like so:
-	import "nntp-go.googlecode.com/hg/nntp"
-
-Other changes:
-* 6g: avoid too-large immediate constants.
-* 8l, runtime: initial support for Plan 9 (thanks Yuval Pavel Zholkover).
-* 6l, 8l: more improvements on exporting debug information (DWARF).
-* arm: code gen fixes. Most tests now pass, except for floating point code.
-* big: add random number generation (thanks Florian Uekermann).
-* gc: keep track of real actual type of identifiers,
-	report that shift must be unsigned integer,
-	select receive with implicit conversion.
-* goplay: fix to run under windows (thanks Yasuhiro Matsumoto).
-* http: do not close connection after sending HTTP/1.0 request.
-* netchan: add new method Hangup to terminate transmission on a channel.
-* os: change TestForkExec so it can run on windows (thanks Yasuhiro Matsumoto).
-* runtime: don't let select split stack.
-* syscall/arm: correct 64-bit system call arguments.
-
- -

2010-10-13

- -
-This release includes changes to the log package, the removal of exp/iterable,
-two new tools (gotry and goplay), one small language change, and many other
-changes and fixes.  If you use the log or iterable packages, you need to make
-changes to your code.
-
-The log package has changed.  Loggers now have only one output, and output to
-standard error by default.  The names have also changed, although the old names
-are still supported.  They will be deleted in the next release, though, so it
-would be good to update now if you can.  For most purposes all you need to do
-is make these substitutions:
-        log.Stderr -> log.Println or log.Print
-        log.Stderrf -> log.Printf
-        log.Crash -> log.Panicln or log.Panic
-        log.Crashf -> log.Panicf
-        log.Exit -> log.Exitln or log.Exit
-        log.Exitf -> log.Exitf (no change)
-Calls to log.New() must drop the second argument.
-Also, custom loggers with exit or panic properties will need to be reworked.
-For full details, see the change description:
-        http://code.google.com/p/go/source/detail?r=d8a3c7563d
-
-The language change is that uses of pointers to interface values no longer
-automatically dereference the pointer.  A pointer to an interface value is more
-often a beginner's bug than correct code.
-
-The package exp/iterable has been removed. It was an interesting experiment,
-but it encourages writing inefficient code and has outlived its utility.
-
-The new tools:
-* gotry: an exercise in reflection and an unusual tool. Run 'gotry' for details.
-* goplay: a stand-alone version of the Go Playground. See misc/goplay.
-
-Other changes:
-* 6l: Mach-O fixes, and fix to work with OS X nm/otool (thanks Jim McGrath).
-* [568]a: correct line numbers for statements.
-* arm: code generation and runtime fixes,
-	adjust recover for new reflect.call,
-	enable 6 more tests after net fix.
-* big: fix panic and round correctly in Rat.FloatString (thanks Anthony Martin).
-* build: Make.cmd: remove $(OFILES) (thanks Eric Clark),
-        Make.pkg: remove .so before installing new one,
-        add GOHOSTOS and GOHOSTARCH environment variables.
-* crypto/tls: better error messages for certificate issues,
-        make SetReadTimeout work.
-* doc: add Sydney University video,
-	add The Expressiveness of Go talk.
-* exp/draw/x11: support X11 vendors other than "The X.Org Foundation".
-* expvar: add (*Int).Set (thanks Sam Thorogood).
-* fmt: add Errorf helper function,
-        allow %d on []byte.
-* gc: O(1) string comparison when lengths differ,
-        various bug fixes.
-* http: return the correct error if a header line is too long.
-* image: add image.Tiled type, the Go equivalent of Plan 9's repl bit.
-* ld: be less picky about bad line number info.
-* misc/cgo/life: fix for new slice rules (thanks Graham Miller).
-* net: allow _ in DNS names.
-* netchan: export before import when testing, and
-        zero out request to ensure correct gob decoding. (thanks Roger Peppe).
-* os: make tests work on windows (thanks Alex Brainman).
-* runtime: bug fix: serialize mcache allocation,
-        correct iteration of large map values,
-        faster strequal, memequal (thanks Graham Miller),
-        fix argument dump in traceback,
-        fix tiny build.
-* smtp: new package (thanks Evan Shaw).
-* syscall: add sockaddr_ll support for linux/386, linux/amd64 (thanks Mikio Hara),
-        add ucred structure for SCM_CREDENTIALS over UNIX sockets. (thanks Albert Strasheim).
-* syscall: implement WaitStatus and Wait4() for windows (thanks Wei Guangjing).
-* time: add After.
-* websocket: enable tests on windows (thanks Alex Brainman).
-
- -

2010-09-29

- -
-This release includes some minor language changes and some significant package
-changes. You may need to change your code if you use ...T parameters or the
-http package.
-
-The semantics and syntax of forwarding ...T parameters have changed.
-        func message(f string, s ...interface{}) { fmt.Printf(f, s) }
-Here, s has type []interface{} and contains the parameters passed to message.
-Before this language change, the compiler recognized when a function call
-passed a ... parameter to another ... parameter of the same type, and just
-passed it as though it was a list of arguments.  But this meant that you
-couldn't control whether to pass the slice as a single argument and you
-couldn't pass a regular slice as a ... parameter, which can be handy.  This
-change gives you that control at the cost of a few characters in the call.
-If you want the promotion to ...,  append ... to the argument:
-        func message(f string, s ...interface{}) { fmt.Printf(f, s...) }
-Without the ..., s would be passed to Printf as a single argument of type
-[]interface{}.  The bad news is you might need to fix up some of your code, 
-but the compiler will detect the situation and warn you.
-
-Also, the http.Handler and http.HandlerFunc types have changed. Where http
-handler functions previously accepted an *http.Conn, they now take an interface
-type http.ResponseWriter. ResponseWriter implements the same methods as *Conn,
-so in most cases the only change required will be changing the type signature
-of your handler function's first parameter. See:
-  http://golang.org/pkg/http/#Handler
-
-The utf8 package has a new type, String, that provides efficient indexing 
-into utf8 strings by rune (previously an expensive conversion to []int 
-was required). See:
-  http://golang.org/pkg/utf8/#String
-
-The compiler will now automatically insert a semicolon at the end of a file if
-one is not found. This effect of this is that Go source files are no longer
-required to have a trailing newline.
-
-Other changes:
-* 6prof: more accurate usage message.
-* archive/zip: new package for reading Zip files.
-* arm: fix code generation, 10 more package tests pass.
-* asn1: make interface consistent with json.
-* bufio.UnreadRune: fix bug at EOF.
-* build: clear custom variables like GREP_OPTIONS,
-        silence warnings generated by ubuntu gcc,
-        use full path when compiling libraries.
-* bytes, strings: change lastIndexFunc to use DecodeLastRune (thanks Roger Peppe).
-* doc: add to and consolidate non-english doc references,
-        consolidate FAQs into a single file, go_faq.html,
-        updates for new http interface.
-* fmt/Printf: document and tweak error messages produced for bad formats.
-* gc: allow select case expr = <-c,
-        eliminate duplicates in method table,
-        fix reflect table method receiver,
-        improve error message for x \= 0.
-* go/scanner: treat EOF like a newline for purposes of semicolon insertion.
-* gofmt: stability improvements.
-* gotest: leave _testmain.go for "make clean" to clean up.
-* http: correct escaping of different parts of URL,
-        support HTTP/1.0 Keep-Alive.
-* json: do not write to unexported fields.
-* libcgo: don't build for NaCl,
-        set g, m in thread local storage for windows 386 (thanks Wei Guangjing).
-* math: Fix off-by-one error in Ilogb and Logb.  (thanks Charles L. Dorian).
-* misc/dashboard/builder: remove build files after benchmarking.
-* nacl: update instructions for new SDK.
-* net: enable v4-over-v6 on ip sockets,
-        fix crash in DialIP.
-* os: check for valid arguments in windows Readdir (thanks Peter Mundy).
-* runtime: add mmap of null page just in case,
-        correct stats in SysFree,
-        fix unwindstack crash.
-* syscall: add IPPROTO_IPV6 and IPV6_V6ONLY const to fix nacl and windows build,
-        add inotify on Linux (thanks Balazs Lecz),
-        fix socketpair in syscall_bsd,
-        fix windows value of IPV6_V6ONLY (thanks Alex Brainman),
-        implement windows version of Utimes (thanks Alex Brainman),
-        make mkall.sh work for nacl.
-* test: Add test that causes incorrect error from gccgo.
-* utf8: add DecodeLastRune and DecodeLastRuneInString (thanks Roger Peppe).
-* xml: Allow entities inside CDATA tags (thanks Dan Sinclair).
-
- -

2010-09-22

- -
-This release includes new package functionality, and many bug fixes and changes.
-It also improves support for the arm and nacl platforms.
-
-* 5l: avoid fixed buffers in list.
-* 6l, 8l: clean up ELF code, fix NaCl.
-* 6l/8l: emit DWARF frame info.
-* Make.inc: make GOOS detection work on windows (thanks Alex Brainman).
-* build: fixes for native arn build,
-        make all.bash run on Ubuntu ARM.
-* cgo: bug fixes,
-        show preamble gcc errors (thanks Eric Clark).
-* crypto/x509, crypto/tls: improve root matching and observe CA flag.
-* crypto: Fix certificate validation.
-* doc: variable-width layout.
-* env.bash: fix building in directory with spaces in the path (thanks Alex Brainman).
-* exp/4s, exp/nacl/av: sync to recent exp/draw changes.
-* exp/draw/x11: mouse location is a signed integer.
-* exp/nacl/av: update color to max out at 1<<16-1 instead of 1<<32-1.
-* fmt: support '*' for width or precision (thanks Anthony Martin).
-* gc: improvements to static initialization,
-        make sure path names are canonical.
-* gob: make robust when decoding a struct with non-struct data.
-* gobuilder: add -cmd for user-specified build command,
-        add -rev= flag to build specific revision and exit,
-        fix bug that caused old revisions to be rebuilt.
-* godoc: change default filter file name to "",
-        don't use quadratic algorithm to filter paths,
-        show "Last update" info for directory listings.
-* http: new redirect test,
-        URLEscape now escapes all reserved characters as per the RFC.
-* nacl: fix zero-length writes.
-* net/dict: parse response correctly (thanks Fazlul Shahriar).
-* netchan: add a cross-connect test,
-        handle closing of channels,
-        provide a method (Importer.Errors()) to recover protocol errors.
-* os: make Open() O_APPEND flag work on windows (thanks Alex Brainman),
-        make RemoveAll() work on windows (thanks Alex Brainman).
-* pkg/Makefile: disable netchan test to fix windows build (thanks Alex Brainman).
-* regexp: delete Iter methods.
-* runtime: better panic for send to nil channel.
-* strings: fix minor bug in LastIndexFunc (thanks Roger Peppe).
-* suffixarray: a package for creating suffixarray-based indexes.
-* syscall: Use vsyscall for syscall.Gettimeofday and .Time on linux amd64.
-* test: fix NaCl build.
-* windows: fix netchan test by using 127.0.0.1.
-
- -

2010-09-15

- -
-This release includes a language change: the lower bound of a subslice may
-now be omitted, in which case the value will default to 0.
-For example, s[0:10] may now be written as s[:10], and s[0:] as s[:].
-
-The release also includes important bug fixes for the ARM architecture,
-as well as the following fixes and changes:
-
-* 5g: register allocation bugs
-* 6c, 8c: show line numbers in -S output
-* 6g, 6l, 8g, 8l: move read-only data to text segment
-* 6l, 8l: make etext accurate; introduce rodata, erodata.
-* arm: fix build bugs.
-        make libcgo build during OS X cross-compile
-        remove reference to deleted file syntax/slice.go
-        use the correct stat syscalls
-        work around reg allocator bug in 5g
-* bufio: add UnreadRune.
-* build: avoid bad environment interactions
-        fix build for tiny
-        generate, clean .exe files on Windows (thanks Joe Poirier)
-        test for _WIN32, not _MINGW32 (thanks Joe Poirier)
-        work with GNU Make 3.82 (thanks Jukka-Pekka Kekkonen)
-* cgo: add typedef for uintptr in generated headers
-        silence warning for C call returning const pointer
-* codereview: convert email address to lower case before checking CONTRIBUTORS
-* crypto/tls: don't return an error from Close()
-* doc/tutorial: update for slice changes.
-* exec: separate LookPath implementations for unix/windows (thanks Joe Poirier)
-* exp/draw/x11: allow clean shutdown when the user closes the window.
-* exp/draw: clip destination rectangle to the image bounds.
-        fast path for drawing overlapping image.RGBAs.
-        fix double-counting of pt.Min for the src and mask points.
-        reintroduce the MouseEvent.Nsec timestamp.
-        rename Context to Window, and add a Close method.
-* exp/debug: preliminary support for 'copy' function (thanks Sebastien Binet)
-* fmt.Fscan: use UnreadRune to preserve data across calls.
-* gc: better printing of named constants, func literals in errors
-        many bug fixes
-        fix line number printing with //line directives
-        fix symbol table generation on windows (thanks Alex Brainman)
-        implement comparison rule from spec change 33abb649cb63
-        implement new slice spec (thanks Scott Lawrence)
-        make string x + y + z + ... + w efficient
-        more accurate line numbers for ATEXT
-        remove &[10]int -> []int conversion
-* go-mode.el: fix highlighting for 'chan' type (thanks Scott Lawrence)
-* godoc: better support for directory trees for user-supplied paths
-        use correct delay time (bug fix)
-* gofmt, go/printer: update internal estimated position correctly
-* goinstall: warn when package name starts with http:// (thanks Scott Lawrence)
-* http: check https certificate against host name
-        do not cache CanonicalHeaderKey (thanks Jukka-Pekka Kekkonen)
-* image: change a ColorImage's minimum point from (0, 0) to (-1e9, -1e9).
-        introduce Intersect and Union rectangle methods.
-* ld: handle quoted spaces in package path (thanks Dan Sinclair)
-* libcgo: fix NaCl build.
-* libmach: fix build on arm host
-        fix new thread race with Linux
-* math: make portable Tan(Pi/2) return NaN
-* misc/dashboard/builder: gobuilder, a continuous build client
-* net: disable tests for functions not available on windows (thanks Alex Brainman)
-* netchan: make -1 unlimited, as advertised.
-* os, exec: rename argv0 to name
-* path: add IsAbs (thanks Ivan Krasin)
-* runtime: fix bug in tracebacks
-        fix crash trace on amd64
-        fix windows build (thanks Alex Brainman)
-        use manual stack for garbage collection
-* spec: add examples for slices with omitted index expressions.
-        allow omission of low slice bound (thanks Scott Lawrence)
-* syscall: fix windows Gettimeofday (thanks Alex Brainman)
-* test(arm): disable zerodivide.go because compilation fails.
-* test(windows): disable tests that cause the build to fail (thanks Joe Poirier)
-* test/garbage/parser: sync with recent parser changes
-* test: Add test for //line
-        Make gccgo believe that the variables can change.
-        Recognize gccgo error messages.
-        Reduce race conditions in chan/nonblock.go.
-        Run garbage collector before testing malloc numbers.
-* websocket: Add support for secure WebSockets (thanks Jukka-Pekka Kekkonen)
-* windows: disable unimplemented tests (thanks Joe Poirier)
-
- -

2010-09-06

- -
-This release includes the syntactic modernization of more than 100 files in /test,
-and these additions, changes, and fixes: 
-* 6l/8l: emit DWARF in macho.
-* 8g: use FCHS, not FMUL, for minus float.
-* 8l: emit DWARF in ELF,
-        suppress emitting DWARF in Windows PE (thanks Alex Brainman).
-* big: added RatString, some simplifications.
-* build: create bin and pkg directories as needed; drop from hg,
-        delete Make.386 Make.amd64 Make.arm (obsoleted by Make.inc),
-        fix cgo with -j2,
-        let pkg/Makefile coordinate building of Go commands,
-        never use quietgcc in Make.pkg,
-        remove more references to GOBIN and GOROOT (thanks Christian Himpel).
-* codereview: Fix uploading for Mercurial 1.6.3 (thanks Evan Shaw),
-        consistent indent, cut dead code,
-        fix hang on standard hg commands,
-        print status when tasks take longer than 30 seconds,
-        really disable codereview when not available,
-        upload files in parallel (5x improvement on large CLs).
-* crypto/hmac: make Sum idempotent (thanks Jukka-Pekka Kekkonen).
-* doc: add links to more German docs,
-        add round-robin flag to io2010 balance example,
-        fix a bug in the example in Constants subsection (thanks James Fysh),
-        various changes for validating HTML (thanks Scott Lawrence).
-* fmt: delete erroneous sentence about return value for Sprint*.
-* gc: appease bison version running on FreeBSD builder,
-        fix spurious syntax error.
-* go/doc: use correct escaper for URL.
-* go/printer: align ImportPaths in ImportDecls (thanks Scott Lawrence).
-* go/typechecker: 2nd step towards augmenting AST with full type information.
-* gofmt: permit omission of first index in slice expression.
-* goinstall: added -a flag to mean "all remote packages" (thanks Scott Lawrence),
-        assume go binaries are in path (following new convention),
-        use https for Google Code checkouts.
-* gotest: allow make test of cgo packages (without make install).
-* http: add Date to server, Last-Modified and If-Modified-Since to file server,
-        add PostForm function to post url-encoded key/value data,
-        obscure passwords in return value of URL.String (thanks Scott Lawrence).
-* image: introduce Config type and DecodeConfig function.
-* libcgo: update Makefile to use Make.inc.
-* list: update comment to state that the zero value is ready to use.
-* math: amd64 version of Sincos (thanks Charles L. Dorian).
-* misc/bash: add *.go completion for gofmt (thanks Scott Lawrence).
-* misc/emacs: make _ a word symbol (thanks Scott Lawrence).
-* misc: add zsh completion (using compctl),
-        syntax highlighting for Fraise.app (OS X) (thanks Vincent Ambo).
-* net/textproto: Handle multi-line responses (thanks Evan Shaw).
-* net: add LookupMX (thanks Corey Thomasson).
-* netchan: Fix race condition in test,
-        rather than 0, make -1 mean infinite (a la strings.Split et al),
-        use acknowledgements on export send.
-        new methods Sync and Drain for clean teardown.
-* regexp: interpret all Go characer escapes \a \b \f \n \r \t \v.
-* rpc: fix bug that caused private methods to attempt to be registered.
-* runtime: Correct commonType.kind values to match compiler,
-        add GOOS, GOARCH; fix FuncLine,
-        special case copy, equal for one-word interface values (thanks Kyle Consalus).
-* scanner: fix incorrect reporting of error in Next (thanks Kyle Consalus).
-* spec: clarify that arrays must be addressable to be sliceable.
-* template: fix space handling around actions.
-* test/solitaire: an exercise in backtracking and string conversions.
-* test: Recognize gccgo error messages and other fixes.
-* time: do not crash in String on nil Time.
-* tutorial: regenerate HTML to pick up change to progs/file.go.
-* websocket: fix missing Sec-WebSocket-Protocol on server response (thanks Jukka-Pekka Kekkonen).
-
- -

2010-08-25

- -
-This release includes changes to the build system that will likely require you
-to make changes to your environment variables and Makefiles.
-
-All environment variables are now optional:
- - $GOOS and $GOARCH are now optional; their values should now be inferred 
-   automatically by the build system,
- - $GOROOT is now optional, but if you choose not to set it you must run
-   'gomake' instead of 'make' or 'gmake' when developing Go programs
-   using the conventional Makefiles,
- - $GOBIN remains optional and now defaults to $GOROOT/bin;
-   if you wish to use this new default, make sure it is in your $PATH
-   and that you have removed the existing binaries from $HOME/bin.
-
-As a result of these changes, the Go Makefiles have changed. If your Makefiles
-inherit from the Go Makefiles, you must change this line:
-    include ../../Make.$(GOARCH)
-to this:
-    include ../../Make.inc
-
-This release also removes the deprecated functions in regexp and the 
-once package. Any code that still uses them will break.
-See the notes from the last release for details:
-    http://golang.org/doc/devel/release.html#2010-08-11
-
-Other changes:
-* 6g: better registerization for slices, strings, interface values
-* 6l: line number information in DWARF format
-* build: $GOBIN defaults to $GOROOT/bin,
-        no required environment variables
-* cgo: add C.GoStringN (thanks Eric Clark).
-* codereview: fix issues with leading tabs in CL descriptions,
-        do not send "Abandoned" mail if the CL has not been mailed.
-* crypto/ocsp: add missing Makefile.
-* crypto/tls: client certificate support (thanks Mikkel Krautz).
-* doc: update gccgo information for recent changes.
-        fix errors in Effective Go.
-* fmt/print: give %p priority, analogous to %T,
-        honor Formatter in Print, Println.
-* gc: fix parenthesization check.
-* go/ast: facility for printing AST nodes,
-        first step towards augmenting AST with full type information.
-* go/printer: do not modify tabwriter.Escape'd text.
-* gofmt: do not modify multi-line string literals,
-        print AST nodes by setting -ast flag.
-* http: fix typo in http.Request documentation (thanks Scott Lawrence)
-        parse query string always, not just in GET
-* image/png: support 16-bit color.
-* io: ReadAtLeast now errors if min > len(buf).
-* jsonrpc: use `error: null` for success, not `error: ""`.
-* libmach: implement register fetch for 32-bit x86 kernel.
-* net: make IPv6 String method standards-compliant (thanks Mikio Hara).
-* os: FileInfo.Permission() now returns uint32 (thanks Scott Lawrence),
-        implement env using native Windows API (thanks Alex Brainman).
-* reflect: allow PtrValue.PointTo(nil).
-* runtime: correct line numbers for .goc files,
-        fix another stack split bug,
-        fix freebsd/386 mmap.
-* syscall: regenerate syscall/z* files for linux/386, linux/amd64, linux/arm.
-* tabwriter: Introduce a new flag StripEscape.
-* template: fix handling of space around actions,
-        vars preceded by white space parse correctly (thanks Roger Peppe).
-* test: add test case that crashes gccgo.
-* time: parse no longer requires minutes for time zone (thanks Jan H. Hosang)
-* yacc: fix bounds check in error recovery.
-
- -

2010-08-11

- -
-This release introduces some package changes. You may need to change your
-code if you use the once, regexp, image, or exp/draw packages.
-
-The type Once has been added to the sync package. The new sync.Once will
-supersede the functionality provided by the once package. We intend to remove
-the once package after this release. See:
-    http://golang.org/pkg/sync/#Once
-All instances of once in the standard library have been replaced with
-sync.Once. Reviewing these changes may help you modify your existing code. 
-The relevant changeset:
-    http://code.google.com/p/go/source/detail?r=fa2c43595119
-
-A new set of methods has been added to the regular expression package, regexp.
-These provide a uniformly named approach to discovering the matches of an
-expression within a piece of text; see the package documentation for details: 
-    http://golang.org/pkg/regexp/
-These new methods will, in a later release, replace the old methods for
-matching substrings.  The following methods are deprecated:
-    Execute (use FindSubmatchIndex)
-    ExecuteString (use FindStringSubmatchIndex)
-    MatchStrings(use FindStringSubmatch)
-    MatchSlices (use FindSubmatch)
-    AllMatches (use FindAll; note that n<0 means 'all matches'; was n<=0)
-    AllMatchesString (use FindAllString; note that n<0 means 'all matches'; was n<=0)
-(Plus there are ten new methods you didn't know you wanted.) 
-Please update your code to use the new routines before the next release.
-
-An image.Image now has a Bounds rectangle, where previously it ranged 
-from (0, 0) to (Width, Height). Loops that previously looked like:
-    for y := 0; y < img.Height(); y++ {
-        for x := 0; x < img.Width(); x++ {
-            // Do something with img.At(x, y)
-        }
-    }
-should instead be:
-    b := img.Bounds()
-    for y := b.Min.Y; y < b.Max.Y; y++ {
-        for x := b.Min.X; x < b.Max.X; x++ {
-            // Do something with img.At(x, y)
-        }
-    }
-The Point and Rectangle types have also moved from exp/draw to image.
-
-Other changes:
-* arm: bugfixes and syscall (thanks Kai Backman).
-* asn1: fix incorrect encoding of signed integers (thanks Nicholas Waples).
-* big: fixes to bitwise functions (thanks Evan Shaw).
-* bytes: add IndexRune, FieldsFunc and To*Special (thanks Christian Himpel).
-* encoding/binary: add complex (thanks Roger Peppe).
-* exp/iterable: add UintArray (thanks Anschel Schaffer-Cohen).
-* godoc: report Status 404 if a pkg or file is not found.
-* gofmt: better reporting for unexpected semicolon errors.
-* html: new package, an HTML tokenizer.
-* image: change image representation from slice-of-slices to linear buffer,
-        introduce Decode and RegisterFormat,
-        introduce Transparent and Opaque,
-        replace Width and Height by Bounds, add the Point and Rect types.
-* libbio: fix Bprint to address 6g issues with large data structures.
-* math: fix amd64 Hypot (thanks Charles L. Dorian).
-* net/textproto: new package, with example net/dict.
-* os: fix ForkExec() handling of envv == nil (thanks Alex Brainman).
-* png: grayscale support (thanks Mathieu Lonjaret).
-* regexp: document that backslashes are the escape character.
-* rpc: catch errors from ReadResponseBody.
-* runtime: memory free fix (thanks Alex Brainman).
-* template: add ParseFile method to template.Template.
-* test/peano: use directly recursive type def.
-
- -

2010-08-04

- -
-This release includes a change to os.Open (and co.). The file permission
-argument has been changed to a uint32. Your code may require changes - a simple
-conversion operation at most.
-
-Other changes:
-* amd64: use segment memory for thread-local storage.
-* arm: add gdb support to android launcher script,
-        bugfixes (stack clobbering, indices),
-        disable another flaky test,
-        remove old qemu dependency from gotest.
-* bufio: introduce Peek.
-* bytes: added test case for explode with blank string (thanks Scott Lawrence).
-* cgo: correct multiple return value function invocations (thanks Christian Himpel).
-* crypto/x509: unwrap Subject Key Identifier (thanks Adam Langley).
-* gc: index bounds tests and other fixes.
-* gofmt/go/parser: strengthen syntax checks.
-* goinstall: check for error from exec.*Cmd.Wait() (thanks Alex Brainman).
-* image/png: use image-specific methods for checking opacity.
-* image: introduce Gray and Gray16 types,
-        remove the named colors except for Black and White.
-* json: object members must have a value (thanks Anthony Martin).
-* misc/vim: highlight misspelled words only in comments (thanks Christian Himpel).
-* os: Null device (thanks Peter Mundy).
-* runtime: do not fall through in SIGBUS/SIGSEGV.
-* strings: fix Split("", "", -1) (thanks Scott Lawrence).
-* syscall: make go errors not clash with windows errors (thanks Alex Brainman).
-* test/run: diff old new,
-* websocket: correct challenge response (thanks Tarmigan Casebolt),
-        fix bug involving spaces in header keys (thanks Bill Neubauer). 
-
- -

2010-07-29

- -
-* 5g: more soft float support and several bugfixes.
-* asn1: Enumerated, Flag and GeneralizedTime support.
-* build: clean.bash to check that GOOS and GOARCH are set.
-* bytes: add IndexFunc and LastIndexFunc (thanks Fazlul Shahriar),
-	add Title.
-* cgo: If CC is set in environment, use it rather than "gcc",
-	use new command line syntax: -- separates cgo flags from gcc flags.
-* codereview: avoid crash if no config,
-	don't run gofmt with an empty file list,
-	make 'hg submit' work with Mercurial 1.6.
-* crypto/ocsp: add package to parse OCSP responses.
-* crypto/tls: add client-side SNI support and PeerCertificates.
-* exp/bignum: delete package - functionality subsumed by package big.
-* fmt.Print: fix bug in placement of spaces introduced when ...T went in.
-* fmt.Scanf: handle trailing spaces.
-* gc: fix smaller-than-pointer-sized receivers in interfaces,
-	floating point precision/normalization fixes,
-	graceful exit on seg fault,
-	import dot shadowing bug,
-	many fixes including better handling of invalid input,
-	print error detail about failure to open import.
-* gccgo_install.html: add description of the port to RTEMS (thanks Vinu Rajashekhar).
-* gobs: fix bug in singleton arrays.
-* godoc: display synopses for all packages that have some kind of documentation..
-* gofmt: fix some linebreak issues.
-* http: add https client support (thanks Fazlul Shahriar),
-	write body when content length unknown (thanks James Whitehead).
-* io: MultiReader and MultiWriter (thanks Brad Fitzpatrick),
-	fix another race condition in Pipes.
-* ld: many fixes including better handling of invalid input.
-* libmach: correct handling of .5 files with D_REGREG addresses.
-* linux/386: use Xen-friendly ELF TLS instruction sequence.
-* mime: add AddExtensionType (thanks Yuusei Kuwana).
-* misc/vim: syntax file recognizes constants like 1e9 (thanks Petar Maymounkov).
-* net: TCPConn.SetNoDelay, back by popular demand.
-* net(windows): fix crashing Read/Write when passed empty slice on (thanks Alex Brainman),
-	implement LookupHost/Port/SRV (thanks Wei Guangjing),
-	properly handle EOF in (*netFD).Read() (thanks Alex Brainman).
-* runtime: fix bug introduced in revision 4a01b8d28570 (thanks Alex Brainman),
-	rename cgo2c, *.cgo to goc2c, *.goc (thanks Peter Mundy).
-* scanner: better comment.
-* strings: add Title.
-* syscall: add ForkExec, Syscall12 on Windows (thanks Daniel Theophanes),
-	improve windows errno handling (thanks Alex Brainman).
-* syscall(windows): fix FormatMessage (thanks Peter Mundy),
-	implement Pipe() (thanks Wei Guangjing).
-* time: fix parsing of minutes in time zones.
-* utf16(windows): fix cyclic dependency when testing (thanks Peter Mundy).
-
- -

2010-07-14

- -
-This release includes a package change. In container/vector, the Iter method
-has been removed from the Vector, IntVector, and StringVector types. Also, the
-Data method has been renamed to Copy to better express its actual behavior.
-Now that Vector is just a slice, any for loops ranging over v.Iter() or
-v.Data() can be changed to range over v instead.
-
-Other changes:
-* big: Improvements to Rat.SetString (thanks Evan Shaw),
-        add sign, abs, Rat.IsInt.
-* cgo: various bug fixes.
-* codereview: Fix for Mercurial >= 1.6 (thanks Evan Shaw).
-* crypto/rand: add Windows implementation (thanks Peter Mundy).
-* crypto/tls: make HTTPS servers easier,
-        add client OCSP stapling support.
-* exp/eval: converted from bignum to big (thanks Evan Shaw).
-* gc: implement new len spec, range bug fix, optimization.
-* go/parser: require that '...' parameters are followed by a type.
-* http: fix ParseURL to handle //relative_path properly.
-* io: fix SectionReader Seek to seek backwards (thanks Peter Mundy).
-* json: Add HTMLEscape (thanks Micah Stetson).
-* ld: bug fixes.
-* math: amd64 version of log (thanks Charles L. Dorian).
-* mime/multipart: new package to parse multipart MIME messages
-        and HTTP multipart/form-data support.
-* os: use TempFile with default TempDir for test files (thanks Peter Mundy).
-* runtime/tiny: add docs for additional VMs, fix build (thanks Markus Duft).
-* runtime: better error for send/recv on nil channel.
-* spec: clarification of channel close(),
-        lock down some details about channels and select,
-        restrict when len(x) is constant,
-        specify len/cap for nil slices, maps, and channels.
-* windows: append .exe to binary names (thanks Joe Poirier).
-
- -

2010-07-01

- -
-This release includes some package changes that may require changes to 
-client code.
-
-The Split function in the bytes and strings packages has been changed.
-The count argument, which limits the size of the return, previously treated
-zero as unbounded. It now treats 0 as 0, and will return an empty slice.  
-To request unbounded results, use -1 (or some other negative value).
-The new Replace functions in bytes and strings share this behavior.
-This may require you change your existing code.
-
-The gob package now allows the transmission of non-struct values at the
-top-level. As a result, the rpc and netchan packages have fewer restrictions
-on the types they can handle.  For example, netchan can now share a chan int.
-
-The release also includes a Code Walk: "Share Memory By Communicating".
-It describes an idiomatic Go program that uses goroutines and channels:
-	http://golang.org/doc/codewalk/sharemem/
-
-There is now a Projects page on the Go Dashboard that lists Go programs, 
-tools, and libraries:
-	http://godashboard.appspot.com/project
-
-Other changes:
-* 6a, 6l: bug fixes.
-* bytes, strings: add Replace.
-* cgo: use slash-free relative paths for .so references.
-* cmath: correct IsNaN for argument cmplx(Inf, NaN) (thanks Charles L. Dorian).
-* codereview: allow multiple email addresses in CONTRIBUTORS.
-* doc/codewalk: add Share Memory By Communicating.
-* exp/draw/x11: implement the mapping from keycodes to keysyms.
-* fmt: Printf: fix bug in handling of %#v, allow other verbs for slices
-        Scan: fix handling of EOFs.
-* gc: bug fixes and optimizations.
-* gob: add DecodeValue and EncodeValue,
-        add support for complex numbers.
-* goinstall: support for Bazaar+Launchpad (thanks Gustavo Niemeyer).
-* io/ioutil: add TempFile for Windows (thanks Peter Mundy).
-* ld: add -u flag to check safe bits; discard old -u, -x flags.
-* math: amd64 versions of Exp and Fabs (thanks Charles L. Dorian).
-* misc/vim: always override filetype detection for .go files.
-* net: add support for DNS SRV requests (thanks Kirklin McDonald),
-        initial attempt to implement Windows version (thanks Alex Brainman).
-* netchan: allow chan of basic types now that gob can handle such,
-        eliminate the need for a pointer value in Import and Export.
-* os/signal: only catch all signals if os/signal package imported.
-* regexp: bug fix: need to track whether match begins with fixed prefix.
-* rpc: allow non-struct args and reply (they must still be pointers).
-* runtime: bug fixes and reorganization.
-* strconv: fix bugs in floating-point and base 2 conversions
-* syscall: add syscall_bsd.go to zsycall_freebsd_386.go (thanks Peter Mundy),
-        add socketpair (thanks Ivan Krasin).
-* time: implement time zones for Windows (thanks Alex Brainman).
-* x509: support non-self-signed certs. 
-
- -

2010-06-21

- -
-This release includes a language change. The "..." function parameter form is
-gone; "...T" remains. Typically, "...interface{}" can be used instead of "...".
-
-The implementation of Printf has changed in a way that subtly affects its
-handling of the fmt.Stringer interface. You may need to make changes to your
-code. For details, see:
-        https://groups.google.com/group/golang-nuts/msg/6fffba90a3e3dc06
-
-The reflect package has been changed. If you have code that uses reflect, 
-it will need to be updated. For details, see:
-        https://groups.google.com/group/golang-nuts/msg/7a93d07c590e7beb
-
-Other changes:
-* 8l: correct test for sp == top of stack in 8l -K code.
-* asn1: allow '*' in PrintableString.
-* bytes.Buffer.ReadFrom: fix bug.
-* codereview: avoid exception in match (thanks Paolo Giarrusso).
-* complex divide: match C99 implementation.
-* exp/draw: small draw.drawGlyphOver optimization.
-* fmt: Print*: reimplement to switch on type first,
-        Scanf: improve error message when input does not match format.
-* gc: better error messages for interface failures, conversions, undefined symbols.
-* go/scanner: report illegal escape sequences.
-* gob: substitute slice for map.
-* goinstall: process dependencies for package main (thanks Roger Peppe).
-* gopack: add S flag to force marking a package as safe,
-        simplify go metadata code.
-* html: sync testdata/webkit to match WebKit tip.
-* http: reply to Expect 100-continue requests automatically (thanks Brad Fitzpatrick).
-* image: add an Alpha16 type.
-* ld: pad Go symbol table out to page boundary (fixes cgo crash).
-* misc/vim: reorganize plugin to be easier to use (thanks James Whitehead).
-* path: add Base, analogous to Unix basename.
-* pkg/Makefile: allow DISABLE_NET_TESTS=1 to disable network tests.
-* reflect: add Kind, Type.Bits, remove Int8Type, Int8Value, etc.
-* runtime: additional Windows support (thanks Alex Brainman),
-        correct fault for 16-bit divide on Leopard,
-        fix 386 signal handler bug.
-* strconv: add AtofN, FtoaN.
-* string: add IndexFunc and LastIndexFunc (thanks Roger Peppe).
-* syslog: use local network for tests. 
-
- -

2010-06-09

- -
-This release contains many fixes and improvements, including several
-clarifications and consolidations to the Language Specification.
-
-The type checking rules around assignments and conversions are simpler but more
-restrictive: assignments no longer convert implicitly from *[10]int to []int
-(write x[0:] instead of &x), and conversions can no longer change the names of
-types inside composite types.
-
-The fmt package now includes flexible type-driven (fmt.Scan) and 
-format-driven (fmt.Scanf) scanners for all basic types.
-
-* big: bug fix for Quo aliasing problem.
-* bufio: change ReadSlice to match description.
-* cgo: bug fixes.
-* doc: add Google I/O talk and programs,
-        codereview + Mercurial Queues info (thanks Peter Williams).
-* exp/draw: Draw fast paths for the Over operator,
-        add Rectangle.Eq and Point.In, fix Rectangle.Clip (thanks Roger Peppe).
-* fmt: Scan fixes and improvements.
-* gc: backslash newline is not a legal escape sequence in strings,
-        better error message when ~ operator is found,
-        fix export of complex types,
-        new typechecking rules.
-* go/parser: correct position of empty statement ';'.
-* gofmt: fix test script.
-* goinstall: use 'git pull' instead of 'git checkout' (thanks Michael Hoisie).
-* http: add Head function for making HTTP HEAD requests,
-        handle status 304 correctly.
-* image: add Opaque method to the image types.
-        make Color.RGBA return 16 bit color instead of 32 bit color.
-* io/ioutil: add TempFile.
-* math: Pow special cases and additional tests (thanks Charles L. Dorian).
-* netchan: improve closing and shutdown.
-* os: implement os.FileInfo.*time_ns for windows (thanks Alex Brainman).
-* os/signal: correct the regexp for finding Unix signal names (thanks Vinu Rajashekhar).
-* regexp: optimizations (thanks Kyle Consalus).
-* runtime: fix printing -Inf (thanks Evan Shaw),
-        finish pchw -> tiny, added gettime for tiny (thanks Daniel Theophanes).
-* spec: clean-ups and consolidation.
-* syscall: additional Windows compatibility fixes (thanks Alex Brainman).
-* test/bench: added regex-dna-parallel.go (thanks Kyle Consalus).
-* vector: type-specific Do functions now take f(type) (thanks Michael Hoisie). 
-
- -

2010-05-27

- -
-A sizeable release, including standard library improvements and a slew of
-compiler bug fixes. The three-week interval was largely caused by the team
-preparing for Google I/O. 
-
-* big: add Rat type (thanks Evan Shaw),
-        new features, much performance tuning, cleanups, and more tests.
-* bignum: deprecate by moving into exp directory.
-* build: allow MAKEFLAGS to be set outside the build scripts (thanks Christopher Wedgwood).
-* bytes: add Trim, TrimLeft, TrimRight, and generic functions (thanks Michael Hoisie).
-* cgo: fix to permit cgo callbacks from init code.
-* cmath: update range of Phase and Polar due to signed zero (thanks Charles L. Dorian).
-* codereview: work better with mq (thanks Peter Williams).
-* compress: renamings
-	NewDeflater -> NewWriter
-	NewInflater -> NewReader
-	Deflater -> Compressor
-	Inflater -> Decompressor
-* exp/draw/x11: respect $XAUTHORITY,
-        treat $DISPLAY the same way x-go-bindings does.
-* exp/draw: fast path for glyph images, other optimizations,
-        fix Rectangle.Canon (thanks Roger Peppe).
-* fmt: Scan, Scanln: Start of a simple scanning API in the fmt package,
-        fix Printf crash when given an extra nil argument (thanks Roger Peppe).
-* gc: better error when computing remainder of non-int (thanks Evan Shaw),
-        disallow middot in Go programs,
-        distinguish array, slice literal in error messages,
-        fix shift/reduce conflict in go.y export syntax,
-        fix unsafe.Sizeof on ideal constants,
-        handle use of builtin function outside function call,
-        many other bug fixes.
-* gob: add support for maps,
-        add test for indirect maps, slices, arrays.
-* godoc: collect package comments from all package files.
-* gofmt: don't lose mandatory semicolons,
-        exclude test w/ illegal syntax from test cases,
-        fix printing of labels.
-* http: prevent crash if remote server is not responding with "HTTP/".
-* json: accept escaped slash in string scanner (thanks Michael Hoisie),
-        fix array -> non-array decoding.
-* libmach: skip __nl_symbol_ptr section on OS X.
-* math: amd64 versions of Fdim, Fmax, Fmin,
-        signed zero Sqrt special case (thanks Charles L. Dorian).
-* misc/kate: convert isn't a built in function (thanks Evan Shaw).
-* net: implement BindToDevice,
-        implement raw sockets (thanks Christopher Wedgwood).
-* netFD: fix race between Close and Read/Write (thanks Michael Hoisie).
-* os: add Chtimes function (thanks Brad Fitzpatrick).
-* pkg/Makefile: add netchan to standard package list.
-* runtime: GOMAXPROCS returns previous value,
-        allow large map values,
-        avoid allocation for fixed strings,
-        correct tracebacks for nascent goroutines, even closures,
-        free old hashmap pieces during resizing.
-* spec: added imaginary literal to semicolon rules (was missing),
-        fix and clarify syntax of conversions,
-        simplify section on channel types,
-        other minor tweaks.
-* strconv: Btoui64 optimizations (thanks Kyle Consalus).
-* strings: use copy instead of for loop in Map (thanks Kyle Consalus).
-* syscall: implement BindToDevice (thanks Christopher Wedgwood),
-        add Utimes on Darwin/FreeBSD, add Futimes everywhere,
-        regenerate syscalls for some platforms.
-* template: regularize name lookups of interfaces, pointers, and methods.
-
- -

2010-05-04

- -
-In this release we renamed the Windows OS target from 'mingw' to 'windows'.
-If you are currently building for 'mingw' you should set GOOS=windows instead.
-
-* 5l, 6l, 8l, runtime: make -s binaries work.
-* 5l, 6l, 8l: change ELF header so that strip doesn't destroy binary.
-* 8l: fix absolute path detection on Windows.
-* big: new functions, optimizations, and cleanups,
-	add bitwise methods for Int (thanks Evan Shaw).
-* bytes: Change IndexAny to look for UTF-8 encoded characters.
-* darwin: bsdthread_create can fail; print good error.
-* fmt: %T missing print <nil> for nil (thanks Christopher Wedgwood).
-* gc: many fixes.
-* misc/cgo/gmp: fix bug in SetString.
-* net: fix resolv.conf EOF without newline bug (thanks Christopher Wedgwood).
-* spec: some small clarifications (no language changes).
-* syscall: add EWOULDBLOCK to sycall_nacl.go,
-	force O_LARGEFILE in Linux open system call,
-	handle EOF on pipe - special case on Windows (thanks Alex Brainman),
-	mingw Sleep (thanks Joe Poirier).
-* test/bench: import new fasta C reference, update Go, optimizations.
-* test: test of static initialization (fails).
-* vector: use correct capacity in call to make.
-* xml: allow text segments to end at EOF.
-
- -

2010-04-27

- -
-This release includes a new Codelab that illustrates the construction of a
-simple wiki web application: 
-	http://golang.org/doc/codelab/wiki/
-
-It also includes a Codewalk framework for documenting code. See:
-	http://golang.org/doc/codewalk/
-
-Other changes:
-* 6g: fix need for parens around array index expression.
-* 6l, 8l: include ELF header in PT_LOAD mapping for text segment.
-* arm: add android runner script,
-	support for printing floats.
-* big: implemented Karatsuba multiplication,
-	many fixes and improvements (thanks Evan Shaw).
-* bytes: add Next method to Buffer, simplify Read,
-	shuffle implementation, making WriteByte 50% faster.
-* crypto/tls: simpler implementation of record layer.
-* exp/eval: fixes (thanks Evan Shaw).
-* flag: eliminate unnecessary structs.
-* gc: better windows support,
-	cmplx typecheck bug fix,
-	more specific error for statements at top level.
-* go/parser: don't require unnecessary parens.
-* godoc: exclude duplicate entries (thanks Andrei Vieru),
-	use int64 for timestamps (thanks Christopher Wedgwood).
-* gofmt: fine-tune stripping of parentheses,
-* json: Marshal, Unmarshal using new scanner,
-	preserve field name case by default,
-	scanner, Compact, Indent, and tests,
-	support for streaming.
-* libmach: disassemble MOVLQZX correctly.
-* math: more special cases for signed zero (thanks Charles L. Dorian).
-* net: add Pipe,
-	fix bugs in packStructValue (thanks Michael Hoisie),
-	introduce net.Error interface.
-* os: FileInfo: regularize the types of some fields,
-	create sys_bsd.go (thanks Giles Lean),
-	mingw bug fixes (thanks Alex Brainman).
-* reflect: add FieldByNameFunc (thanks Raif S. Naffah),
-	implement Set(nil), SetValue(nil) for PtrValue and MapValue.
-* regexp: allow escaping of any punctuation.
-* rpc/jsonrpc: support for jsonrpc wire encoding.
-* rpc: abstract client and server encodings,
-	add Close() method to rpc.Client.
-* runtime: closures, defer bug fix for Native Client,
-	rename cgo2c, *.cgo to goc2c, *.goc to avoid confusion with real cgo.
-	several other fixes.
-* scanner: implement Peek() to look at the next char w/o advancing.
-* strings: add ReadRune to Reader, add FieldsFunc (thanks Kyle Consalus).
-* syscall: match linux Setsid function signature to darwin,
-	mingw bug fixes (thanks Alex Brainman).
-* template: fix handling of pointer inside interface.
-* test/bench: add fannkuch-parallel.go (thanks Kyle Consalus),
-	pidigits ~10% performance win by using adds instead of shifts.
-* time: remove incorrect time.ISO8601 and add time.RFC3339 (thanks Micah Stetson).
-* utf16: add DecodeRune, EncodeRune.
-* xml: add support for XML marshalling embedded structs (thanks Raif S. Naffah),
-	new "innerxml" tag to collect inner XML.
-
- -

2010-04-13

- -
-This release contains many changes:
-
-* 8l: add DOS stub to PE binaries (thanks Evan Shaw).
-* cgo: add //export.
-* cmath: new complex math library (thanks Charles L. Dorian).
-* docs: update to match current coding style (thanks Christopher Wedgwood).
-* exp/eval: fix example and add target to Makefile (thanks Evan Shaw).
-* fmt: change behaviour of format verb %b to match %x when negative (thanks Andrei Vieru).
-* gc: compile s == "" as len(s) == 0,
-	distinguish fatal compiler bug from error+exit,
-	fix alignment on non-amd64,
-	good syntax error for defer func() {} - missing fina (),
-	implement panic and recover,
-	zero unnamed return values on entry if func has defer.
-* goyacc: change to be reentrant (thanks Roger Peppe).
-* io/ioutil: fix bug in ReadFile when Open succeeds but Stat fails.
-* kate: update for recent language changes (thanks Evan Shaw).
-* libcgo: initial mingw port work - builds but untested (thanks Joe Poirier).
-* math: new functions and special cases (thanks Charles L. Dorian) 
-* net: use chan bool instead of chan *netFD to avoid cycle.
-* netchan: allow client to send as well as receive.
-* nntp: new package, NNTP client (thanks Conrad Meyer).
-* os: rename os.Dir to os.FileInfo.
-* rpc: don't log normal EOF,
-	fix ServeConn to block as documented.
-* runtime: many bug fixes, better ARM support.
-* strings: add IndexRune, Trim, TrimLeft, TrimRight, etc (thanks Michael Hoisie).
-* syscall: implement some mingw syscalls required by os (thanks Alex Brainman).
-* test/bench: add k-nucleotide-parallel (thanks Kyle Consalus).
-* Unicode: add support for Turkish case mapping.
-* xgb: move from the main repository to http://code.google.com/p/x-go-binding/
-
- -

2010-03-30

- -
-This release contains three language changes:
-
-1. Accessing a non-existent key in a map is no longer a run-time error.  
-It now evaluates to the zero value for that type.  For example:
-        x := myMap[i]   is now equivalent to:   x, _ := myMap[i]
-
-2. It is now legal to take the address of a function's return value.  
-The return values are copied back to the caller only after deferred
-functions have run.
-
-3. The functions panic and recover, intended for reporting and recovering from
-failure, have been added to the spec:
-	http://golang.org/doc/go_spec.html#Handling_panics 
-In a related change, panicln is gone, and panic is now a single-argument
-function.  Panic and recover are recognized by the gc compilers but the new
-behavior is not yet implemented.
-
-The ARM build is broken in this release; ARM users should stay at release.2010-03-22.
-
-Other changes:
-* bytes, strings: add IndexAny.
-* cc/ld: Add support for #pragma dynexport,
-        Rename dynld to dynimport throughout. Cgo users will need to rerun cgo.
-* expvar: default publishings for cmdline, memstats
-* flag: add user-defined flag types.
-* gc: usual bug fixes
-* go/ast: generalized ast filtering.
-* go/printer: avoid reflect in print.
-* godefs: fix handling of negative constants.
-* godoc: export pprof debug information, exported variables,
-        support for filtering of command-line output in -src mode,
-        use http GET for remote search instead of rpc.
-* gofmt: don't convert multi-line functions into one-liners,
-        preserve newlines in multiline selector expressions (thanks Risto Jaakko Saarelma).
-* goinstall: include command name in error reporting (thanks Andrey Mirtchovski)
-* http: add HandleFunc as shortcut to Handle(path, HandlerFunc(func))
-* make: use actual dependency for install
-* math: add J1, Y1, Jn, Yn, J0, Y0 (Bessel functions) (thanks Charles L. Dorian)
-* prof: add pprof from google-perftools
-* regexp: don't return non-nil *Regexp if there is an error.
-* runtime: add Callers,
-        add malloc sampling, pprof interface,
-        add memory profiling, more statistics to runtime.MemStats,
-        implement missing destroylock() (thanks Alex Brainman),
-        more malloc statistics,
-        run all finalizers in a single goroutine,
-        Goexit runs deferred calls.
-* strconv: add Atob and Btoa,
-        Unquote could wrongly return a nil error on error (thanks Roger Peppe).
-* syscall: add IPV6 constants,
-        add syscall_bsd.go for Darwin and other *BSDs (thanks Giles Lean),
-        implement SetsockoptString (thanks Christopher Wedgwood).
-* websocket: implement new protocol (thanks Fumitoshi Ukai).
-* xgb: fix request length and request size (thanks Firmansyah Adiputra).
-* xml: add CopyToken (thanks Kyle Consalus),
-        add line numbers to syntax errors (thanks Kyle Consalus),
-        use io.ReadByter in place of local readByter (thanks Raif S. Naffah). 
-
- -

2010-03-22

- -
-With this release we announce the launch of the Go Blog:
-	http://blog.golang.org/
-The first post is a brief update covering what has happened since the launch.
-
-This release contains some new packages and functionality, and many fixes:
-* 6g/8g: fix issues with complex data types, other bug fixes.
-* Makefiles: refactored to make writing external Makefiles easier.
-* crypto/rand: new package.
-* godoc: implemented command-line search via RPC,
-	improved comment formatting: recognize URLs.
-* gofmt: more consistent formatting of const/var decls.
-* http: add Error helper function,
-	add ParseQuery (thanks Petar Maymounkov),
-	change RawPath to mean raw path, not raw everything-after-scheme.
-* image/jpeg: fix typos.
-* json: add MarshalIndent (accepts user-specified indent string).
-* math: add Gamma function (thanks Charles L. Dorian).
-* misc/bbedit: support for cmplx, real, imag (thanks Anthony Starks).
-* misc/vim: add new complex types, functions and literals.
-* net: fix IPMask.String not to crash on all-0xff mask.
-* os: drop File finalizer after normal Close.
-* runtime: add GOROOT and Version,
-	lock finalizer table accesses.
-* sha512: add sha384 (truncated version) (thanks Conrad Meyer).
-* syscall: add const ARCH, analogous to OS.
-* syscall: further additions to mingw port (thanks Alex Brainman).
-* template: fixed html formatter []byte input bug.
-* utf16: new package.
-* version.bash: cope with ancient Mercurial.
-* websocket: use URL.RawPath to construct WebSocket-Location: header.
-
- -

2010-03-15

- -
-This release includes a language change: support for complex numbers.
-	http://golang.org/doc/go_spec.html#Imaginary_literals
-	http://golang.org/doc/go_spec.html#Complex_numbers
-There is no library support as yet.
-
-This release also includes the goinstall command-line tool. 
-	http://golang.org/cmd/goinstall/
-	http://groups.google.com/group/golang-nuts/t/f091704771128e32
-
-* 5g/6g/8g: fix double function call in slice.
-* arm: cleanup build warnings. (thanks Dean Prichard)
-* big: fix mistakes with probablyPrime.
-* bufio: add WriteRune.
-* bytes: add ReadRune and WriteRune to bytes.Buffer.
-* cc: stack split bug fix.
-* crypto: add SHA-224 to sha256, add sha512 package. (thanks Conrad Meyer)
-* crypto/ripemd160: new package. (thanks Raif S. Naffah)
-* crypto/rsa: don't use safe primes.
-* gc: avoid fixed length buffer cleanbuf. (thanks Dean Prichard)
-	better compilation of floating point +=
-	fix crash on complicated arg to make slice.
-	remove duplicate errors, give better error for I.(T)
-* godoc: support for multiple packages in a directory, other fixes.
-* gofmt: bug fixes.
-* hash: add Sum64 interface.
-* hash/crc32: add Update function.
-* hash/crc64: new package implementing 64-bit CRC.
-* math: add ilogb, logb, remainder. (thanks Charles L. Dorian) 
-* regexp: add ReplaceAllFunc, ReplaceAllStringFunc.
-* runtime: clock garbage collection on bytes allocated, not pages in use.
-* strings: make Split(s, "", n) faster. (thanks Spring Mc)
-* syscall: minimal mingw version of syscall. (thanks Alex Brainman)
-* template: add ParseFile, MustParseFile.
-
- -

2010-03-04

- -
-There is one language change: the ability to convert a string to []byte or 
-[]int.  This deprecates the strings.Bytes and strings.Runes functions.
-You can convert your existing sources using these gofmt commands:
-	gofmt -r 'strings.Bytes(x) -> []byte(x)' -w file-or-directory-list
-	gofmt -r 'strings.Runes(x) -> []int(x)' -w file-or-directory-list
-After running these you might need to delete unused imports of the "strings" 
-package.
-
-Other changes and fixes:
-* 6l/8l/5l: add -r option
-* 8g: make a[byte(x)] truncate x
-* codereview.py: fix for compatibility with hg >=1.4.3
-* crypto/blowfish: new package (thanks Raif S. Naffah)
-* dashboard: more performance tuning
-* fmt: use String method in %q to get the value to quote.
-* gofmt: several cosmetic changes
-* http: fix handling of Connection: close, bug in http.Post
-* net: correct DNS configuration,
-	fix network timeout boundary condition,
-	put [ ] around IPv6 addresses for Dial.
-* path: add Match,
-	fix bug in Match with non-greedy stars (thanks Kevin Ballard)
-* strings: delete Bytes, Runes (see above)
-* tests: an Eratosthenesque concurrent prime sieve (thanks Anh Hai Trinh) 
-
- -

2010-02-23

- -
-This release is mainly bug fixes and a little new code.
-There are no language changes.
-
-6g/5g/8g: bug fixes
-8a/8l: Added FCMOVcc instructions (thanks Evan Shaw and Charles Dorian)
-crypto/x509: support certificate creation
-dashboard: caching to avoid datastore queries
-exec: add dir argument to Run
-godoc: bug fixes and code cleanups
-http: continued implementation and bug fixes (thanks Petar Maymounkov)
-json: fix quoted strings in Marshal (thanks Sergei Skorobogatov)
-math: more functions, test cases, and benchmarks (thanks Charles L. Dorian)
-misc/bbedit: treat predeclared identifiers as "keywords" (thanks Anthony Starks)
-net: disable UDP server test (flaky on various architectures)
-runtime: work around Linux kernel bug in futex,
-	pchw is now tiny
-sync: fix to work on armv5 (thanks Dean Prichard)
-websocket: fix binary frame size decoding (thanks Timo Savola)
-xml: allow unquoted attribute values in non-Strict mode (thanks Amrut Joshi)
-	treat bool as value in Unmarshal (thanks Michael Hoisie) 
-
- -

2010-02-17

- -
-There are two small language changes:
-* NUL bytes may be rejected in souce files, and the tools do reject them.
-* Conversions from string to []int and []byte are defined but not yet implemented.
-
-Other changes and fixes:
-* 5a/6a/8a/5c/6c/8c: remove fixed-size arrays for -I and -D options (thanks Dean Prichard)
-* 5c/6c/8c/5l/6l/8l: add -V flag to display version number
-* 5c/6c/8c: use "cpp" not "/bin/cpp" for external preprocessor (thanks Giles Lean)
-* 8a/8l: Added CMOVcc instructions (thanks Evan Shaw)
-* 8l: pe executable building code changed to include import table for kernel32.dll functions (thanks Alex Brainman)
-* 5g/6g/8g: bug fixes
-* asn1: bug fixes and additions (incl marshalling)
-* build: fix build for Native Client, Linux/ARM
-* dashboard: show benchmarks, add garbage collector benchmarks
-* encoding/pem: add marshalling support
-* exp/draw: fast paths for a nil mask
-* godoc: support for directories outside $GOROOT
-* http: sort header keys when writing Response or Request to wire (thanks Petar Maymounkov)
-* math: special cases and new functions (thanks Charles Dorian)
-* mime: new package, used in http (thanks Michael Hoisie)
-* net: dns bug fix - use random request id
-* os: finalize File, to close fd.
-* path: make Join variadic (thanks Stephen Weinberg)
-* regexp: optimization bug fix
-* runtime: misc fixes and optimizations
-* syscall: make signature of Umask on OS X, FreeBSD match Linux. (thanks Giles Lean)
-
- -

2010-02-04

- -
-There is one language change: support for ...T parameters:
-	http://golang.org/doc/go_spec.html#Function_types
-
-You can now check build status on various platforms at the Go Dashboard: 
-	http://godashboard.appspot.com
-
-* 5l/6l/8l: several minor fixes
-* 5a/6a/8a/5l/6l/8l: avoid overflow of symb buffer (thanks Dean Prichard)
-* compress/gzip: gzip deflater (i.e., writer)
-* debug/proc: add mingw specific build stubs (thanks Joe Poirier)
-* exp/draw: separate the source-point and mask-point in Draw
-* fmt: handle nils safely in Printf
-* gccgo: error messages now match those of gc
-* godoc: several fixes
-* http: bug fixes, revision of Request/Response (thanks Petar Maymounkov)
-* image: new image.A type to represent anti-aliased font glyphs
-	add named colors (e.g. image.Blue), suitable for exp/draw
-* io: fixed bugs in Pipe
-* malloc: merge into package runtime
-* math: fix tests on FreeBSD (thanks Devon H. O'Dell)
-	add functions; update tests and special cases (thanks Charles L. Dorian)
-* os/signal: send SIGCHLDs to Incoming (thanks Chris Wedgwood)
-* reflect: add StringHeader to reflect
-* runtime: add SetFinalizer
-* time: Sleep through interruptions (thanks Chris Wedgwood)
-	add RFC822 formats
-	experimental implemenation of Ticker using two goroutines for all tickers
-* xml: allow underscores in XML element names (thanks Michael Hoisie)
-	allow any scalar type in xml.Unmarshal
-
- -

2010-01-27

- -
-There are two small language changes: the meaning of chan <- chan int
-is now defined, and functions returning functions do not need to 
-parenthesize the result type.
-
-There is one significant implementation change: the compilers can
-handle multiple packages using the same name in a single binary.
-In the gc compilers, this comes at the cost of ensuring that you
-always import a particular package using a consistent import path.
-In the gccgo compiler, the cost is that you must use the -fgo-prefix
-flag to pass a unique prefix (like the eventual import path).
-
-5a/6a/8a: avoid use of fixed-size buffers (thanks Dean Prichard)
-5g, 6g, 8g: many minor bug fixes
-bufio: give Writer.WriteString same signature as bytes.Buffer.WriteString.
-container/list: PushFrontList, PushBackList (thanks Jan Hosang)
-godoc: trim spaces from search query (thanks Christopher Wedgwood)
-hash: document that Sum does not change state, fix crypto hashes
-http: bug fixes, revision of Request/Response (thanks Petar Maymounkov)
-math: more handling of IEEE 754 special cases (thanks Charles Dorian)
-misc/dashboard: new build dashboard
-net: allow UDP broadcast,
-	use /etc/hosts to resolve names (thanks Yves Junqueira, Michael Hoisie)
-netchan: beginnings of new package for connecting channels across a network
-os: allow FQDN in Hostname test (thanks Icarus Sparry)
-reflect: garbage collection bug in Call
-runtime: demo of Go on raw (emulated) hw in runtime/pchw,
-	performance fix on OS X
-spec: clarify meaning of chan <- chan int,
-	func() func() int is allowed now,
-	define ... T (not yet implemented)
-template: can use interface values
-time: fix for +0000 time zone,
-	more robust tick.Stop.
-xgb: support for authenticated connections (thanks Firmansyah Adiputra)
-xml: add Escape (thanks Stephen Weinberg)
-
- -

2010-01-13

- -
-This release is mainly bug fixes with a little new code.
-There are no language changes.
-
-build: $GOBIN should no longer be required in $PATH (thanks Devon H. O'Dell),
-	new package target "make bench" to run benchmarks
-8g: faster float -> uint64 conversion (thanks Evan Shaw)
-5g, 6g, 8g:
-	clean opnames.h to avoid stale errors (thanks Yongjian Xu),
-	a handful of small compiler fixes
-5g, 6g, 8g, 5l, 6l, 8l: ignore $GOARCH, which is implied by name of tool
-6prof: support for writing input files for google-perftools's pprof
-asn1: fix a few structure-handling bugs
-cgo: many bug fixes (thanks Devon H. O'Dell)
-codereview: repeated "hg mail" sends "please take another look"
-gob: reserve ids for future expansion
-godoc: distinguish HTML generation from plain text HTML escaping (thanks Roger Peppe)
-gofmt: minor bug fixes, removed -oldprinter flag
-http: add CanonicalPath (thanks Ivan Krasin),
-	avoid header duplication in Response.Write,
-	correctly escape/unescape URL sections
-io: new interface ReadByter
-json: better error, pointer handling in Marshal (thanks Ivan Krasin)
-libmach: disassembly of FUCOMI, etc (thanks Evan Shaw)
-math: special cases for most functions and 386 hardware Sqrt (thanks Charles Dorian)
-misc/dashboard: beginning of a build dashboard at godashboard.appspot.com.
-misc/emacs: handling of new semicolon rules (thanks Austin Clements),
-	empty buffer bug fix (thanks Kevin Ballard)
-misc/kate: highlighting improvements (tahnks Evan Shaw)
-os/signal: add signal names: signal.SIGHUP, etc (thanks David Symonds)
-runtime: preliminary Windows support (thanks Hector Chu),
-	preemption polling to reduce garbage collector pauses
-scanner: new lightweight scanner package
-template: bug fix involving spaces before a delimited block
-test/bench: updated timings
-time: new Format, Parse functions
-
- -

2010-01-05

- -
-This release is mainly bug fixes.  There are no language changes.
-
-6prof: now works on 386
-8a, 8l: add FCOMI, FCOMIP, FUCOMI, and FUCOMIP (thanks Evan Shaw)
-big: fix ProbablyPrime on small numbers
-container/vector: faster []-based implementation (thanks Jan Mercl)
-crypto/tls: extensions and Next Protocol Negotiation
-gob: one encoding bug fix, one decoding bug fix
-image/jpeg: support for RST markers
-image/png: support for transparent paletted images
-misc/xcode: improved support (thanks Ken Friedenbach)
-net: return nil Conn on error from Dial (thanks Roger Peppe)
-regexp: add Regexp.NumSubexp (thanks Peter Froehlich)
-syscall: add Nanosleep on FreeBSD (thanks Devon H. O'Dell)
-template: can use map in .repeated section
-
-There is now a public road map, in the repository and online
-at http://golang.org/doc/devel/roadmap.html.
-
- -

2009-12-22

- -
-Since the last release there has been one large syntactic change to
-the language, already discussed extensively on this list: semicolons
-are now implied between statement-ending tokens and newline characters.
-See http://groups.google.com/group/golang-nuts/t/5ee32b588d10f2e9 for
-details.
-
-By default, gofmt now parses and prints the new lighter weight syntax.
-To convert programs written in the old syntax, you can use:
-
-	gofmt -oldparser -w *.go
-
-Since everything was being reformatted anyway, we took the opportunity to
-change the way gofmt does alignment.  Now gofmt uses tabs at the start
-of a line for basic code alignment, but it uses spaces for alignment of
-interior columns.  Thus, in an editor with a fixed-width font, you can
-choose your own tab size to change the indentation, and no matter what
-tab size you choose, columns will be aligned properly.
-
-
-In addition to the syntax and formatting changes, there have been many
-smaller fixes and updates:
-
-6g,8g,5g: many bug fixes, better registerization,
-   build process fix involving mkbuiltin (thanks Yongjian Xu),
-   method expressions for concrete types
-8l: support for Windows PE files (thanks Hector Chu)
-bytes: more efficient Buffer handling
-bytes, strings: new function Fields (thanks Andrey Mirtchovski)
-cgo: handling of enums (thanks Moriyoshi Koizumi),
-    handling of structs with bit fields, multiple files (thanks Devon H. O'Dell),
-    installation of .so to non-standard locations
-crypto/sha256: new package for SHA 256 (thanks Andy Davis)
-encoding/binary: support for slices of fixed-size values (thanks Maxim Ushakov)
-exp/vector: experimental alternate vector representation (thanks Jan Mercl)
-fmt: %p for chan, map, slice types
-gob: a couple more bug fixes
-http: support for basic authentication (thanks Ivan Krasin)
-image/jpeg: basic JPEG decoder
-math: correct handling of Inf and NaN in Pow (thanks Charles Dorian)
-misc/bash: completion file for bash (thanks Alex Ray)
-os/signal: support for handling Unix signals (thanks David Symonds)
-rand: Zipf-distributed random values (thanks William Josephson)
-syscall: correct error return bug on 32-bit machines (thanks Christopher Wedgwood)
-syslog: new package for writing to Unix syslog daemon (thanks Yves Junqueira)
-template: will automatically invoke niladic methods
-time: new ISO8601 format generator (thanks Ben Olive)
-xgb: converted generator to new syntax (thanks Tor Andersson)
-xml: better mapping of tag names to Go identifiers (thanks Kei Son),
-    better handling of unexpected EOF (thanks Arvindh Rajesh Tamilmani)
-
- -

2009-12-09

- -
-Since the last release there are two changes to the language: 
-
-* new builtin copy(dst, src) copies n = min(len(dst), len(src)) 
-  elements to dst from src and returns n.  It works correctly 
-  even if dst and src overlap.  bytes.Copy is gone. 
-  Convert your programs using: 
-      gofmt -w -r 'bytes.Copy(d, s) -> copy(d, s)' *.go 
-
-* new syntax x[lo:] is shorthand for x[lo:len(x)]. 
-  Convert your programs using: 
-      gofmt -w -r 'a[b:len(a)] -> a[b:]' *.go 
-
-In addition, there have been many smaller fixes and updates: 
-
-* 6g/8g/5g: many bug fixes 
-* 8g: fix 386 floating point stack bug (thanks Charles Dorian) 
-* all.bash: now works even when $GOROOT has spaces (thanks Sergio Luis O. B. Correia), 
-    starting to make build work with mingw (thanks Hector Chu), 
-    FreeBSD support (thanks Devon O'Dell) 
-* big: much faster on 386. 
-* bytes: new function IndexByte, implemented in assembly 
-    new function Runes (thanks Peter Froehlich), 
-    performance tuning in bytes.Buffer. 
-* codereview: various bugs fixed 
-* container/vector: New is gone; just declare a Vector instead. 
-    call Resize to set len and cap. 
-* cgo: many bug fixes (thanks Eden Li) 
-* crypto: added MD4 (thanks Chris Lennert), 
-    added XTEA (thanks Adrian O'Grady). 
-* crypto/tls: basic client 
-* exp/iterable: new functions (thanks Michael Elkins) 
-* exp/nacl: native client tree builds again 
-* fmt: preliminary performance tuning 
-* go/ast: more powerful Visitor (thanks Roger Peppe) 
-* gob: a few bug fixes 
-* gofmt: better handling of standard input, error reporting (thanks Fazlul Shahriar) 
-    new -r flag for rewriting programs 
-* gotest: support for Benchmark functions (thanks Trevor Strohman) 
-* io: ReadFile, WriteFile, ReadDir now in separate package io/ioutil. 
-* json: new Marshal function (thanks Michael Hoisie), 
-    better white space handling (thanks Andrew Skiba), 
-    decoding into native data structures (thanks Sergey Gromov), 
-    handling of nil interface values (thanks Ross Light). 
-* math: correct handling of sin/cos of large angles 
-* net: better handling of Close (thanks Devon O'Dell and Christopher Wedgwood) 
-    support for UDP broadcast (thanks Jonathan Wills), 
-    support for empty packets 
-* rand: top-level functions now safe to call from multiple goroutines 
-(thanks Roger Peppe). 
-* regexp: a few easy optimizations 
-* rpc: better error handling, a few bug fixes 
-* runtime: better signal handling on OS X, malloc fixes, 
-    global channel lock is gone. 
-* sync: RWMutex now allows concurrent readers (thanks Péter Szabó) 
-* template: can use maps as data (thanks James Meneghello) 
-* unicode: updated to Unicode 5.2. 
-* websocket: new package (thanks Fumitoshi Ukai) 
-* xgb: preliminary X Go Bindings (thanks Tor Andersson) 
-* xml: fixed crash (thanks Vish Subramanian) 
-* misc: bbedit config (thanks Anthony Starks), 
-    kate config (thanks Evan Shaw) 
-
diff --git a/doc/install.html b/doc/install.html index 2256123ec..b98941691 100644 --- a/doc/install.html +++ b/doc/install.html @@ -136,7 +136,7 @@ and make sure the go directory does not exist. Then check out the repository:

-$ hg clone -u release https://go.googlecode.com/hg/ go
+$ hg clone -r release https://go.googlecode.com/hg/ go
 

Install Go

diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 36d7df199..bfa69fcc0 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -112,7 +112,6 @@ defaultcc = None contributors = {} missing_codereview = None real_rollback = None -releaseBranch = None ####################################################################### # RE: UNICODE STRING HANDLING @@ -1050,7 +1049,7 @@ def change(ui, repo, *pats, **opts): if missing_codereview: return missing_codereview - + dirty = {} if len(pats) > 0 and GoodCLName(pats[0]): name = pats[0] @@ -1063,8 +1062,6 @@ def change(ui, repo, *pats, **opts): if not cl.local and (opts["stdin"] or not opts["stdout"]): return "cannot change non-local CL " + name else: - if repo[None].branch() != "default": - return "cannot run hg change outside default branch" name = "new" cl = CL("new") dirty[cl] = True @@ -1157,9 +1154,7 @@ def clpatch(ui, repo, clname, **opts): Submitting an imported patch will keep the original author's name as the Author: line but add your own name to a Committer: line. """ - if repo[None].branch() != "default": - return "cannot run hg clpatch outside default branch" - return clpatch_or_undo(ui, repo, clname, opts, mode="clpatch") + return clpatch_or_undo(ui, repo, clname, opts) def undo(ui, repo, clname, **opts): """undo the effect of a CL @@ -1168,66 +1163,7 @@ def undo(ui, repo, clname, **opts): After creating the CL, opens the CL text for editing so that you can add the reason for the undo to the description. """ - if repo[None].branch() != "default": - return "cannot run hg undo outside default branch" - return clpatch_or_undo(ui, repo, clname, opts, mode="undo") - -def release_apply(ui, repo, clname, **opts): - """apply a CL to the release branch - - Creates a new CL copying a previously committed change - from the main branch to the release branch. - The current client must either be clean or already be in - the release branch. - - The release branch must be created by starting with a - clean client, disabling the code review plugin, and running: - - hg update weekly.YYYY-MM-DD - hg branch release-branch.rNN - hg commit -m 'create release-branch.rNN' - hg push --new-branch - - Then re-enable the code review plugin. - - People can test the release branch by running - - hg update release-branch.rNN - - in a clean client. To return to the normal tree, - - hg update default - - Move changes since the weekly into the release branch - using hg release-apply followed by the usual code review - process and hg submit. - - When it comes time to tag the release, record the - final long-form tag of the release-branch.rNN - in the *default* branch's .hgtags file. That is, run - - hg update default - - and then edit .hgtags as you would for a weekly. - - """ - c = repo[None] - if not releaseBranch: - return "no active release branches" - if c.branch() != releaseBranch: - if c.modified() or c.added() or c.removed(): - raise util.Abort("uncommitted local changes - cannot switch branches") - err = hg.clean(repo, releaseBranch) - if err: - return err - try: - err = clpatch_or_undo(ui, repo, clname, opts, mode="backport") - if err: - raise util.Abort(err) - except Exception, e: - hg.clean(repo, "default") - raise e - return None + return clpatch_or_undo(ui, repo, clname, opts, undo=True) def rev2clname(rev): # Extract CL name from revision description. @@ -1249,24 +1185,15 @@ undoFooter = """ »»» """ -backportHeader = """[%s] %s - -««« CL %s / %s -""" - -backportFooter = """ -»»» -""" - # Implementation of clpatch/undo. -def clpatch_or_undo(ui, repo, clname, opts, mode): +def clpatch_or_undo(ui, repo, clname, opts, undo=False): if missing_codereview: return missing_codereview - if mode == "undo" or mode == "backport": + if undo: if hgversion < '1.4': # Don't have cmdutil.match (see implementation of sync command). - return "hg is too old to run hg %s - update to 1.4 or newer" % mode + return "hg is too old to run hg undo - update to 1.4 or newer" # Find revision in Mercurial repository. # Assume CL number is 7+ decimal digits. @@ -1300,19 +1227,8 @@ def clpatch_or_undo(ui, repo, clname, opts, mode): # Create fresh CL and start with patch that would reverse the change. vers = short(rev.node()) cl = CL("new") - desc = rev.description() - if mode == "undo": - cl.desc = (undoHeader % (clname, vers)) + desc + undoFooter - else: - cl.desc = (backportHeader % (releaseBranch, line1(desc), clname, vers)) + desc + undoFooter - v1 = vers - v0 = short(rev.parents()[0].node()) - if mode == "undo": - arg = v1 + ":" + v0 - else: - vers = v0 - arg = v0 + ":" + v1 - patch = RunShell(["hg", "diff", "--git", "-r", arg]) + cl.desc = (undoHeader % (clname, vers)) + rev.description() + undoFooter + patch = RunShell(["hg", "diff", "--git", "-r", vers + ":" + short(rev.parents()[0].node())]) else: # clpatch cl, vers, patch, err = DownloadCL(ui, repo, clname) @@ -1333,10 +1249,10 @@ def clpatch_or_undo(ui, repo, clname, opts, mode): if id != vers: patch, err = portPatch(repo, patch, vers, id) if err != "": - return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id) + return "codereview issue %s is out of date: %s" % (clname, err) argv = ["hgpatch"] - if opts["no_incoming"] or mode == "backport": + if opts["no_incoming"]: argv += ["--checksync=false"] try: cmd = subprocess.Popen(argv, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None, close_fds=sys.platform != "win32") @@ -1355,7 +1271,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode): if extra: ui.warn("warning: these files were listed in the patch but not changed:\n\t" + "\n\t".join(extra) + "\n") cl.Flush(ui, repo) - if mode == "undo": + if undo: err = EditCL(ui, repo, cl) if err != "": return "CL created, but error editing: " + err @@ -1590,7 +1506,7 @@ def reposetup(ui, repo): def CheckContributor(ui, repo, user=None): set_status("checking CONTRIBUTORS file") - user, userline = FindContributor(ui, repo, user, warn=False) + _, userline = FindContributor(ui, repo, user, warn=False) if not userline: raise util.Abort("cannot find %s in CONTRIBUTORS" % (user,)) return userline @@ -1608,7 +1524,7 @@ def FindContributor(ui, repo, user=None, warn=True): if user not in contributors: if warn: ui.warn("warning: cannot find %s in CONTRIBUTORS\n" % (user,)) - return user, None + return None, None user, email = contributors[user] return email, "%s <%s>" % (user, email) @@ -1734,14 +1650,6 @@ def submit(ui, repo, *pats, **opts): if not cl.copied_from: EditDesc(cl.name, closed=True, private=cl.private) cl.Delete(ui, repo) - - c = repo[None] - if c.branch() == releaseBranch and not c.modified() and not c.added() and not c.removed(): - ui.write("switching from %s to default branch.\n" % releaseBranch) - err = hg.clean(repo, "default") - if err: - return err - return None def sync(ui, repo, **opts): """synchronize with remote repository @@ -1914,15 +1822,6 @@ cmdtable = { ] + commands.walkopts, "[-r reviewer] [--cc cc] [change# | file ...]" ), - "^release-apply": ( - release_apply, - [ - ('', 'ignore_hgpatch_failure', None, 'create CL metadata even if hgpatch fails'), - ('', 'no_incoming', None, 'disable check for incoming changes'), - ], - "change#" - ), - # TODO: release-start, release-tag, weekly-tag "^submit": ( submit, review_opts + [ @@ -2364,19 +2263,6 @@ def RietveldSetup(ui, repo): upload_options.email = "test@example.com" rpc = None - - global releaseBranch - tags = repo.branchtags().keys() - if 'release-branch.r100' in tags: - # NOTE(rsc): This tags.sort is going to get the wrong - # answer when comparing release-branch.r99 with - # release-branch.r100. If we do ten releases a year - # that gives us 4 years before we have to worry about this. - raise util.Abort('tags.sort needs to be fixed for release-branch.r100') - tags.sort() - for t in tags: - if t.startswith('release-branch.'): - releaseBranch = t ####################################################################### # http://codereview.appspot.com/static/upload.py, heavily edited. diff --git a/src/Make.cmd b/src/Make.cmd index 26c3ca2fc..e769e3072 100644 --- a/src/Make.cmd +++ b/src/Make.cmd @@ -25,7 +25,7 @@ _go_.$O: $(GOFILES) $(PREREQ) install: $(TARGDIR)/$(TARG) $(TARGDIR)/$(TARG): $(TARG) - mkdir -p $(TARGDIR) && cp -f $(TARG) $(TARGDIR) + cp -f $(TARG) $(TARGDIR) CLEANFILES+=$(TARG) _test _testmain.go diff --git a/src/cmd/5a/lex.c b/src/cmd/5a/lex.c index a04cda220..dbee3657f 100644 --- a/src/cmd/5a/lex.c +++ b/src/cmd/5a/lex.c @@ -50,7 +50,7 @@ void main(int argc, char *argv[]) { char *p; - int c; + int nout, nproc, i, c; thechar = '5'; thestring = "arm"; @@ -94,10 +94,46 @@ main(int argc, char *argv[]) print("usage: %ca [-options] file.s\n", thechar); errorexit(); } - if(argc > 1){ - print("can't assemble multiple files\n"); + if(argc > 1 && systemtype(Windows)){ + print("can't assemble multiple files on windows\n"); errorexit(); } + if(argc > 1 && !systemtype(Windows)) { + nproc = 1; + if(p = getenv("NPROC")) + nproc = atol(p); /* */ + c = 0; + nout = 0; + for(;;) { + Waitmsg *w; + + while(nout < nproc && argc > 0) { + i = fork(); + if(i < 0) { + fprint(2, "fork: %r\n"); + errorexit(); + } + if(i == 0) { + print("%s:\n", *argv); + if(assemble(*argv)) + errorexit(); + exits(0); + } + nout++; + argc--; + argv++; + } + w = wait(); + if(w == nil) { + if(c) + errorexit(); + exits(0); + } + if(w->msg[0]) + c++; + nout--; + } + } if(assemble(argv[0])) errorexit(); exits(0); @@ -106,7 +142,7 @@ main(int argc, char *argv[]) int assemble(char *file) { - char *ofile, *p; + char *ofile, incfile[20], *p; int i, of; ofile = alloc(strlen(file)+3); // +3 for .x\0 (x=thechar) @@ -131,6 +167,15 @@ assemble(char *file) } else outfile = "/dev/null"; } + p = getenv("INCLUDE"); + if(p) { + setinclude(p); + } else { + if(systemtype(Plan9)) { + sprint(incfile,"/%s/include", thestring); + setinclude(strdup(incfile)); + } + } of = create(outfile, OWRITE, 0664); if(of < 0) { diff --git a/src/cmd/6a/lex.c b/src/cmd/6a/lex.c index b4c7d0c2c..37144c888 100644 --- a/src/cmd/6a/lex.c +++ b/src/cmd/6a/lex.c @@ -56,7 +56,7 @@ void main(int argc, char *argv[]) { char *p; - int c; + int nout, nproc, i, c; thechar = '6'; thestring = "amd64"; @@ -96,10 +96,46 @@ main(int argc, char *argv[]) print("usage: %ca [-options] file.s\n", thechar); errorexit(); } - if(argc > 1){ - print("can't assemble multiple files\n"); + if(argc > 1 && systemtype(Windows)){ + print("can't assemble multiple files on windows\n"); errorexit(); } + if(argc > 1 && !systemtype(Windows)) { + nproc = 1; + if(p = getenv("NPROC")) + nproc = atol(p); /* */ + c = 0; + nout = 0; + for(;;) { + Waitmsg *w; + + while(nout < nproc && argc > 0) { + i = fork(); + if(i < 0) { + fprint(2, "fork: %r\n"); + errorexit(); + } + if(i == 0) { + print("%s:\n", *argv); + if(assemble(*argv)) + errorexit(); + exits(0); + } + nout++; + argc--; + argv++; + } + w = wait(); + if(w == nil) { + if(c) + errorexit(); + exits(0); + } + if(w->msg[0]) + c++; + nout--; + } + } if(assemble(argv[0])) errorexit(); exits(0); @@ -108,7 +144,7 @@ main(int argc, char *argv[]) int assemble(char *file) { - char *ofile, *p; + char *ofile, incfile[20], *p; int i, of; ofile = alloc(strlen(file)+3); // +3 for .x\0 (x=thechar) @@ -133,6 +169,15 @@ assemble(char *file) } else outfile = "/dev/null"; } + p = getenv("INCLUDE"); + if(p) { + setinclude(p); + } else { + if(systemtype(Plan9)) { + sprint(incfile,"/%s/include", thestring); + setinclude(strdup(incfile)); + } + } of = create(outfile, OWRITE, 0664); if(of < 0) { diff --git a/src/cmd/8a/lex.c b/src/cmd/8a/lex.c index 078861877..ca18b69ce 100644 --- a/src/cmd/8a/lex.c +++ b/src/cmd/8a/lex.c @@ -56,7 +56,7 @@ void main(int argc, char *argv[]) { char *p; - int c; + int nout, nproc, i, c; thechar = '8'; thestring = "386"; @@ -96,10 +96,46 @@ main(int argc, char *argv[]) print("usage: %ca [-options] file.s\n", thechar); errorexit(); } - if(argc > 1){ - print("can't assemble multiple files\n"); + if(argc > 1 && systemtype(Windows)){ + print("can't assemble multiple files on windows\n"); errorexit(); } + if(argc > 1 && !systemtype(Windows)) { + nproc = 1; + if(p = getenv("NPROC")) + nproc = atol(p); /* */ + c = 0; + nout = 0; + for(;;) { + Waitmsg *w; + + while(nout < nproc && argc > 0) { + i = fork(); + if(i < 0) { + fprint(2, "fork: %r\n"); + errorexit(); + } + if(i == 0) { + print("%s:\n", *argv); + if(assemble(*argv)) + errorexit(); + exits(0); + } + nout++; + argc--; + argv++; + } + w = wait(); + if(w == nil) { + if(c) + errorexit(); + exits(0); + } + if(w->msg[0]) + c++; + nout--; + } + } if(assemble(argv[0])) errorexit(); exits(0); @@ -108,7 +144,7 @@ main(int argc, char *argv[]) int assemble(char *file) { - char *ofile, *p; + char *ofile, incfile[20], *p; int i, of; ofile = alloc(strlen(file)+3); // +3 for .x\0 (x=thechar) @@ -133,6 +169,15 @@ assemble(char *file) } else outfile = "/dev/null"; } + p = getenv("INCLUDE"); + if(p) { + setinclude(p); + } else { + if(systemtype(Plan9)) { + sprint(incfile,"/%s/include", thestring); + setinclude(strdup(incfile)); + } + } of = create(outfile, OWRITE, 0664); if(of < 0) { diff --git a/src/cmd/cc/lex.c b/src/cmd/cc/lex.c index 71cc89bf0..dba8ff634 100644 --- a/src/cmd/cc/lex.c +++ b/src/cmd/cc/lex.c @@ -88,7 +88,7 @@ void main(int argc, char *argv[]) { char **defs, *p; - int c, ndef; + int nproc, nout, i, c, ndef; ensuresymb(NSYMB); memset(debug, 0, sizeof(debug)); @@ -142,10 +142,51 @@ main(int argc, char *argv[]) print("usage: %cc [-options] files\n", thechar); errorexit(); } - if(argc > 1){ - print("can't compile multiple files\n"); + if(argc > 1 && systemtype(Windows)){ + print("can't compile multiple files on windows\n"); errorexit(); } + if(argc > 1 && !systemtype(Windows)) { + nproc = 1; + /* + * if we're writing acid to standard output, don't compile + * concurrently, to avoid interleaving output. + */ + if(((!debug['a'] && !debug['q'] && !debug['Q']) || debug['n']) && + (p = getenv("NPROC")) != nil) + nproc = atol(p); /* */ + c = 0; + nout = 0; + for(;;) { + Waitmsg *w; + + while(nout < nproc && argc > 0) { + i = fork(); + if(i < 0) { + print("cannot create a process\n"); + errorexit(); + } + if(i == 0) { + fprint(2, "%s:\n", *argv); + if (compile(*argv, defs, ndef)) + errorexit(); + exits(0); + } + nout++; + argc--; + argv++; + } + w = wait(); + if(w == nil) { + if(c) + errorexit(); + exits(0); + } + if(w->msg[0]) + c++; + nout--; + } + } if(argc == 0) c = compile("stdin", defs, ndef); @@ -160,7 +201,7 @@ main(int argc, char *argv[]) int compile(char *file, char **defs, int ndef) { - char *ofile; + char *ofile, incfile[20]; char *p, **av, opt[256]; int i, c, fd[2]; static int first = 1; @@ -195,6 +236,15 @@ compile(char *file, char **defs, int ndef) outfile = "/dev/null"; } + if(p = getenv("INCLUDE")) { + setinclude(p); + } else { + if(systemtype(Plan9)) { + sprint(incfile, "/%s/include", thestring); + setinclude(strdup(incfile)); + setinclude("/sys/include"); + } + } if (first) Binit(&diagbuf, 1, OWRITE); /* diff --git a/src/cmd/prof/gopprof b/src/cmd/prof/gopprof index 8863fc623..8fa00cbe8 100755 --- a/src/cmd/prof/gopprof +++ b/src/cmd/prof/gopprof @@ -2880,18 +2880,17 @@ sub FetchSymbols { my @toask = @pcs; while (@toask > 0) { my $n = @toask; - # NOTE(rsc): Limiting the number of PCs requested per round - # used to be necessary, but I think it was a bug in - # debug/pprof/symbol's implementation. Leaving here - # in case I am wrong. - # if ($n > 49) { $n = 49; } + if ($n > 49) { $n = 49; } my @thisround = @toask[0..$n]; +my $t = @toask; +print STDERR "$n $t\n"; @toask = @toask[($n+1)..(@toask-1)]; my $post_data = join("+", sort((map {"0x" . "$_"} @thisround))); open(POSTFILE, ">$main::tmpfile_sym"); print POSTFILE $post_data; close(POSTFILE); +print STDERR "SYMBL!\n"; my $url = SymbolPageURL(); $url = ResolveRedirectionForCurl($url); my $command_line = "$CURL -sd '\@$main::tmpfile_sym' '$url'"; diff --git a/src/pkg/compress/flate/deflate.go b/src/pkg/compress/flate/deflate.go index a02a5e8d9..e5b2beaef 100644 --- a/src/pkg/compress/flate/deflate.go +++ b/src/pkg/compress/flate/deflate.go @@ -143,18 +143,10 @@ func (d *compressor) fillWindow(index int) (int, os.Error) { d.blockStart = math.MaxInt32 } for i, h := range d.hashHead { - v := h - wSize - if v < -1 { - v = -1 - } - d.hashHead[i] = v + d.hashHead[i] = max(h-wSize, -1) } for i, h := range d.hashPrev { - v := -h - wSize - if v < -1 { - v = -1 - } - d.hashPrev[i] = v + d.hashPrev[i] = max(h-wSize, -1) } } count, err := d.r.Read(d.window[d.windowEnd:]) @@ -185,18 +177,10 @@ func (d *compressor) writeBlock(tokens []token, index int, eof bool) os.Error { // Try to find a match starting at index whose length is greater than prevSize. // We only look at chainCount possibilities before giving up. func (d *compressor) findMatch(pos int, prevHead int, prevLength int, lookahead int) (length, offset int, ok bool) { - minMatchLook := maxMatchLength - if lookahead < minMatchLook { - minMatchLook = lookahead - } - - win := d.window[0 : pos+minMatchLook] + win := d.window[0 : pos+min(maxMatchLength, lookahead)] // We quit when we get a match that's at least nice long - nice := len(win) - pos - if d.niceMatch < nice { - nice = d.niceMatch - } + nice := min(d.niceMatch, len(win)-pos) // If we've got a match that's good enough, only look in 1/4 the chain. tries := d.maxChainLength @@ -360,12 +344,9 @@ Loop: } prevLength := length prevOffset := offset + minIndex := max(index-maxOffset, 0) length = minMatchLength - 1 offset = 0 - minIndex := index - maxOffset - if minIndex < 0 { - minIndex = 0 - } if chainHead >= minIndex && (isFastDeflate && lookahead > minMatchLength-1 || diff --git a/src/pkg/http/pprof/pprof.go b/src/pkg/http/pprof/pprof.go index 917c7f877..bc79e2183 100644 --- a/src/pkg/http/pprof/pprof.go +++ b/src/pkg/http/pprof/pprof.go @@ -26,7 +26,6 @@ package pprof import ( "bufio" - "bytes" "fmt" "http" "os" @@ -89,14 +88,10 @@ func Profile(w http.ResponseWriter, r *http.Request) { func Symbol(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain; charset=utf-8") - // We have to read the whole POST body before - // writing any output. Buffer the output here. - var buf bytes.Buffer - // We don't know how many symbols we have, but we // do have symbol information. Pprof only cares whether // this number is 0 (no symbols available) or > 0. - fmt.Fprintf(&buf, "num_symbols: 1\n") + fmt.Fprintf(w, "num_symbols: 1\n") var b *bufio.Reader if r.Method == "POST" { @@ -114,19 +109,14 @@ func Symbol(w http.ResponseWriter, r *http.Request) { if pc != 0 { f := runtime.FuncForPC(uintptr(pc)) if f != nil { - fmt.Fprintf(&buf, "%#x %s\n", pc, f.Name()) + fmt.Fprintf(w, "%#x %s\n", pc, f.Name()) } } // Wait until here to check for err; the last // symbol will have an err because it doesn't end in +. if err != nil { - if err != os.EOF { - fmt.Fprintf(&buf, "reading request: %v\n", err) - } break } } - - w.Write(buf.Bytes()) } diff --git a/src/pkg/http/transfer.go b/src/pkg/http/transfer.go index 0fa8bed43..98c32bab6 100644 --- a/src/pkg/http/transfer.go +++ b/src/pkg/http/transfer.go @@ -439,29 +439,9 @@ type body struct { hdr interface{} // non-nil (Response or Request) value means read trailer r *bufio.Reader // underlying wire-format reader for the trailer closing bool // is the connection to be closed after reading body? - closed bool -} - -// ErrBodyReadAfterClose is returned when reading a Request Body after -// the body has been closed. This typically happens when the body is -// read after an HTTP Handler calls WriteHeader or Write on its -// ResponseWriter. -var ErrBodyReadAfterClose = os.NewError("http: invalid Read on closed request Body") - -func (b *body) Read(p []byte) (n int, err os.Error) { - if b.closed { - return 0, ErrBodyReadAfterClose - } - return b.Reader.Read(p) } func (b *body) Close() os.Error { - if b.closed { - return nil - } - defer func() { - b.closed = true - }() if b.hdr == nil && b.closing { // no trailer and closing the connection next. // no point in reading to EOF. diff --git a/src/pkg/image/image.go b/src/pkg/image/image.go index 222d21ade..5f398a304 100644 --- a/src/pkg/image/image.go +++ b/src/pkg/image/image.go @@ -51,13 +51,6 @@ func (p *RGBA) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toRGBAColor(c).(RGBAColor) } -func (p *RGBA) SetRGBA(x, y int, c RGBAColor) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *RGBA) Opaque() bool { if p.Rect.Empty() { @@ -110,13 +103,6 @@ func (p *RGBA64) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toRGBA64Color(c).(RGBA64Color) } -func (p *RGBA64) SetRGBA64(x, y int, c RGBA64Color) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *RGBA64) Opaque() bool { if p.Rect.Empty() { @@ -169,13 +155,6 @@ func (p *NRGBA) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toNRGBAColor(c).(NRGBAColor) } -func (p *NRGBA) SetNRGBA(x, y int, c NRGBAColor) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *NRGBA) Opaque() bool { if p.Rect.Empty() { @@ -228,13 +207,6 @@ func (p *NRGBA64) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toNRGBA64Color(c).(NRGBA64Color) } -func (p *NRGBA64) SetNRGBA64(x, y int, c NRGBA64Color) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *NRGBA64) Opaque() bool { if p.Rect.Empty() { @@ -280,20 +252,13 @@ func (p *Alpha) At(x, y int) Color { return p.Pix[y*p.Stride+x] } -func (p *Alpha) Set(x, y int, c AlphaColor) { +func (p *Alpha) Set(x, y int, c Color) { if !p.Rect.Contains(Point{x, y}) { return } p.Pix[y*p.Stride+x] = toAlphaColor(c).(AlphaColor) } -func (p *Alpha) SetAlpha(x, y int, c AlphaColor) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *Alpha) Opaque() bool { if p.Rect.Empty() { @@ -346,13 +311,6 @@ func (p *Alpha16) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toAlpha16Color(c).(Alpha16Color) } -func (p *Alpha16) SetAlpha16(x, y int, c Alpha16Color) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *Alpha16) Opaque() bool { if p.Rect.Empty() { @@ -405,13 +363,6 @@ func (p *Gray) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toGrayColor(c).(GrayColor) } -func (p *Gray) SetGray(x, y int, c GrayColor) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *Gray) Opaque() bool { return true @@ -450,13 +401,6 @@ func (p *Gray16) Set(x, y int, c Color) { p.Pix[y*p.Stride+x] = toGray16Color(c).(Gray16Color) } -func (p *Gray16) SetGray16(x, y int, c Gray16Color) { - if !p.Rect.Contains(Point{x, y}) { - return - } - p.Pix[y*p.Stride+x] = c -} - // Opaque scans the entire image and returns whether or not it is fully opaque. func (p *Gray16) Opaque() bool { return true diff --git a/src/pkg/image/jpeg/writer.go b/src/pkg/image/jpeg/writer.go index 52b3dc4e2..505cce04f 100644 --- a/src/pkg/image/jpeg/writer.go +++ b/src/pkg/image/jpeg/writer.go @@ -391,31 +391,6 @@ func toYCbCr(m image.Image, p image.Point, yBlock, cbBlock, crBlock *block) { } } -// rgbaToYCbCr is a specialized version of toYCbCr for image.RGBA images. -func rgbaToYCbCr(m *image.RGBA, p image.Point, yBlock, cbBlock, crBlock *block) { - b := m.Bounds() - xmax := b.Max.X - 1 - ymax := b.Max.Y - 1 - for j := 0; j < 8; j++ { - sj := p.Y + j - if sj > ymax { - sj = ymax - } - yoff := sj * m.Stride - for i := 0; i < 8; i++ { - sx := p.X + i - if sx > xmax { - sx = xmax - } - col := &m.Pix[yoff+sx] - yy, cb, cr := ycbcr.RGBToYCbCr(col.R, col.G, col.B) - yBlock[8*j+i] = int(yy) - cbBlock[8*j+i] = int(cb) - crBlock[8*j+i] = int(cr) - } - } -} - // scale scales the 16x16 region represented by the 4 src blocks to the 8x8 // dst block. func scale(dst *block, src *[4]block) { @@ -456,18 +431,13 @@ func (e *encoder) writeSOS(m image.Image) { prevDCY, prevDCCb, prevDCCr int ) bounds := m.Bounds() - rgba, _ := m.(*image.RGBA) for y := bounds.Min.Y; y < bounds.Max.Y; y += 16 { for x := bounds.Min.X; x < bounds.Max.X; x += 16 { for i := 0; i < 4; i++ { xOff := (i & 1) * 8 yOff := (i & 2) * 4 p := image.Point{x + xOff, y + yOff} - if rgba != nil { - rgbaToYCbCr(rgba, p, &yBlock, &cbBlock[i], &crBlock[i]) - } else { - toYCbCr(m, p, &yBlock, &cbBlock[i], &crBlock[i]) - } + toYCbCr(m, p, &yBlock, &cbBlock[i], &crBlock[i]) prevDCY = e.writeBlock(&yBlock, 0, prevDCY) } scale(&cBlock, &cbBlock) diff --git a/src/pkg/image/jpeg/writer_test.go b/src/pkg/image/jpeg/writer_test.go index 7aec70f01..00922dd5c 100644 --- a/src/pkg/image/jpeg/writer_test.go +++ b/src/pkg/image/jpeg/writer_test.go @@ -8,8 +8,6 @@ import ( "bytes" "image" "image/png" - "io/ioutil" - "rand" "os" "testing" ) @@ -87,29 +85,3 @@ func TestWriter(t *testing.T) { } } } - -func BenchmarkEncodeRGBOpaque(b *testing.B) { - b.StopTimer() - img := image.NewRGBA(640, 480) - // Set all pixels to 0xFF alpha to force opaque mode. - bo := img.Bounds() - rnd := rand.New(rand.NewSource(123)) - for y := bo.Min.Y; y < bo.Max.Y; y++ { - for x := bo.Min.X; x < bo.Max.X; x++ { - img.Set(x, y, image.RGBAColor{ - uint8(rnd.Intn(256)), - uint8(rnd.Intn(256)), - uint8(rnd.Intn(256)), - 255}) - } - } - if !img.Opaque() { - panic("expected image to be opaque") - } - b.SetBytes(640 * 480 * 4) - b.StartTimer() - options := &Options{Quality: 90} - for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img, options) - } -} diff --git a/src/pkg/image/png/reader.go b/src/pkg/image/png/reader.go index 8c76afa72..b30a951c1 100644 --- a/src/pkg/image/png/reader.go +++ b/src/pkg/image/png/reader.go @@ -378,7 +378,7 @@ func (d *decoder) idatReader(idat io.Reader) (image.Image, os.Error) { for x := 0; x < d.width; x += 8 { b := cdat[x/8] for x2 := 0; x2 < 8 && x+x2 < d.width; x2++ { - gray.SetGray(x+x2, y, image.GrayColor{(b >> 7) * 0xff}) + gray.Set(x+x2, y, image.GrayColor{(b >> 7) * 0xff}) b <<= 1 } } @@ -386,7 +386,7 @@ func (d *decoder) idatReader(idat io.Reader) (image.Image, os.Error) { for x := 0; x < d.width; x += 4 { b := cdat[x/4] for x2 := 0; x2 < 4 && x+x2 < d.width; x2++ { - gray.SetGray(x+x2, y, image.GrayColor{(b >> 6) * 0x55}) + gray.Set(x+x2, y, image.GrayColor{(b >> 6) * 0x55}) b <<= 2 } } @@ -394,22 +394,22 @@ func (d *decoder) idatReader(idat io.Reader) (image.Image, os.Error) { for x := 0; x < d.width; x += 2 { b := cdat[x/2] for x2 := 0; x2 < 2 && x+x2 < d.width; x2++ { - gray.SetGray(x+x2, y, image.GrayColor{(b >> 4) * 0x11}) + gray.Set(x+x2, y, image.GrayColor{(b >> 4) * 0x11}) b <<= 4 } } case cbG8: for x := 0; x < d.width; x++ { - gray.SetGray(x, y, image.GrayColor{cdat[x]}) + gray.Set(x, y, image.GrayColor{cdat[x]}) } case cbGA8: for x := 0; x < d.width; x++ { ycol := cdat[2*x+0] - nrgba.SetNRGBA(x, y, image.NRGBAColor{ycol, ycol, ycol, cdat[2*x+1]}) + nrgba.Set(x, y, image.NRGBAColor{ycol, ycol, ycol, cdat[2*x+1]}) } case cbTC8: for x := 0; x < d.width; x++ { - rgba.SetRGBA(x, y, image.RGBAColor{cdat[3*x+0], cdat[3*x+1], cdat[3*x+2], 0xff}) + rgba.Set(x, y, image.RGBAColor{cdat[3*x+0], cdat[3*x+1], cdat[3*x+2], 0xff}) } case cbP1: for x := 0; x < d.width; x += 8 { @@ -456,25 +456,25 @@ func (d *decoder) idatReader(idat io.Reader) (image.Image, os.Error) { } case cbTCA8: for x := 0; x < d.width; x++ { - nrgba.SetNRGBA(x, y, image.NRGBAColor{cdat[4*x+0], cdat[4*x+1], cdat[4*x+2], cdat[4*x+3]}) + nrgba.Set(x, y, image.NRGBAColor{cdat[4*x+0], cdat[4*x+1], cdat[4*x+2], cdat[4*x+3]}) } case cbG16: for x := 0; x < d.width; x++ { ycol := uint16(cdat[2*x+0])<<8 | uint16(cdat[2*x+1]) - gray16.SetGray16(x, y, image.Gray16Color{ycol}) + gray16.Set(x, y, image.Gray16Color{ycol}) } case cbGA16: for x := 0; x < d.width; x++ { ycol := uint16(cdat[4*x+0])<<8 | uint16(cdat[4*x+1]) acol := uint16(cdat[4*x+2])<<8 | uint16(cdat[4*x+3]) - nrgba64.SetNRGBA64(x, y, image.NRGBA64Color{ycol, ycol, ycol, acol}) + nrgba64.Set(x, y, image.NRGBA64Color{ycol, ycol, ycol, acol}) } case cbTC16: for x := 0; x < d.width; x++ { rcol := uint16(cdat[6*x+0])<<8 | uint16(cdat[6*x+1]) gcol := uint16(cdat[6*x+2])<<8 | uint16(cdat[6*x+3]) bcol := uint16(cdat[6*x+4])<<8 | uint16(cdat[6*x+5]) - rgba64.SetRGBA64(x, y, image.RGBA64Color{rcol, gcol, bcol, 0xffff}) + rgba64.Set(x, y, image.RGBA64Color{rcol, gcol, bcol, 0xffff}) } case cbTCA16: for x := 0; x < d.width; x++ { @@ -482,7 +482,7 @@ func (d *decoder) idatReader(idat io.Reader) (image.Image, os.Error) { gcol := uint16(cdat[8*x+2])<<8 | uint16(cdat[8*x+3]) bcol := uint16(cdat[8*x+4])<<8 | uint16(cdat[8*x+5]) acol := uint16(cdat[8*x+6])<<8 | uint16(cdat[8*x+7]) - nrgba64.SetNRGBA64(x, y, image.NRGBA64Color{rcol, gcol, bcol, acol}) + nrgba64.Set(x, y, image.NRGBA64Color{rcol, gcol, bcol, acol}) } } diff --git a/src/pkg/image/png/writer.go b/src/pkg/image/png/writer.go index 2d593f6a7..081d06bf5 100644 --- a/src/pkg/image/png/writer.go +++ b/src/pkg/image/png/writer.go @@ -263,12 +263,7 @@ func writeImage(w io.Writer, m image.Image, cb int) os.Error { defer zw.Close() bpp := 0 // Bytes per pixel. - - // Used by fast paths for common image types var paletted *image.Paletted - var rgba *image.RGBA - rgba, _ = m.(*image.RGBA) - switch cb { case cbG8: bpp = 1 @@ -308,24 +303,12 @@ func writeImage(w io.Writer, m image.Image, cb int) os.Error { cr[0][x+1] = c.Y } case cbTC8: - // We have previously verified that the alpha value is fully opaque. - cr0 := cr[0] - if rgba != nil { - yoff := y * rgba.Stride - xoff := 3*b.Min.X + 1 - for _, color := range rgba.Pix[yoff+b.Min.X : yoff+b.Max.X] { - cr0[xoff] = color.R - cr0[xoff+1] = color.G - cr0[xoff+2] = color.B - xoff += 3 - } - } else { - for x := b.Min.X; x < b.Max.X; x++ { - r, g, b, _ := m.At(x, y).RGBA() - cr0[3*x+1] = uint8(r >> 8) - cr0[3*x+2] = uint8(g >> 8) - cr0[3*x+3] = uint8(b >> 8) - } + for x := b.Min.X; x < b.Max.X; x++ { + // We have previously verified that the alpha value is fully opaque. + r, g, b, _ := m.At(x, y).RGBA() + cr[0][3*x+1] = uint8(r >> 8) + cr[0][3*x+2] = uint8(g >> 8) + cr[0][3*x+3] = uint8(b >> 8) } case cbP8: rowOffset := y * paletted.Stride diff --git a/src/pkg/image/png/writer_test.go b/src/pkg/image/png/writer_test.go index 6b054aaa8..4d9929f31 100644 --- a/src/pkg/image/png/writer_test.go +++ b/src/pkg/image/png/writer_test.go @@ -5,10 +5,10 @@ package png import ( + "bytes" "fmt" "image" "io" - "io/ioutil" "os" "testing" ) @@ -81,42 +81,10 @@ func BenchmarkEncodePaletted(b *testing.B) { image.RGBAColor{0, 0, 0, 255}, image.RGBAColor{255, 255, 255, 255}, }) - b.SetBytes(640 * 480 * 1) b.StartTimer() + buffer := new(bytes.Buffer) for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) - } -} - -func BenchmarkEncodeRGBOpaque(b *testing.B) { - b.StopTimer() - img := image.NewRGBA(640, 480) - // Set all pixels to 0xFF alpha to force opaque mode. - bo := img.Bounds() - for y := bo.Min.Y; y < bo.Max.Y; y++ { - for x := bo.Min.X; x < bo.Max.X; x++ { - img.Set(x, y, image.RGBAColor{0, 0, 0, 255}) - } - } - if !img.Opaque() { - panic("expected image to be opaque") - } - b.SetBytes(640 * 480 * 4) - b.StartTimer() - for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) - } -} - -func BenchmarkEncodeRGBA(b *testing.B) { - b.StopTimer() - img := image.NewRGBA(640, 480) - if img.Opaque() { - panic("expected image to not be opaque") - } - b.SetBytes(640 * 480 * 4) - b.StartTimer() - for i := 0; i < b.N; i++ { - Encode(ioutil.Discard, img) + buffer.Reset() + Encode(buffer, img) } } diff --git a/src/pkg/mime/multipart/multipart.go b/src/pkg/mime/multipart/multipart.go index 60329fe17..e0b747c3f 100644 --- a/src/pkg/mime/multipart/multipart.go +++ b/src/pkg/mime/multipart/multipart.go @@ -15,13 +15,13 @@ package multipart import ( "bufio" "bytes" - "fmt" "io" "io/ioutil" "mime" "net/textproto" "os" "regexp" + "strings" ) var headerRegexp *regexp.Regexp = regexp.MustCompile("^([a-zA-Z0-9\\-]+): *([^\r\n]+)") @@ -79,28 +79,25 @@ func (p *Part) FormName() string { // NewReader creates a new multipart Reader reading from r using the // given MIME boundary. func NewReader(reader io.Reader, boundary string) Reader { - b := []byte("\r\n--" + boundary + "--") return &multiReader{ - bufReader: bufio.NewReader(reader), - - nlDashBoundary: b[:len(b)-2], - dashBoundaryDash: b[2:], - dashBoundary: b[2 : len(b)-2], + boundary: boundary, + dashBoundary: "--" + boundary, + endLine: "--" + boundary + "--", + bufReader: bufio.NewReader(reader), } } // Implementation .... -func newPart(mr *multiReader) (*Part, os.Error) { - bp := &Part{ - Header: make(map[string][]string), - mr: mr, - buffer: new(bytes.Buffer), - } - if err := bp.populateHeaders(); err != nil { - return nil, err +func newPart(mr *multiReader) (bp *Part, err os.Error) { + bp = new(Part) + bp.Header = make(map[string][]string) + bp.mr = mr + bp.buffer = new(bytes.Buffer) + if err = bp.populateHeaders(); err != nil { + bp = nil } - return bp, nil + return } func (bp *Part) populateHeaders() os.Error { @@ -125,49 +122,44 @@ func (bp *Part) populateHeaders() os.Error { // Read reads the body of a part, after its headers and before the // next part (if any) begins. func (bp *Part) Read(p []byte) (n int, err os.Error) { - if bp.buffer.Len() >= len(p) { - // Internal buffer of unconsumed data is large enough for - // the read request. No need to parse more at the moment. - return bp.buffer.Read(p) - } - peek, err := bp.mr.bufReader.Peek(4096) // TODO(bradfitz): add buffer size accessor - unexpectedEof := err == os.EOF - if err != nil && !unexpectedEof { - return 0, fmt.Errorf("multipart: Part Read: %v", err) - } - if peek == nil { - panic("nil peek buf") - } + for { + if bp.buffer.Len() >= len(p) { + // Internal buffer of unconsumed data is large enough for + // the read request. No need to parse more at the moment. + break + } + if !bp.mr.ensureBufferedLine() { + return 0, io.ErrUnexpectedEOF + } + if bp.mr.bufferedLineIsBoundary() { + // Don't consume this line + break + } - // Search the peek buffer for "\r\n--boundary". If found, - // consume everything up to the boundary. If not, consume only - // as much of the peek buffer as cannot hold the boundary - // string. - nCopy := 0 - foundBoundary := false - if idx := bytes.Index(peek, bp.mr.nlDashBoundary); idx != -1 { - nCopy = idx - foundBoundary = true - } else if safeCount := len(peek) - len(bp.mr.nlDashBoundary); safeCount > 0 { - nCopy = safeCount - } else if unexpectedEof { - // If we've run out of peek buffer and the boundary - // wasn't found (and can't possibly fit), we must have - // hit the end of the file unexpectedly. - return 0, io.ErrUnexpectedEOF - } - if nCopy > 0 { - if _, err := io.Copyn(bp.buffer, bp.mr.bufReader, int64(nCopy)); err != nil { - return 0, err + // Write all of this line, except the final CRLF + s := *bp.mr.bufferedLine + if strings.HasSuffix(s, "\r\n") { + bp.mr.consumeLine() + if !bp.mr.ensureBufferedLine() { + return 0, io.ErrUnexpectedEOF + } + if bp.mr.bufferedLineIsBoundary() { + // The final \r\n isn't ours. It logically belongs + // to the boundary line which follows. + bp.buffer.WriteString(s[0 : len(s)-2]) + } else { + bp.buffer.WriteString(s) + } + break } + if strings.HasSuffix(s, "\n") { + bp.buffer.WriteString(s) + bp.mr.consumeLine() + continue + } + return 0, os.NewError("multipart parse error during Read; unexpected line: " + s) } - n, err = bp.buffer.Read(p) - if err == os.EOF && !foundBoundary { - // If the boundary hasn't been reached there's more to - // read, so don't pass through an EOF from the buffer - err = nil - } - return + return bp.buffer.Read(p) } func (bp *Part) Close() os.Error { @@ -176,12 +168,46 @@ func (bp *Part) Close() os.Error { } type multiReader struct { - bufReader *bufio.Reader + boundary string + dashBoundary string // --boundary + endLine string // --boundary-- + bufferedLine *string + + bufReader *bufio.Reader currentPart *Part partsRead int +} - nlDashBoundary, dashBoundaryDash, dashBoundary []byte +func (mr *multiReader) eof() bool { + return mr.bufferedLine == nil && + !mr.readLine() +} + +func (mr *multiReader) readLine() bool { + lineBytes, err := mr.bufReader.ReadSlice('\n') + if err != nil { + // TODO: care about err being EOF or not? + return false + } + line := string(lineBytes) + mr.bufferedLine = &line + return true +} + +func (mr *multiReader) bufferedLineIsBoundary() bool { + return strings.HasPrefix(*mr.bufferedLine, mr.dashBoundary) +} + +func (mr *multiReader) ensureBufferedLine() bool { + if mr.bufferedLine == nil { + return mr.readLine() + } + return true +} + +func (mr *multiReader) consumeLine() { + mr.bufferedLine = nil } func (mr *multiReader) NextPart() (*Part, os.Error) { @@ -189,14 +215,13 @@ func (mr *multiReader) NextPart() (*Part, os.Error) { mr.currentPart.Close() } - expectNewPart := false for { - line, err := mr.bufReader.ReadSlice('\n') - if err != nil { - return nil, fmt.Errorf("multipart: NextPart: %v", err) + if mr.eof() { + return nil, io.ErrUnexpectedEOF } - if mr.isBoundaryDelimiterLine(line) { + if isBoundaryDelimiterLine(*mr.bufferedLine, mr.dashBoundary) { + mr.consumeLine() mr.partsRead++ bp, err := newPart(mr) if err != nil { @@ -206,67 +231,55 @@ func (mr *multiReader) NextPart() (*Part, os.Error) { return bp, nil } - if hasPrefixThenNewline(line, mr.dashBoundaryDash) { + if hasPrefixThenNewline(*mr.bufferedLine, mr.endLine) { + mr.consumeLine() // Expected EOF (no error) - // TODO(bradfitz): should return an os.EOF error here, not using nil for errors return nil, nil } - if expectNewPart { - return nil, fmt.Errorf("multipart: expecting a new Part; got line %q", string(line)) - } - if mr.partsRead == 0 { // skip line + mr.consumeLine() continue } - if bytes.Equal(line, []byte("\r\n")) { - // Consume the "\r\n" separator between the - // body of the previous part and the boundary - // line we now expect will follow. (either a - // new part or the end boundary) - expectNewPart = true - continue - } - - return nil, fmt.Errorf("multipart: unexpected line in Next(): %q", line) + return nil, os.NewError("Unexpected line in Next().") } panic("unreachable") } -func (mr *multiReader) isBoundaryDelimiterLine(line []byte) bool { +func isBoundaryDelimiterLine(line, dashPrefix string) bool { // http://tools.ietf.org/html/rfc2046#section-5.1 // The boundary delimiter line is then defined as a line // consisting entirely of two hyphen characters ("-", // decimal value 45) followed by the boundary parameter // value from the Content-Type header field, optional linear // whitespace, and a terminating CRLF. - if !bytes.HasPrefix(line, mr.dashBoundary) { + if !strings.HasPrefix(line, dashPrefix) { return false } - if bytes.HasSuffix(line, []byte("\r\n")) { - return onlyHorizontalWhitespace(line[len(mr.dashBoundary) : len(line)-2]) + if strings.HasSuffix(line, "\r\n") { + return onlyHorizontalWhitespace(line[len(dashPrefix) : len(line)-2]) } // Violate the spec and also support newlines without the // carriage return... - if bytes.HasSuffix(line, []byte("\n")) { - return onlyHorizontalWhitespace(line[len(mr.dashBoundary) : len(line)-1]) + if strings.HasSuffix(line, "\n") { + return onlyHorizontalWhitespace(line[len(dashPrefix) : len(line)-1]) } return false } -func onlyHorizontalWhitespace(s []byte) bool { - for _, b := range s { - if b != ' ' && b != '\t' { +func onlyHorizontalWhitespace(s string) bool { + for i := 0; i < len(s); i++ { + if s[i] != ' ' && s[i] != '\t' { return false } } return true } -func hasPrefixThenNewline(s, prefix []byte) bool { - return bytes.HasPrefix(s, prefix) && - (len(s) == len(prefix)+1 && s[len(s)-1] == '\n' || - len(s) == len(prefix)+2 && bytes.HasSuffix(s, []byte("\r\n"))) +func hasPrefixThenNewline(s, prefix string) bool { + return strings.HasPrefix(s, prefix) && + (len(s) == len(prefix)+1 && strings.HasSuffix(s, "\n") || + len(s) == len(prefix)+2 && strings.HasSuffix(s, "\r\n")) } diff --git a/src/pkg/mime/multipart/multipart_test.go b/src/pkg/mime/multipart/multipart_test.go index 16249146c..f8f10f3e1 100644 --- a/src/pkg/mime/multipart/multipart_test.go +++ b/src/pkg/mime/multipart/multipart_test.go @@ -8,37 +8,38 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "json" "os" + "regexp" "strings" "testing" ) func TestHorizontalWhitespace(t *testing.T) { - if !onlyHorizontalWhitespace([]byte(" \t")) { + if !onlyHorizontalWhitespace(" \t") { t.Error("expected pass") } - if onlyHorizontalWhitespace([]byte("foo bar")) { + if onlyHorizontalWhitespace("foo bar") { t.Error("expected failure") } } func TestBoundaryLine(t *testing.T) { - mr := NewReader(strings.NewReader(""), "myBoundary").(*multiReader) - if !mr.isBoundaryDelimiterLine([]byte("--myBoundary\r\n")) { + boundary := "myBoundary" + prefix := "--" + boundary + if !isBoundaryDelimiterLine("--myBoundary\r\n", prefix) { t.Error("expected") } - if !mr.isBoundaryDelimiterLine([]byte("--myBoundary \r\n")) { + if !isBoundaryDelimiterLine("--myBoundary \r\n", prefix) { t.Error("expected") } - if !mr.isBoundaryDelimiterLine([]byte("--myBoundary \n")) { + if !isBoundaryDelimiterLine("--myBoundary \n", prefix) { t.Error("expected") } - if mr.isBoundaryDelimiterLine([]byte("--myBoundary bogus \n")) { + if isBoundaryDelimiterLine("--myBoundary bogus \n", prefix) { t.Error("expected fail") } - if mr.isBoundaryDelimiterLine([]byte("--myBoundary bogus--")) { + if isBoundaryDelimiterLine("--myBoundary bogus--", prefix) { t.Error("expected fail") } } @@ -78,9 +79,7 @@ func TestFormName(t *testing.T) { } } -var longLine = strings.Repeat("\n\n\r\r\r\n\r\000", (1<<20)/8) - -func testMultipartBody() string { +func TestMultipart(t *testing.T) { testBody := ` This is a multi-part message. This line is ignored. --MyBoundary @@ -91,10 +90,6 @@ foo-bar: baz My value The end. --MyBoundary -name: bigsection - -[longline] ---MyBoundary Header1: value1b HEADER2: value2b foo-bar: bazb @@ -107,26 +102,11 @@ Line 3 ends in a newline, but just one. never read data --MyBoundary-- - - -useless trailer ` - testBody = strings.Replace(testBody, "\n", "\r\n", -1) - return strings.Replace(testBody, "[longline]", longLine, 1) -} - -func TestMultipart(t *testing.T) { - bodyReader := strings.NewReader(testMultipartBody()) - testMultipart(t, bodyReader) -} - -func TestMultipartSlowInput(t *testing.T) { - bodyReader := strings.NewReader(testMultipartBody()) - testMultipart(t, &slowReader{bodyReader}) -} + testBody = regexp.MustCompile("\n").ReplaceAllString(testBody, "\r\n") + bodyReader := strings.NewReader(testBody) -func testMultipart(t *testing.T, r io.Reader) { - reader := NewReader(r, "MyBoundary") + reader := NewReader(bodyReader, "MyBoundary") buf := new(bytes.Buffer) // Part1 @@ -145,64 +125,38 @@ func testMultipart(t *testing.T, r io.Reader) { t.Error("Expected Foo-Bar: baz") } buf.Reset() - if _, err := io.Copy(buf, part); err != nil { - t.Errorf("part 1 copy: %v", err) - } + io.Copy(buf, part) expectEq(t, "My value\r\nThe end.", buf.String(), "Value of first part") // Part2 part, err = reader.NextPart() - if err != nil { - t.Fatalf("Expected part2; got: %v", err) - return - } - if e, g := "bigsection", part.Header.Get("name"); e != g { - t.Errorf("part2's name header: expected %q, got %q", e, g) - } - buf.Reset() - if _, err := io.Copy(buf, part); err != nil { - t.Errorf("part 2 copy: %v", err) - } - s := buf.String() - if len(s) != len(longLine) { - t.Errorf("part2 body expected long line of length %d; got length %d", - len(longLine), len(s)) - } - if s != longLine { - t.Errorf("part2 long body didn't match") - } - - // Part3 - part, err = reader.NextPart() if part == nil || err != nil { - t.Error("Expected part3") + t.Error("Expected part2") return } if part.Header.Get("foo-bar") != "bazb" { t.Error("Expected foo-bar: bazb") } buf.Reset() - if _, err := io.Copy(buf, part); err != nil { - t.Errorf("part 3 copy: %v", err) - } + io.Copy(buf, part) expectEq(t, "Line 1\r\nLine 2\r\nLine 3 ends in a newline, but just one.\r\n", - buf.String(), "body of part 3") + buf.String(), "Value of second part") - // Part4 + // Part3 part, err = reader.NextPart() if part == nil || err != nil { - t.Error("Expected part 4 without errors") + t.Error("Expected part3 without errors") return } - // Non-existent part5 + // Non-existent part4 part, err = reader.NextPart() if part != nil { - t.Error("Didn't expect a fifth part.") + t.Error("Didn't expect a third part.") } if err != nil { - t.Errorf("Unexpected error getting fifth part: %v", err) + t.Errorf("Unexpected error getting third part: %v", err) } } @@ -283,36 +237,3 @@ func TestLineLimit(t *testing.T) { t.Errorf("expected to read < %d bytes; read %d", maxReadThreshold, mr.n) } } - -func TestMultipartTruncated(t *testing.T) { - testBody := ` -This is a multi-part message. This line is ignored. ---MyBoundary -foo-bar: baz - -Oh no, premature EOF! -` - body := strings.Replace(testBody, "\n", "\r\n", -1) - bodyReader := strings.NewReader(body) - r := NewReader(bodyReader, "MyBoundary") - - part, err := r.NextPart() - if err != nil { - t.Fatalf("didn't get a part") - } - _, err = io.Copy(ioutil.Discard, part) - if err != io.ErrUnexpectedEOF { - t.Fatalf("expected error io.ErrUnexpectedEOF; got %v", err) - } -} - -type slowReader struct { - r io.Reader -} - -func (s *slowReader) Read(p []byte) (int, os.Error) { - if len(p) == 0 { - return s.r.Read(p) - } - return s.r.Read(p[:1]) -} diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go index dee3f4915..5bf65333c 100644 --- a/src/pkg/reflect/all_test.go +++ b/src/pkg/reflect/all_test.go @@ -182,9 +182,7 @@ var valueTests = []pair{ }), "struct { c chan *int32; d float32 }{chan *int32, 0}", }, - {new(struct { - c func(chan *integer, *int8) - }), + {new(struct{ c func(chan *integer, *int8) }), "struct { c func(chan *reflect_test.integer, *int8) }{func(chan *reflect_test.integer, *int8)(0)}", }, {new(struct { @@ -734,24 +732,6 @@ func TestDeepEqualComplexStructInequality(t *testing.T) { } } -type UnexpT struct { - m map[int]int -} - -func TestDeepEqualUnexportedMap(t *testing.T) { - // Check that DeepEqual can look at unexported fields. - x1 := UnexpT{map[int]int{1: 2}} - x2 := UnexpT{map[int]int{1: 2}} - if !DeepEqual(&x1, &x2) { - t.Error("DeepEqual(x1, x2) = false, want true") - } - - y1 := UnexpT{map[int]int{2: 3}} - if DeepEqual(&x1, &y1) { - t.Error("DeepEqual(x1, y1) = true, want false") - } -} - func check2ndField(x interface{}, offs uintptr, t *testing.T) { s := ValueOf(x) diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go index 2c2158a3c..6dffb0783 100644 --- a/src/pkg/reflect/value.go +++ b/src/pkg/reflect/value.go @@ -958,19 +958,14 @@ func (v Value) MapIndex(key Value) Value { iv.mustBe(Map) typ := iv.typ.toType() - // Do not require ikey to be exported, so that DeepEqual - // and other programs can use all the keys returned by - // MapKeys as arguments to MapIndex. If either the map - // or the key is unexported, though, the result will be - // considered unexported. - ikey := key.internal() + ikey.mustBeExported() ikey = convertForAssignment("reflect.Value.MapIndex", nil, typ.Key(), ikey) if iv.word == 0 { return Value{} } - flag := (iv.flag | ikey.flag) & flagRO + flag := iv.flag & flagRO elemType := typ.Elem() elemWord, ok := mapaccess(iv.word, ikey.word) if !ok { diff --git a/src/pkg/runtime/linux/arm/sys.s b/src/pkg/runtime/linux/arm/sys.s index 2b5365bd8..d866b0e22 100644 --- a/src/pkg/runtime/linux/arm/sys.s +++ b/src/pkg/runtime/linux/arm/sys.s @@ -258,23 +258,12 @@ TEXT cas<>(SB),7,$0 TEXT runtime·cas(SB),7,$0 MOVW valptr+0(FP), R2 MOVW old+4(FP), R0 -casagain: MOVW new+8(FP), R1 BL cas<>(SB) - BCC cascheck - MOVW $1, R0 - RET -cascheck: - // Kernel lies; double-check. - MOVW valptr+0(FP), R2 - MOVW old+4(FP), R0 - MOVW 0(R2), R3 - CMP R0, R3 - BEQ casagain - MOVW $0, R0 + MOVW $0, R0 + MOVW.CS $1, R0 RET - TEXT runtime·casp(SB),7,$0 B runtime·cas(SB) diff --git a/src/pkg/sync/atomic/asm_linux_arm.s b/src/pkg/sync/atomic/asm_linux_arm.s index 72f8d746b..5e7aea292 100644 --- a/src/pkg/sync/atomic/asm_linux_arm.s +++ b/src/pkg/sync/atomic/asm_linux_arm.s @@ -13,12 +13,6 @@ // LR = return address // The function returns with CS true if the swap happened. // http://lxr.linux.no/linux+v2.6.37.2/arch/arm/kernel/entry-armv.S#L850 -// On older kernels (before 2.6.24) the function can incorrectly -// report a conflict, so we have to double-check the compare ourselves -// and retry if necessary. -// -// http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b49c0f24cf6744a3f4fd09289fe7cade349dead5 -// TEXT cas<>(SB),7,$0 MOVW $0xffff0fc0, PC @@ -29,23 +23,12 @@ TEXT ·CompareAndSwapInt32(SB),7,$0 TEXT ·CompareAndSwapUint32(SB),7,$0 MOVW valptr+0(FP), R2 MOVW old+4(FP), R0 -casagain: MOVW new+8(FP), R1 BL cas<>(SB) - BCC cascheck - MOVW $1, R0 -casret: + MOVW $0, R0 + MOVW.CS $1, R0 MOVW R0, ret+12(FP) RET -cascheck: - // Kernel lies; double-check. - MOVW valptr+0(FP), R2 - MOVW old+4(FP), R0 - MOVW 0(R2), R3 - CMP R0, R3 - BEQ casagain - MOVW $0, R0 - B casret TEXT ·CompareAndSwapUintptr(SB),7,$0 B ·CompareAndSwapUint32(SB) diff --git a/src/pkg/xml/read.go b/src/pkg/xml/read.go index e2b349c3f..554b2a61b 100644 --- a/src/pkg/xml/read.go +++ b/src/pkg/xml/read.go @@ -220,10 +220,13 @@ func (p *Parser) unmarshal(val reflect.Value, start *StartElement) os.Error { } if pv := val; pv.Kind() == reflect.Ptr { - if pv.IsNil() { - pv.Set(reflect.New(pv.Type().Elem())) + if pv.Pointer() == 0 { + zv := reflect.Zero(pv.Type().Elem()) + pv.Set(zv.Addr()) + val = zv + } else { + val = pv.Elem() } - val = pv.Elem() } var ( diff --git a/src/pkg/xml/xml_test.go b/src/pkg/xml/xml_test.go index 4e51cd53a..a99c1919e 100644 --- a/src/pkg/xml/xml_test.go +++ b/src/pkg/xml/xml_test.go @@ -329,50 +329,46 @@ func TestSyntax(t *testing.T) { } type allScalars struct { - True1 bool - True2 bool - False1 bool - False2 bool - Int int - Int8 int8 - Int16 int16 - Int32 int32 - Int64 int64 - Uint int - Uint8 uint8 - Uint16 uint16 - Uint32 uint32 - Uint64 uint64 - Uintptr uintptr - Float32 float32 - Float64 float64 - String string - PtrString *string + True1 bool + True2 bool + False1 bool + False2 bool + Int int + Int8 int8 + Int16 int16 + Int32 int32 + Int64 int64 + Uint int + Uint8 uint8 + Uint16 uint16 + Uint32 uint32 + Uint64 uint64 + Uintptr uintptr + Float32 float32 + Float64 float64 + String string } var all = allScalars{ - True1: true, - True2: true, - False1: false, - False2: false, - Int: 1, - Int8: -2, - Int16: 3, - Int32: -4, - Int64: 5, - Uint: 6, - Uint8: 7, - Uint16: 8, - Uint32: 9, - Uint64: 10, - Uintptr: 11, - Float32: 13.0, - Float64: 14.0, - String: "15", - PtrString: &sixteen, -} - -var sixteen = "16" + True1: true, + True2: true, + False1: false, + False2: false, + Int: 1, + Int8: -2, + Int16: 3, + Int32: -4, + Int64: 5, + Uint: 6, + Uint8: 7, + Uint16: 8, + Uint32: 9, + Uint64: 10, + Uintptr: 11, + Float32: 13.0, + Float64: 14.0, + String: "15", +} const testScalarsInput = ` true @@ -394,7 +390,6 @@ const testScalarsInput = ` 13.0 14.0 15 - 16 ` func TestAllScalars(t *testing.T) { @@ -406,7 +401,7 @@ func TestAllScalars(t *testing.T) { t.Fatal(err) } if !reflect.DeepEqual(a, all) { - t.Errorf("have %+v want %+v", a, all) + t.Errorf("expected %+v got %+v", all, a) } } -- cgit v1.2.3