1) Remove the Reset() member in crypto/aes and crypto/des (and
document the change).
2) Turn several empty error structures into vars. Any remaining error
structures are either non-empty, or will probably become so in the
future.
3) Implement SetWriteDeadline for TLS sockets. At the moment, the TLS
status cannot be reused after a Write error, which is probably fine
for most uses.
4) Make crypto/aes and crypto/des return a cipher.Block.
R=rsc, r
CC=golang-dev
https://golang.org/cl/5625045
This is not the finished product,
but a good checkpoint from which to
proceed with further development.
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5571061
Fixes#2776.
There was a previous attempt at CL 5592043 but that
seems to have stalled. This one is simpler, and more up to date
(correct handling of spdy, for example).
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645091
The paragraph describing the ellipses presents the horizontal ellipsis
in two different fonts and at least on my screen they look too different.
Switch to a consistent rendering.
Of small steps are great journeys undertaken.
R=golang-dev, rsc, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5650055
If a printer is configured with the SourcePos mode
set, it will emit //-line comments as necessary to
ensure that the result - if reparsed - reflects the
original source position information.
This change required a bit of reworking of the
output section in printer.go. Specifically:
- Introduced new Config mode 'SourcePos'.
- Introduced new position 'out' which tracks the
position of the generated output if it were read
in again. If there is a discrepancy between out
and the current AST/source position, a //line
comment is emitted to correct for it.
- Lazy emission of indentation so that //line
comments can be placed correctly. As a result,
the trimmer will have to do less work.
- Merged writeItem into writeString.
- Merged writeByteN into writeByte.
- Use a []byte instead of a byte.Buffer both in the
printer and in the trimmer (eliminates dependency).
Also: introduced explicit printer.Mode type (in
sync w/ parser.Mode, scanner.Mode, etc.)
Runs all tests. Applied gofmt to src, misc w/o changes.
Fixes#1047.
Fixes#2697.
R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5643066
(*Writer, error) if they take a compression level, and *Writer otherwise.
Rename gzip's Compressor and Decompressor to Writer and Reader, similar to
flate and zlib.
Clarify commentary when writing gzip metadata that is not representable
as Latin-1, and fix io.EOF comment bug.
Also refactor gzip_test to be more straightforward.
Fixes#2839.
R=rsc, r, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5639057
Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC.
Clean up some docs.
Rename ShellExpand -> ExpandEnv.
Make NewFile take a uintptr; change File.Fd to return one.
(for API compatibility between Unix and Windows)
Fixes#2947
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5655045
Other wordings are possible but defining this as one
of the ways to proceed means we don't have to add
language about this to the description of select.
Fixes#2825.
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5643062
Issue 2856 asks for a rename of a few methods to a
more idiomatic Go style. This is a very early API
that evolved organically throughout the years.
Together with the fact that ErrorVectors were embedded
in other data structures (e.g. Parser), just renaming
methods (e.g. GetError -> Error) would lead to undesired
behavior (e.g., Parser would act like an Error). Instead,
cleaned up API a bit more:
- removed ErrorVector in favor of ErrorList (already
present)
- simplified Scanner.Init by making the error handler a
function instead of requiring an ErrorHandler implementation
- adjusted helper functions accordingly
- updated Go 1 doc
Fixes#2856.
R=rsc
CC=golang-dev
https://golang.org/cl/5624047
Otherwise, the registration semantics are
init-order-dependent, which I was trying very hard
to avoid in the API. This may break broken programs.
Fixes#2900.
R=golang-dev, r, bradfitz, dsymonds, balasanjay, kevlar
CC=golang-dev
https://golang.org/cl/5644051
The function has a bizarre signature: it was the only public function there
that exposed the reflect package. Also, its definition is peculiar and hard to
explain. It doesn't merit being exported.
This is an API change but really, it should never have been exported and
it's certain very few programs will depend on it: it's too weird.
Fixes#2846.
R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5639054
It complicates the interface unnecessarily.
Document this in go1.html.
Also update the go/doc Makefile.
Fixes#2836.
R=golang-dev, gri, bradfitz
CC=golang-dev
https://golang.org/cl/5642054
Specifically, remove simply where it is claiming that the
code or the action to be carried out is simple, since the
reader might disagree.
R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5637048
This CL introduces new function ListenMulticastUDP to fix
multicast UDP listening across multiple listeners issue,
to replace old multicast methods JoinGroup and LeaveGroup
on UDPConn.
This CL also enables multicast testing by default.
Fixes#2730.
R=rsc, paul.a.lalonde, fullung, devon.odell
CC=golang-dev
https://golang.org/cl/5562048
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
Document that indirection through a nil pointer will panic.
Explain function invocation.
This section will need more work, but it's a start.
Fixes#1865.
Fixes#2252.
R=rsc, iant, r
CC=golang-dev
https://golang.org/cl/5532114
This should make it easier to add the zillion little changes coming.
No content change here beyond a couple of introductory sentences.
Sections have been moved wholesale without editing them.
R=golang-dev, rsc, gri
CC=golang-dev
https://golang.org/cl/5557074
(Sending to r because of the API change.)
Over time we might want to add support for other key types.
While I was in the code, I also made the use of RawSubject the same
between Subject and Issuer when creating certificates.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5554049
(Sending to r because of the API change.)
This change alters the API for crypto/elliptic to permit different
implementations in the future. This will allow us to add faster,
constant-time implementations of the standard curves without any more
API changes.
As a demonstration, it also adds a constant-time implementation of
P224. Since it's only 32-bit, it's actually only about 40% the speed
of the generic code on a 64-bit system.
R=r, rsc
CC=golang-dev
https://golang.org/cl/5528088
Also, disable server-side generation of TOC for commands as they would
only ever show Overview. The JS does a better job (for now).
Fixes#2732.
R=gri, dsymonds
CC=golang-dev
https://golang.org/cl/5558046
This allows HTML pages to specify arbitrary data in a header:
<!--{
"Title": "The page title",
...
}-->
replacing the old style comments:
<!-- title The page title -->
R=gri, rsc, r, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5532093
Previously, a timeout (in int64 nanoseconds) applied to a granularity
even smaller than one operation: a 100 byte read with a 1 second timeout
could take 100 seconds, if the bytes all arrived on the network 1 second
apart. This was confusing.
Rather than making the timeout granularity be per-Read/Write,
this CL makes callers set an absolute deadline (in time.Time)
after which operations will fail. This makes it possible to
set deadlines at higher levels, without knowing exactly how
many read/write operations will happen in e.g. reading an HTTP
request.
Fixes#2723
R=r, rsc, dave
CC=golang-dev
https://golang.org/cl/5555048
- define "0-sized"
- add clarifying sentence to pointer comparison
- removed notion "location" which was used only in pointer comparisons
and which was never defined
Fixes#2620.
R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/5528053
gofmt likes to put lines like
// STOP OMIT
two blank lines from a closing brace, creating an ugly space inside
<pre> blocks in some of these files. This change resolves this issue.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5520044
They're out of date, a pain to maintain, and most of the material
is better served by the Go Tour.
Fixes#2101.
R=golang-dev, rsc, r, adg
CC=golang-dev
https://golang.org/cl/5489053