1
0
mirror of https://github.com/golang/go synced 2024-10-04 05:21:22 -06:00
Commit Graph

6662 Commits

Author SHA1 Message Date
Brad Fitzpatrick
d53385fd0c os: don't permit Process.Signal after a successful Wait
R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/4689043
2011-07-11 15:47:42 -07:00
Brad Fitzpatrick
d1f4e0d14e exec: closeAfterWait append bug
Wasn't actually eager closing the fds as a result of the
copy/paste bug. (GC was doing it instead)

R=rsc
CC=golang-dev
https://golang.org/cl/4671057
2011-07-11 14:46:46 -07:00
Evan Martin
2f69a73591 json: encode \r and \n in strings as e.g. "\n", not "\u000A"
This is allowed by the JSON spec and is shorter/easier to read.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4678046
2011-07-11 07:31:08 -07:00
Brad Fitzpatrick
f19b24a182 strconv: handle [-+]Infinity in atof
This is the form as returned by Postgres, as well
as JavaScript.

I've tried and failed to find authorative docs online
about the proper string serialization, if any.

R=golang-dev, gri, r, r, rsc
CC=golang-dev
https://golang.org/cl/4650077
2011-07-11 07:25:45 -07:00
Rob Pike
d366c36945 exp/template: fix bug in argument evaluation.
Must keep dot and the receiver separate - variables broke that symmetry.
Also clean up function invocation and rename "data" to "dot" for clarity.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4678048
2011-07-11 18:06:24 +10:00
Alex Brainman
3c6a7b3fc5 go/build: use os.MkdirAll to create directories
Replaces "mkdir -p ..." command, as Windows mkdir command
does not support -p flag. Also, is simpler and faster then
launching new process.

R=golang-dev, mattn.jp, adg, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4626087
2011-07-11 15:40:41 +10:00
Rob Pike
7b79b3b244 exp/template: fields and methods on variables.
Not strictly necessary (you could achieve the same, clumsily,
via with blocks) but great to have: $x.Field, $y.Method.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4678047
2011-07-11 15:23:38 +10:00
Rob Pike
96bbcc4256 exp/template: documentation glitches and typos.
Also explain that len(v)==0 makes v a 'zero value'
in template execution.

R=golang-dev, dsymonds, adg, r
CC=golang-dev
https://golang.org/cl/4691041
2011-07-11 14:43:21 +10:00
Rob Pike
0027dc91b0 exp/template: simpler parse of char constants.
We can avoid the check against empty constants (''),
which UnquoteChar doesn't handle well, by leaving on
the trailing quote and seeing that's all we have left at the end.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4657090
2011-07-11 12:36:10 +10:00
Rob Pike
bf9531f80b exp/template: character constants.
Easier to implement than to justify leaving them out.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4662089
2011-07-11 11:46:22 +10:00
Rob Pike
e7030e7fef exp/template: static check for defined variables.
Worth catching at parse time rather than execution. Plus it's really easy.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4641100
2011-07-11 10:01:15 +10:00
Rob Pike
1fe9c9a78f exp/eval: delete binary
Mistakenly checked in.
Fixes #2058.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4670057
2011-07-11 09:36:17 +10:00
Rob Pike
e44853c969 flag: make -help nicer.
- suppress the print that -help is not defined.
- return a special error code if -help is set
- do not change behavior if an explict "help" flag is defined.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4641099
2011-07-11 09:35:50 +10:00
Rob Pike
abae847134 exp/template: add functions print and println.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4687041
2011-07-11 09:19:18 +10:00
Rob Pike
4acddca41b exp/template: package documentation
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4675072
2011-07-10 20:56:26 +10:00
Nigel Tao
87d9e7e166 image: change Pix[0] to mean top-left corner of an image's Rect instead
of the origin.

image/png and image/jpeg benchmarks show no significant changes.

The image/draw changes suggest to me that making a gofix for this is not
feasible. People are just going to have to make manual fixes.

