Neither gofmt nor godoc are making use of a Styler (for
token-specific formatting) anymore. Stylers interacted in complicated
ways with HTML-escaping which was why the printer needed an HTML mode
in the first place.
godoc now uses a more powerful and general text formatting
function that does HTML escaping, text selection, and can
handle token-specific formatting if so desired (currently
used only for comments).
As a consequence, cleaned up uses of go/printer in godoc;
simplified the various write utility functions, and also
removed the need for the "html" template format (in favor of
html-esc which now does the same and is used more pervasively).
Applied gofmt -w src misc to verify no changes occured,
and tested godoc manually.
There should be no visible changes except that (type) code
snippets presented for godoc package documentation now
uses the same formatting as for general source code and
thus comments get the comment-specific color here as well
(not the case at the moment).
(TODO: godoc needs a good automatic test suite).
R=rsc
CC=golang-dev
https://golang.org/cl/4152042
Even if local, it requires communication with a daemon
which may not be available. This is creating problems
for getting an Ubuntu package going in Launchpad's PPA.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3989062
Structs defined in C as containing a field with
an enum type are currently translated to Go as
a struct with an unsigned integer field, even if
some of the values contained in the enum are
negative.
This modification takes in consideration the values
defined in the enum, and conditionally defines the
Go type as signed if necessary.
The logic introduced was tested with gcc, which
will increase the type size if it contains both
negative numbers and values greater than 2^b/2-1,
and refuses to compile values which would be
problematic (2^64-1, but in fact the ISO C
restricts the range to the size of int).
R=rsc
CC=golang-dev
https://golang.org/cl/4119058
Faster in most cases, and not prone to memory leaks. Named "Do" to match with similarly named method on Vector.
R=gri
CC=golang-dev
https://golang.org/cl/4134046
- added an example to Type declarations section clarifying the
situation brought up with issue 1324
- slightly re-ordered paragraphs in Types section
- added separate heading for method set section and refer to it
from elsewhere in the spec
- no language changes
R=rsc, r, iant, ken2, r2
CC=golang-dev
https://golang.org/cl/4145043
Currently, when an importer closes the connection, the exporter gives an
error message 'netchan export: error decoding client header:EOF'. This
change causes the exporter to look for an EOF during the parse of the
header, and silences the log message in that case.
R=r
CC=golang-dev, rog
https://golang.org/cl/4132044
The logic introduced to avoid running cgo when
introducing _cgo_flags is faulty. My goal was
to handle it with the following statement:
-include _cgo_flags
The dash tells make to ignore errors if it can't
include the file.
What I missed, though, was the fact that it
*will* attempt to build the file if it knows
how.
This change will introduce the originally
intended semantics of not attempting to build
the file before necessary.
R=rsc
CC=golang-dev
https://golang.org/cl/4023069
A couple of post-closure function definitions were introduced too early, making the resulting
code fail compilation.
Also, the TitleValidator regexp was missing.
R=adg
CC=golang-dev
https://golang.org/cl/4105054
Previously, the outer loop would continue until we selected the
client's least preferable ciphersuite.
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4029056
OS X, at least, appears to test |byte == 255|, not |byte != 0| to
establish if a bool is true or false.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4128064
Many recently issued certificates are chained: there's one or more
intermediate certificates between the host certificate and the root CA
certificate. This change causes the code to load any number of
certificates from the certificate file. This matches the behaviour of
common webservers, and the output of OpenSSL's command line tools.
R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/4119057
If a multi-line raw string is the first token on a line, it
should not be indented because the following lines (belonging
to the raw string) are not indented either.
Adjusted src of ebnf/ebnf_test.go manually as it now is formatted
as expected.
gofmt -w src misc
Fixes#1072.
R=r
CC=golang-dev
https://golang.org/cl/4119056
signed or unsigned integers using %v or the formatless scanner.
That is, Sscan("0x11", &i) or Sscanf("0x11", "%v", &i) will now
set i to 17. If a format other than %v is presented, the behavior
is as before.
Fixes#1469.
R=rsc
CC=golang-dev
https://golang.org/cl/4131042
Must be invoked as ./clean.bash --gomake make
(or --gomake gmake, depending on the name of
GNU make).
R=niemeyer
CC=golang-dev
https://golang.org/cl/4023065
Removed most of the detailed examples about handing panics
from the go spec since it's now covered by Effective Go.
R=r, rsc, iant, ken2
CC=golang-dev
https://golang.org/cl/4128058
Note that DSA public key support is nascent and the verification
functions clearly don't support it yet. I'm intending to get RSA keys
working first.
R=bradfitzgo
CC=golang-dev
https://golang.org/cl/3973054
ReadRune. (If you have a Reader but not a RuneReader, use bufio.)
The matching code is a few percent slower but significantly cleaner.
R=rsc
CC=golang-dev
https://golang.org/cl/4125046
As discussed in the mailing list, this adds a simple barrier
implementation to the sync package which enables one or more
goroutines to wait for a counter to go down to zero.
R=rsc, rog, r
CC=golang-dev
https://golang.org/cl/3770045