The new url.URL's parsing can be too canonicalizing for
certain applications. By keeping the original request URI
around, we give applications a gross escape hatch while
keeping the URL package clean and simple for normal uses.
(From a discussion with Gary Burd, Gustavo Niemeyer,
and Russ Cox.)
Fixes#2782
R=golang-dev, rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5580044
Compare:
http://swtch.com/junk/regexp0.html [old]
http://swtch.com/junk/regexp.html [new]
Especially for packages with large APIs, this makes the
overview more promiment, so that it can give the appropriate
context for reading the API list. This should help significantly
in packages with large APIs, like net, so that the first thing users
see is not a jumble of functions but an introduction to the package.
R=adg, gri, r, kevlar, dsymonds, rogpeppe
CC=golang-dev
https://golang.org/cl/5573068
It means serious user error that can lead to
hard to debug issues under load, log entry
will not harm.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5574075
The idea is that we add files to the api/ directory which
are sets of promises for the future. Each line in a file
is a stand-alone feature description.
When we do a release, we make sure we haven't broken or changed
any lines from the past (only added them).
We never change old files, only adding new ones. (go-1.1.txt,
etc)
R=dsymonds, adg, r, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/5570051
Separating Method from Func made the code only more complicated
without adding much to the useability/readability of the API.
Reverted to where it was, but leaving the new method-specific
fields Orig and Level.
Former clients (godoc) of doc.Method only used the Func fields;
and because Func was embedded, no changes are needed with respect
to the removal of Method.
Changed type of Func.Recv from ast.Expr to string. This was a
long-standing TODO. Also implemented Func.Orig field (another TODO).
No further go/doc API changes are expected for Go 1.
R=rsc, r, r
CC=golang-dev
https://golang.org/cl/5577043
This improves the handling of xml.Unmarshal in
the xmlapi fix by guessing some of the common
types used on it.
This also fixes a bug in the partial typechecker.
In an expression such as f(&a), it'd mark a as
having &T rather than *T.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5572058
Pulling function calls out to happen before the
expression being evaluated was causing illegal
reorderings even without inlining; with inlining
it got worse. This CL adds a separate ordering pass
to move things with a fixed order out of expressions
and into the statement sequence, where they will
not be reordered by walk.
Replaces lvd's CL 5534079.
Fixes#2740.
R=lvd
CC=golang-dev
https://golang.org/cl/5569062
Added a cache to compensate for extra call overhead.
go test -bench=Print marginally faster (in the noise).
R=r
CC=golang-dev
https://golang.org/cl/5574061
The implementation is divided into 4 phases:
1) export filtering of an incoming AST if necessary (exports.go)
2) reading of a possibly filtered AST (reader.go: type reader)
3) method set computation (reader.go)
4) sorting and creation of final documentation (reader.go)
In contrast to the old implementation, the presentation data
(Names, Docs, Decls, etc.) are created immediately upon reading
the respective AST node. Also, all types are collected (embedded
or not) in a uniform way.
Once the entire AST has been processed, all methods and types
have been collected and the method sets for each type can be
computed (phase 3).
To produce the final documentation, the method sets and value
maps are sorted.
There are no API changes. Passes the existing test suite unchanged.
R=rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/5554044