R=r
CC=golang-dev
https://golang.org/cl/4681044
2011-07-10 14:29:47 +10:00
Andrew Gerrand
4d47600f46 archive/zip: add Writer
R=bradfitz, dchest, r, rsc
CC=golang-dev
https://golang.org/cl/4523077
2011-07-10 11:30:16 +10:00
Evan Martin
e45b3213cd multipart: use textproto to handle multiline header
R=bradfitz
CC=golang-dev
https://golang.org/cl/4686044
2011-07-09 15:18:31 -07:00
Andrew Balholm
b053400e37 http: update triv.go with gofix
Sample code in triv.go wouldn't compile because it didn't use the new
FileSystem interface.
This was discussed on golang-nuts on July 7.
https://groups.google.com/forum/#!topic/golang-nuts/NMhZk3Ft_Vc

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4684044
2011-07-09 15:10:39 -07:00
Rob Pike
3987b91213 exp/template: better template invocation
1) Make the value optional ({{template "foo"}})
2) Allow the template identifier to be a thing of type *Template.
The second makes it easy to drop templates in to a set dynamically
during invocation.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4671056
2011-07-10 07:32:01 +10:00
Rob Pike
e86d727e60 exp/template: vars as arguments to functions and methods.
That should be it, bugs aside.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4671055
2011-07-09 17:11:35 +10:00
Rob Pike
58baf64827 exp/template: variable evaluation.
Still need to do static checking of declarations during parse.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/4667070
2011-07-09 12:05:39 +10:00
Rob Pike
bbf5eb5ba2 exp/template: delete upward evaluation.
It was an ill-advised carryover from the previous template package.
Also clean up function evaluation.
Also add a Name method to Template.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4657088
2011-07-09 08:59:56 +10:00
Rob Pike
d3d08e1e3a exp/template: forgot to allow . as a function argument
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4671053
2011-07-08 18:25:46 +10:00
Rob Pike
b8c664297b exp/template: parse variables and declarations
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4631099
2011-07-08 17:54:16 +10:00
Rob Pike
ee14989e43 exp/template: lex variables
Variables start with'$' and are declared with ':='.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4662084
2011-07-08 17:53:55 +10:00
Rob Pike
02039b6345 exp/template: add a tree-walking example to the test.
Also fix a comment formatting glitch.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4672054
2011-07-08 16:49:06 +10:00
Andrew Gerrand
ad58dc9d26 exp/template: the must-have MustParse functions
R=r
CC=golang-dev
https://golang.org/cl/4641096
2011-07-08 16:01:32 +10:00
Rob Pike
a852981d17 exp/template: allow fields and methods to be found in parent structs.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4657085
2011-07-08 15:22:05 +10:00
Andrew Gerrand
5bcbcab311 sort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]
Includes 'sorthelpers' gofix and updates to tree.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4631098
2011-07-08 10:52:50 +10:00
David Symonds
e67a2504a1 gob: export fields in structs in the package documentation.
R=r
CC=golang-dev
https://golang.org/cl/4648075
2011-07-08 10:51:56 +10:00
Brad Fitzpatrick
3236097ab0 cgi: don't depend on CGI.pm for tests
CGI.pm used to be part of the Perl core,
but some distros now bundle perl-core
and perl-modules separately.

It's not worth depending on.

R=golang-dev, mattn.jp
CC=golang-dev
https://golang.org/cl/4675063
2011-07-07 17:45:28 -07:00
Nigel Tao
b39afde805 image/draw: add draw tests where the destination image doesn't start
at (0, 0).

Also refactor the test to use the SubImage method rather than monkeying
with an image's Pix and Rect fields.

R=r
CC=golang-dev
https://golang.org/cl/4678045
2011-07-08 09:54:21 +10:00
Adam Langley
d1d466f620 crypto/x509: prevent chain cycles in Verify
It's possible to include a self-signed root certificate as an
intermediate and push Verify into a loop.

I already had a test for this so I thought that it was ok, but it
turns out that the test was void because the Verisign root certificate
doesn't contain the "IsCA" flag and so it wasn't an acceptable
intermediate certificate for that reason.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4657080
2011-07-07 18:06:50 -04:00
Nigel Tao
03f987c8ea image: tighten Paletted.Opaque to check only those palette entries
in the image, not all palette entries.

R=r
CC=golang-dev
https://golang.org/cl/4672049
2011-07-07 16:32:19 +10:00
Rob Pike
07c9a92564 os: fix documentation for FileInfo.Name.
It's the base name, not the full name.
Fixes #2047.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4680041
2011-07-07 16:05:38 +10:00
Rob Pike
238274ede0 exp/template: handle pointers and values in empty interfaces.
R=golang-dev, r, mattn.jp
CC=golang-dev
https://golang.org/cl/4664064
2011-07-07 14:51:35 +10:00
Rob Pike
8d538c6d3d exp/template: change the name from 'metacharacter' to 'delimiter',
because that's what they are.
No semantic change.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4675060
2011-07-07 10:56:33 +10:00
Gideon Jan-Wessel Redelinghuys
582d6e5848 crypto/openpgp: fixed dangerous use of for loop variable
In function readSignedMessage a pointer to for loop variable 'key' was incorrectly being assigned
to md.SignedBy. Changed so that md.SignedBy is pointing to the 'more correct' memory position.

