| Age | Commit message (Collapse) | Author |
|
««« CL 22770044 / 23fc3139589c
encoding/gob: do not use MarshalText, UnmarshalText
This seems to be the best of a long list of bad ways to fix this issue.
Fixes #6760.
R=r
CC=golang-dev
https://golang.org/cl/22770044
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/28110043
|
|
««« CL 26220045 / d76ade89413f
encoding/gob: expose encode/decode example
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/26220045
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/25380044
|
|
««« CL 19300046 / 5ac568b9d67b
encoding/xml: fix doc comment
The tag is ",chardata" not "chardata".
Fixes #6631.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/19300046
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/20060045
|
|
Fixes #6556.
R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/14747043
|
|
Also tweak the package document, putting in section headings and
adding a sentence about intended use.
Fixes #4925.
R=golang-dev, iant, adg, ugorji
CC=golang-dev
https://golang.org/cl/14519044
|
|
RawMessage is useful and mildly non-obvious.
Given the frequency with which RawMessage questions
show up on golang-nuts, and get answered with an example,
I suspect adding an example to the docs might help.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14190044
|
|
««« original CL description
encoding/gob: do not hide pointer argument for the garbage collector
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14154043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/14165043
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14154043
|
|
The documentation for the Encoder type calls it a stream,
not a connection.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14015044
|
|
R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/14000043
|
|
newTypeEncoder (called once per type and then cached) was
looking at the first value seen of that type's addressability
and caching the encoder decision. If the first value seen was
addressable and a future one wasn't, it would panic.
Instead, introduce a new wrapper encoder type that checks
CanAddr at runtime.
Fixes #6458
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13839045
|
|
Avoid future 'declared and not used error'.
See also issue 6414.
R=r
CC=golang-dev
https://golang.org/cl/13242058
|
|
Previously, fields of type chan or func caused an error.
Now we just treat them like unexported fields and ignore them.
This makes it easier to guarantee long-term compatibilty since
a substructure from another package cannot break gob
encoding by adding a func or chan field.
Fixes #6071
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13693043
|
|
Fixes #5626.
R=golang-dev, dominik.honnef
CC=golang-dev
https://golang.org/cl/13702043
|
|
Fixes #6365.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13627046
|
|
Fixes #4900.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13400044
|
|
Fixes #6341.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13512048
|
|
Flushing after every token negates the point of buffering. A different approach is required.
««« original CL description
encoding/xml: flush buffer after encoding token
R=rsc, bradfitz, adg
CC=golang-dev
https://golang.org/cl/13004046
»»»
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/13515043
|
|
Accidentally submitted.
««« original CL description
encoding/json: add "overflow" struct tag option
Fixes #6213.
R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/13180043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/13234045
|
|
Fixes #6213.
R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/13180043
|
|
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/13274043
|
|
Update #5000
Should reduce the flakiness a little. Malloc counting is important
to general testing but not to the build dashboard, which uses -short.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12866047
|
|
R=rsc, bradfitz, adg
CC=golang-dev
https://golang.org/cl/13004046
|
|
Remove custom support for time.Time.
No new tests: the tests for the time.Time special case
now test the general case.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12751045
|
|
See golang.org/s/go12xml for design.
Repeat of CL 12603044, which was submitted accidentally
and then rolled back.
Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.
R=golang-dev
CC=golang-dev
https://golang.org/cl/12919043
|
|
See golang.org/s/go12xml for design.
R=golang-dev, dominik.honnef, dan.kortschak
CC=golang-dev
https://golang.org/cl/12556043
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12703043
|
|
fat fingers - did not intend to submit.
depends on the Unmarshaler CL anyway.
««« original CL description
encoding/xml: add, support Marshaler interface
See golang.org/s/go12xml for design.
Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.
R=golang-dev, iant, dan.kortschak
CC=golang-dev
https://golang.org/cl/12603044
»»»
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/12918043
|
|
R=r
CC=golang-dev
https://golang.org/cl/12681044
|
|
See golang.org/s/go12encoding for design.
R=r
CC=golang-dev
https://golang.org/cl/12541051
|
|
See golang.org/s/go12xml for design.
Fixes #2771.
Fixes #4169.
Fixes #5975.
Fixes #6125.
R=golang-dev, iant, dan.kortschak
CC=golang-dev
https://golang.org/cl/12603044
|
|
Use the fast path calculation to shorten the code.
No effect on benchmarks.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/12696046
|
|
It used to be called intDestSize; the new name is better too.
R=bradfitz
CC=golang-dev
https://golang.org/cl/12713043
|
|
Again, it still allocates but the code is simple.
benchmark old ns/op new ns/op delta
BenchmarkReadSlice1000Int32s 35580 11465 -67.78%
benchmark old MB/s new MB/s speedup
BenchmarkReadSlice1000Int32s 112.42 348.86 3.10x
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12694048
|
|
There are a few different places in the code that escape
possibly-problematic characters like < > and &.
This one was the only one missing &, so add it.
This means that if you Marshal a string, you get the
same answer you do if you Marshal a string and
pass it through the compactor. (Ironically, the
compaction makes the string longer.)
Because html/template invokes json.Marshal to
prepare escaped strings for JavaScript, this changes
the form of some of the escaped strings, but not
their meaning.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12708044
|
|
The old code was caching per-type struct field info. Instead,
cache type-specific encoding funcs, tailored for that
particular type to avoid unnecessary reflection at runtime.
Once the machine is built once, future encodings of that type
just run the func.
benchmark old ns/op new ns/op delta
BenchmarkCodeEncoder 48424939 36975320 -23.64%
benchmark old MB/s new MB/s speedup
BenchmarkCodeEncoder 40.07 52.48 1.31x
Additionally, the numbers seem stable now at ~52 MB/s, whereas
the numbers for the old code were all over the place: 11 MB/s,
40 MB/s, 13 MB/s, 39 MB/s, etc. In the benchmark above I compared
against the best I saw the old code do.
R=rsc, adg
CC=gobot, golang-dev, r
https://golang.org/cl/9129044
|
|
Sigh.
R=golang-dev
CC=golang-dev
https://golang.org/cl/12491045
|
|
Simple approach. Still generates garbage, but not as much.
benchmark old ns/op new ns/op delta
BenchmarkWriteSlice1000Int32s 40260 18791 -53.33%
benchmark old MB/s new MB/s speedup
BenchmarkWriteSlice1000Int32s 99.35 212.87 2.14x
Fixes #2634.
R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/12680046
|
|
It's a modest package with modest goals and limitations.
Make that clear.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12694043
|
|
Original CL by rsc (11916045):
The motivation for disallowing them was RFC 4180 saying
"The last field in the record must not be followed by a comma."
I believe this is an admonition to CSV generators, not readers.
When reading, anything followed by a comma is not the last field.
Fixes #5892.
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/12294043
|
|
Fixes #5334.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/8653047
|
|
Uglier.
««« original CL description
all: use strings.IndexByte instead of Index where possible
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/12486043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/12485044
|
|
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/12486043
|
|
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12396043
|
|
EscapeText now escapes 0xFFFD returned from DecodeRune as 0xFFFD, rather than passing through the original byte.
Fixes #5880.
R=golang-dev, r, bradfitz, adg
CC=golang-dev
https://golang.org/cl/11975043
|
|
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.
Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.
These were edited by hand. A few were cleaned up in other ways.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11699043
|
|
For consistency with Go documentation style.
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/11697043
|
|
Suggested by Rob in CL 11211045, but the mail arrived
moments after hg submit completed.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11138045
|
|
I want to think more carefully about this.
We put this in because Marshal encoded named []byte but Unmarshal rejected them.
And we noticed that Marshal's behavior was undocumented so we documented it.
But I am starting to think the docs and Unmarshal were correct and Marshal's
behavior was the problem.
Rolling back to give us more time to think.
««« original CL description
json: unmarshal types that are byte slices.
The json package cheerfully would marshal
type S struct {
IP net.IP
}
but would give an error when unmarshalling. This change allows any
type whose concrete type is a byte slice to be unmarshalled from a
string.
Fixes #5086.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11161044
»»»
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11042046
|
|
In practice, rejecting an entire structure due to a single invalid byte
in a string is just too picky, and too hard to track down.
Be consistent with the bulk of the standard library by converting
invalid UTF-8 into UTF-8 with replacement runes.
R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/11211045
|