| Age | Commit message (Collapse) | Author |
|
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5729065
|
|
Thanks to dr.volker.dobler for tracking this down.
Filed a long-term issue (3142) which may eventually
resolve this problem w/o the need for a manual fix.
R=iant
CC=golang-dev
https://golang.org/cl/5698078
|
|
go/doc: move Examples to go/ast
cmd/go: use go/doc to read examples
src/pkg: update examples to use new convention
This is to make whole file examples more readable. When presented as a
complete function, preceding an Example with its output is confusing.
The new convention is to put the expected output in the final comment
of the example, preceded by the string "output:" (case insensitive).
An idiomatic example looks like this:
// This example demonstrates Foo by doing bar and quux.
func ExampleFoo() {
// example body that does bar and quux
// Output:
// example output
}
R=rsc, gri
CC=golang-dev
https://golang.org/cl/5673053
|
|
R=r, bradfitz
CC=golang-dev, rogpeppe
https://golang.org/cl/5673049
|
|
R=golang-dev, adg, bradfitz, r
CC=golang-dev
https://golang.org/cl/5675053
|
|
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5645092
|
|
Fixes #2957.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5653053
|
|
strings.Reader is already stateful and read-only.
This permits a *Reader with http.ServeContent.
R=golang-dev, r, rsc, rsc
CC=golang-dev
https://golang.org/cl/5639068
|
|
R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5629043
|
|
Consequently, remove many package Makefiles,
and shorten the few that remain.
gomake becomes 'go tool make'.
Turn off test phases of run.bash that do not work,
flagged with $BROKEN. Future CLs will restore these,
but this seemed like a big enough CL already.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5601057
|
|
Lots of panics go away.
Also fix a name error in html/template.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5498045
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5448091
|
|
R=rsc, gri
CC=golang-dev
https://golang.org/cl/5445044
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5430046
|
|
R=gri, r, bradfitz
CC=golang-dev
https://golang.org/cl/5371074
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/5345045
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5334050
|
|
R=golang-dev, bsiegert, iant
CC=golang-dev
https://golang.org/cl/5294074
|
|
Various rune-based APIs change.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5306044
|
|
This implements a replacer for when all old strings are single
bytes, but new values are not.
BenchmarkHTMLEscapeNew 1000000 1090 ns/op
BenchmarkHTMLEscapeOld 1000000 2049 ns/op
R=rsc
CC=golang-dev
https://golang.org/cl/5176043
|
|
When all old & new string values are single bytes,
byteReplacer is now used, instead of the generic
algorithm.
BenchmarkGenericMatch 10000 102519 ns/op
BenchmarkByteByteMatch 1000000 2178 ns/op
fast path, when nothing matches:
BenchmarkByteByteNoMatch 1000000 1109 ns/op
comparisons to multiple Replace calls:
BenchmarkByteByteReplaces 100000 16164 ns/op
comparison to strings.Map:
BenchmarkByteByteMap 500000 5454 ns/op
R=rsc
CC=golang-dev
https://golang.org/cl/5175050
|
|
This is just a new API to do many replacements at once.
While the point of this API is to be faster than doing replacements one
at a time, the implementation in this CL has the optimizations removed
and may actually be slower.
Future CLs will bring back & add optimizations.
R=r, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/5081042
|
|
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5123047
|
|
Case-insensitive strcmp without using ToLower.
(Using ToLower is not always correct, and it allocates.)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5143044
|
|
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src
runs all tests
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4715041
|
|
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.
R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
|
|
This is a core API change.
1) gofix misc src
2) Manual adjustments to the following files under src/pkg:
gob/decode.go
rpc/client.go
os/error.go
io/io.go
bufio/bufio.go
http/request.go
websocket/client.go
as well as:
src/cmd/gofix/testdata/*.go.in (reverted)
test/fixedbugs/bug243.go
3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go)
Compiles and runs all tests.
R=r, rsc, gri
CC=golang-dev
https://golang.org/cl/4607052
|
|
Also some cleanup, removing redundant code. Make more
things use NewRequest. Add some tests, docs.
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/4561047
|
|
Added corresponding tests.
R=rsc
CC=golang-dev
https://golang.org/cl/4560045
|
|
R=r, bradfitz, r
CC=golang-dev
https://golang.org/cl/4529064
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
|
|
R=gri, rsc
CC=golang-dev
https://golang.org/cl/4300044
|
|
This speeds up strings.ToLower, etc.
before/after:
strings_test.BenchmarkMapNoChanges 1000000 1013 ns/op
strings_test.BenchmarkMapNoChanges 5000000 442 ns/op
R=r, rog, eh, rsc
CC=golang-dev
https://golang.org/cl/4306056
|
|
These are the top runners. More to come.
Also print two digits of timing info under -test.v.
R=rsc
CC=golang-dev
https://golang.org/cl/4317044
|
|
R=dsymonds
CC=golang-dev
https://golang.org/cl/4264052
|
|
$ gotest -test.v -test.run=IndexRune -test.bench=.*
=== RUN strings_test.TestIndexRune
--- PASS: strings_test.TestIndexRune (0.0 seconds)
PASS
strings_test.BenchmarkIndexRune 20000000 105 ns/op
strings_test.BenchmarkIndexByte 50000000 48 ns/op
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/4267050
|
|
R=r
CC=golang-dev
https://golang.org/cl/3814041
|
|
R=r
CC=golang-dev
https://golang.org/cl/3364041
|
|
The need for a LastIndexAny function has come up in the discussion
for https://golang.org/cl/3008041/. This function is
implemented analogously to lastIndexFunc, using functions from
the utf8 package.
R=r, rsc, PeterGo
CC=golang-dev
https://golang.org/cl/3057041
|
|
Tiny helper to avoid strings.Index(s, sub) != -1
R=rsc, r2, r
CC=golang-dev
https://golang.org/cl/2265044
|
|
R=gri
CC=golang-dev
https://golang.org/cl/2763041
|
|
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
|
|
R=r
CC=golang-dev, rsc
https://golang.org/cl/2271041
|
|
R=r, rsc
CC=golang-dev
https://golang.org/cl/2250042
|
|
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
|
|
Basically these functions are implemented the same way as the
corresponding functions in the strings package. Test functions
are implemented for IndexRune and FieldsFunc.
Additionally two typos are fixed in packages bytes and strings.
R=r
CC=golang-dev
https://golang.org/cl/1696062
|
|
Fixes #980.
Made it return an empty array, rather than crash.
Added relevant test cases to strings.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/1914041
|
|
R=r, rsc
CC=golang-dev
https://golang.org/cl/1669055
|
|
This CL basically applies the same changes as
http://code.google.com/p/go/source/detail?r=5e0a29014e8e
but for bytes package.
R=r, rog
CC=golang-dev
https://golang.org/cl/1670052
|
|
strings.ToTitle converts all characters to title case, which for consistency with the
other To* functions it should continue to do. This CL adds string.Title, which
does a proper title-casing of the string.
A similar function for package bytes will follow once this is settled.
Fixes #933.
R=rsc
CC=golang-dev
https://golang.org/cl/1869042
|