R=golang-dev, r, agl
CC=golang-dev
https://golang.org/cl/4631088
2011-07-07 10:49:03 +10:00
Alex Brainman
e71fc0c1fe syscall: rearrange windows code so 386 and amd64 can share files
R=golang-dev, r
CC=golang-dev, vcc.163
https://golang.org/cl/4641093
2011-07-07 10:40:45 +10:00
Rob Pike
46ecd6f141 exp/template: index: forgot the always last-to-arrive uintptr.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4636087
2011-07-07 07:00:48 +10:00
Adam Langley
1aa571d38b asn1: support T61 and UTF8 string.
There is no end to the kitchen sink of string types in ASN.1.

Fixes #1953.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4672045
2011-07-06 16:25:44 -04:00
Adam Langley
502589e030 crypto/tls: fix generate_cert.go
Fixes #2030.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4635092
2011-07-06 16:22:21 -04:00
Ian Lance Taylor
7b0bb48056 json: fix test if rand returns 0.
Fixes test when run with gccgo using optimization, which
changes the order of the calls to rand.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4639101
2011-07-06 13:00:54 -07:00
Rob Pike
6732bd3526 exp/template: index function for arrays, slices, and maps.
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/4643072
2011-07-06 22:27:06 +10:00
Rob Pike
64228e36a4 exp/template: silence test noise (but add a flag to put it back)
Also delete a TODO and clean up a little evaluation code.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4643071
2011-07-06 17:46:36 +10:00
David Symonds
33705ddea1 exp/template: add a JavaScript escaper.
R=r
CC=golang-dev
https://golang.org/cl/4671048
2011-07-06 16:51:49 +10:00
Rob Pike
a33cc423b4 exp/template: allow an empty interface value to be the target of range, etc.
We extract the concrete value inside.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4677041
2011-07-06 16:40:46 +10:00
Rob Pike
381a555f40 exp/template: improve error message for non-exported field.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4636086
2011-07-06 15:56:39 +10:00
Rob Pike
a8e5db9449 maketables: update debugging data.
This is unused in the generation of the tables, but was incorrect if we ever needed it.
Also update the reference to the document.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4626097
2011-07-06 15:35:23 +10:00
David Symonds
9d5ed1744a exp/template: add missing dotNode case.
R=r
CC=golang-dev
https://golang.org/cl/4672044
2011-07-06 15:14:10 +10:00
Rob Pike
9495dd31d2 exp/template: fixes and updates.
- fix line numbers - forgot to update state.line during execution
- add a comment convention {{/* comment */}}
- set.Template returns the named template in the set
- set.Execute executes the named template in the set
- use a local methodByName so this package can be used with earlier release of reflect.
- use initial cap to detect exported names

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4668054
2011-07-06 14:46:41 +10:00
David Symonds
d45ba2c146 exp/template: remove debugging dreg.
R=r, gri
TBR=r
CC=golang-dev
https://golang.org/cl/4671047
2011-07-06 14:18:46 +10:00
Yasuhiro Matsumoto
1e6d946594 html: parse start tags that aren't explicitly otherwise dealt with.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4626080
2011-07-06 13:08:52 +10:00
Rob Pike
329990d525 exp/template: remove the need for a goroutine.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4626095
2011-07-06 11:02:53 +10:00
Rob Pike
4657d7d7db exp/template: remove the visibility of the token channel from the parser.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4675053
2011-07-06 10:13:53 +10:00
Luuk van Dijk
13d048a221 gc: fix %N for OGOTO nodes.
6g -W crashed on any source with a goto. this fixes that.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4675052
2011-07-06 00:02:03 +02:00
Rob Pike
eea5443572 exp/template: add templates to sets; boolean logic.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4670045
2011-07-05 17:05:15 +10:00
Andrew Gerrand
b7db4fef22 godoc: ignore directories that begin with '.'
Fixes #2017.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4675047
2011-07-05 17:00:18 +10:00
Rob Pike
5b1658232e exp/template: statically check that functions names have been defined.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4675046
2011-07-05 16:02:34 +10:00
Fazlul Shahriar
bedee318d5 os: fix build for Plan 9
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4657074
2011-07-05 16:01:29 +10:00
Rob Pike
cc9fed7c1a exp/template: add an html escaping function.
R=golang-dev, dsymonds, adg
CC=golang-dev
https://golang.org/cl/4626092
2011-07-05 15:58:54 +10:00
Nigel Tao
104f57ad39 image: add a test for filling sub-images.
R=r
CC=golang-dev
https://golang.org/cl/4626091
2011-07-05 14:42:31 +10:00
Rob Pike
b177c97803 exp/template: functions
Add the ability to attach functions to template and template sets.
Make variadic functions and methods work.
Still to come: static checking of function names during parse.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4643068
2011-07-05 14:23:51 +10:00
Andrew Gerrand
a342006207 goinstall: only report successfully-installed packages to the dashboard
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4657071
2011-07-04 16:05:11 +10:00
Rob Pike
13f889778e exp/template: add template sets, allowing templates to reference one another
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4673042
2011-07-04 15:15:47 +10:00
Rob Pike
72efdea20e exp/template: allow complex numbers, add 'with', 'define', and 'template' keywords.
Also simplify the handling of keywords.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4639096
2011-07-04 11:50:35 +10:00
Rob Pike
db0e358022 reflect: allow Len on String values.
It's probably just an oversight that it doesn't work,
perhaps caused by analogy with Cap.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4634125
2011-07-04 11:45:31 +10:00
Andrew Gerrand
8c7a73bbbb go/build: evaluate symlinks before comparing path to GOPATH
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/4645078
2011-07-04 10:26:03 +10:00
Andrew Gerrand
3cd8f27d79 godoc: search GOPATH for documentation
R=rsc, mattn.jp
CC=golang-dev
https://golang.org/cl/4627065
2011-07-02 14:07:06 +10:00
Andrew Gerrand
72a73198df goinstall: documentation for new remote repository behavior and tweaks
R=rsc, julian
CC=golang-dev
https://golang.org/cl/4642049
2011-07-02 14:05:43 +10:00
Adam Langley
acc284d847 crypto/openpgp: add ability to reserialize keys.
This changes Signature so that parsed signatures can be reserialized
exactly. With this ability we can add Serialize to Entity and also the
ability to sign other public keys.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4627084
2011-07-01 13:53:12 -04:00
Paul Borman
00f7cd4b36 csv: new package
csv reader/writer based on RFC 4180

R=rsc, mattn.jp, r, dchest
CC=golang-dev
https://golang.org/cl/4629085
2011-07-01 12:16:56 -04:00
Russ Cox
1eb656784c 5c, 6c: fix build
R=ken2
CC=golang-dev
https://golang.org/cl/4668049
2011-07-01 11:13:38 -04:00
Alex Brainman
810a2dc077 lib9: stop build if ../version.bash fails
R=golang-dev, m, rsc
CC=golang-dev
https://golang.org/cl/4639091
2011-07-01 10:42:25 -04:00
Wei Guangjing
63b8b948d9 windows: define and use syscall.Handle
Fixes #1487.

R=rsc, alex.brainman, go.peter.90, mikioh.mikioh, mattn.jp
CC=golang-dev
https://golang.org/cl/4600042
2011-07-01 10:18:07 -04:00
Yasuhiro Matsumoto
21efa147ba cmd/goinstall: try to access via https.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667051
2011-07-01 10:11:33 -04:00
Lucio De Re
b0449c50f7 8c: fixes for Plan 9 build
8c/gc.h:
. Added <u.h> header.
. Added "lD" pragma for "*Adr" to supplement "D".

8c/swt.c:
. Removed unreferenced "thestring" arguments in Bprint() calls.

cc/acid.c:
cc/com.c:
cc/com64.c:
cc/dcl.c:
cc/scon.c:
. Added <u.h>, required by "cc.h".

cc/bits.c:
. Added <u.h>, required by "cc.h".

cc/cc.h:
. Removed <u.h> and <ctype.h>.
. Added "O" pragma to accept "uint" as well as "int".
. Added new "U" pragma (char *).

cc/cc.y:
. Added <u.h> before <stdio.h> (and "cc.h").

cc/dpchk.c:
cc/mac.c:
. Added <u.h> and <ctype.h>.

cc/funct.c:
. Added <u.h>, required by "cc.h".

cc/godefs.c
. Added <u.h>, required by "cc.h".
. Dropped unused "t" argument in Bprint().

cc/lex.c:
. Added <u.h> and <ctype.h>.
. Removed unnecessary incrementation.
. Changed exit() invocations with exits().

cc/omachcap.c:
. Added <u.h>, required by "cc.h".
. USED(n) for unused argument to machcap().

cc/sub.c:
. Added <u.h> and <ctype.h>.

R=rsc
CC=golang-dev
https://golang.org/cl/4629070
2011-07-01 09:50:24 -04:00
Brad Fitzpatrick
3aa8272e44 fix build; add simplify.go to regexp Makefile
R=rsc
CC=golang-dev
https://golang.org/cl/4643062
2011-06-30 10:45:36 -07:00
Yasuhiro Matsumoto
2f9fbad043 http/cgi: add Handler.Dir to specify working directory
R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/4635042
2011-06-30 09:44:23 -07:00
Dmitriy Vyukov
dd2074c82a sync: improve Mutex to allow successive acquisitions
This implementation allows a goroutine to do successive acquisitions
of a mutex even if there are blocked goroutines.
Moreover, it allows a newcomer goroutine to acquire a mutex ahead of
blocked goroutines (that is, it does not enforce FIFO).
On implementation level it's achieved by separating waiter count and
locked flag.
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows (with 4631059 "replace Semacquire/Semrelease implementation"
patch applied):
benchmark                                        old ns/op    new ns/op    delta
sync_test.BenchmarkMutexUncontended                  24.10        25.40   +5.39%
sync_test.BenchmarkMutexUncontended-2                12.00        13.00   +8.33%
sync_test.BenchmarkMutexUncontended-4                 6.06         6.83  +12.71%
sync_test.BenchmarkMutexUncontended-8                 3.63         3.60   -0.83%
sync_test.BenchmarkMutexUncontended-16                2.38         2.49   +4.62%

sync_test.BenchmarkMutex                             25.00        26.40   +5.60%
sync_test.BenchmarkMutex-2                          231.00        49.00  -78.79%
sync_test.BenchmarkMutex-4                          259.00       114.00  -55.98%
sync_test.BenchmarkMutex-8                          641.00       110.00  -82.84%
sync_test.BenchmarkMutex-16                        1380.00        96.30  -93.02%

sync_test.BenchmarkMutexSlack                        24.80        26.20   +5.65%
sync_test.BenchmarkMutexSlack-2                     210.00       106.00  -49.52%
sync_test.BenchmarkMutexSlack-4                     453.00       119.00  -73.73%
sync_test.BenchmarkMutexSlack-8                    1024.00       105.00  -89.75%
sync_test.BenchmarkMutexSlack-16                   1291.00        91.90  -92.88%

sync_test.BenchmarkMutexWork                        796.00       796.00   +0.00%
sync_test.BenchmarkMutexWork-2                      399.00       401.00   +0.50%
sync_test.BenchmarkMutexWork-4                      216.00       212.00   -1.85%
sync_test.BenchmarkMutexWork-8                     1547.00       196.00  -87.33%
sync_test.BenchmarkMutexWork-16                    2754.00       287.00  -89.58%

sync_test.BenchmarkMutexWorkSlack                   792.00       800.00   +1.01%
sync_test.BenchmarkMutexWorkSlack-2                 430.00       420.00   -2.33%
sync_test.BenchmarkMutexWorkSlack-4                 467.00       230.00  -50.75%
sync_test.BenchmarkMutexWorkSlack-8                1860.00       273.00  -85.32%
sync_test.BenchmarkMutexWorkSlack-16               3029.00       294.00  -90.29%

R=rsc
CC=golang-dev
https://golang.org/cl/4631075
2011-06-30 11:13:29 -04:00
Russ Cox
b4cae4aee2 exp/regexp/syntax: finish Regexp manipulation
Except for the inevitable bug fixes, the Regexp code is done.

R=sam.thorogood, r
CC=golang-dev
https://golang.org/cl/4635082
2011-06-30 10:26:22 -04:00
Russ Cox
a809abafa5 govet: automate test
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4629084
2011-06-30 10:26:11 -04:00
Yasuhiro Matsumoto
054cf72b56 html: fix nesting when parsing a close tag.
R=nigeltao
CC=golang-dev
https://golang.org/cl/4636067
2011-06-30 23:16:33 +10:00
Julian Phillips
8ffbc4016a goinstall: Add support for generic hosts using special import form
This change extends goinstall to support "magic" package names of the
form:
        <host>/<repo>.<vcs>/<path>

Where <host> is the hostname, <repo> the path to the repository, <vcs>
the type of vcs (git, hg, bzr or svn), and <path> is the path inside the
repository that contains the source code for the package.

For example: "example.com/pub/foo.hg/src" means download the Mercurial
repository at either pub/foo.hg or pub/foo from example.com and then
build and install the source files from src inside the repository
checkout.

Repositories on the built-in hostings sites (github, bitbucket,
launchpad and googlecode) must still use the old form (i.e.
github.com/xxx/yyy.git/src will be rejected).

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4626064
2011-06-30 18:54:53 +10:00
Andrew Gerrand
4dfdacd2bd build: make version.bash aware of branches
Fixes #2026.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4645074
2011-06-30 15:39:00 +10:00
Brad Fitzpatrick
73896bdc85 net: break up and simplify Dial a bit
No API or functional change.

R=jacek.masiulaniec, mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/4630081
2011-06-29 21:56:13 -07:00
Rob Pike
de36d19dfb time: zero-pad two-digit years.
Fixes #2024

R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4635083
2011-06-30 14:05:29 +10:00
David Symonds
ba8e61d833 os: use a different symbol from syscall in mkunixsignals.sh.
Open is more likely to be present than Syscall.

R=rsc
CC=golang-dev
https://golang.org/cl/4645073
2011-06-30 13:35:40 +10:00
Brad Fitzpatrick
d980f538d7 http: document that ServerConn and ClientConn are low-level
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4635081
2011-06-29 18:23:38 -07:00
Alex Brainman
7cc5d5db9d run.bash: small fix
Fixes #2025.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4636075
2011-06-30 09:44:16 +10:00
Andrew Balholm
7983ab9d1a http: make NewChunkedReader public
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4634112
2011-06-29 12:27:53 -07:00
Russ Cox
b2127a6c99 testing: make ResetTimer not start/stop the timer
R=r
CC=golang-dev
https://golang.org/cl/4626085
2011-06-29 10:26:16 -04:00
Russ Cox
25733a94fd reflect: support for struct tag use by multiple packages
Each package using struct field tags assumes that
it is the only package storing data in the tag.
This CL adds support in package reflect for sharing
tags between multiple packages.  In this scheme, the
tags must be of the form

        key:"value" key2:"value2"

(raw strings help when writing that tag in Go source).

reflect.StructField's Tag field now has type StructTag
(a string type), which has method Get(key string) string
that returns the associated value.

Clients of json and xml will need to be updated.
Code that says

        type T struct {
                X int "name"
        }

should become

        type T struct {
                X int `json:"name"`  // or `xml:"name"`
        }

Use govet to identify struct tags that need to be changed
to use the new syntax.

R=r, r, dsymonds, bradfitz, kevlar, fvbommel, n13m3y3r
CC=golang-dev
https://golang.org/cl/4645069
2011-06-29 09:52:34 -04:00
Wei Guangjing
f83609f642 runtime: windows/amd64 port
R=rsc, alex.brainman, hectorchu, r
CC=golang-dev
https://golang.org/cl/3759042
2011-06-29 17:37:56 +10:00
Robert Hencke
83550f0728 gofix: fixes for os/signal changes
Fixes #1971.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4630056
2011-06-29 16:44:47 +10:00
Rob Pike
d6f80e1a4c regexp: document that Regexp is thread-safe.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4667047
2011-06-29 15:41:09 +10:00
Rob Pike
c756a1954c exp/template: boolean constants
R=rsc
CC=golang-dev
https://golang.org/cl/4628073
2011-06-29 15:02:04 +10:00
Russ Cox
7e1a3e9f20 exp/regexp/syntax: incremental concat, alternate
Also reuse of *Regexp nodes.

I believe this is the end of the parser.
The only non-execution code that remains is
the code to expand x{3,5} into simpler operations.

R=sam.thorogood, r
CC=golang-dev
https://golang.org/cl/4629078
2011-06-29 00:55:37 -04:00
Russ Cox
ff4518da17 gc: fix package quoting logic
The decision for when to say "hash/crc32".New instead of
crc32.New in an error was double-counting imports
from different packages or indirect imports, so it was
quoting even when there was no ambiguity.

R=ken2
CC=golang-dev
https://golang.org/cl/4645070
2011-06-28 23:58:35 -04:00