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

10457 Commits

Author SHA1 Message Date
Rob Pike
10e012c85f template/parse: rename Set to Parse
Preamble to the simplification of the template API.
Although the signature of Parse (nee Set) changes,
it's really an internal function, used only by
text/template.

R=golang-dev, rsc, gri, r
CC=golang-dev
https://golang.org/cl/5415052
2011-11-18 13:10:15 -08:00
Adam Langley
5cad861136 crypto/x509: fix documentation typos
Thanks to Jeff R. Allen for pointing them out.

R=bradfitz, gri
CC=golang-dev
https://golang.org/cl/5412052
2011-11-18 15:48:34 -05:00
David Crawshaw
28cead8b6c codereview: gofmt check for non-src/ files
Gives other projects the benefit of the gofmt presubmit.
Results in minor changes in the doc/ directory:
        find doc -name \*.go -exec gofmt -d {} \;

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5158042
2011-11-18 12:42:30 -08:00
Andrew Gerrand
95474b6283 tag weekly.2011-11-18
R=r
CC=golang-dev
https://golang.org/cl/5413052
2011-11-19 07:21:05 +11:00
Andrew Gerrand
3af28bd886 weekly.2011-11-18
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5416045
2011-11-19 07:20:02 +11:00
Russ Cox
cf5a1c0909 codereview: put message back in post-commit mails
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5417049
2011-11-18 14:30:06 -05:00
Lucio De Re
aa3dbf2947 syscall: fix env routines for Plan 9
R=golang-dev
CC=ality, golang-dev, rsc
https://golang.org/cl/5364063
2011-11-18 13:36:06 -05:00
Russ Cox
ab957154b6 codereview: undo last night's rollback
Update version check from 1.4 to 1.9.  Suggest 2.0.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5413046
2011-11-18 12:58:44 -05:00
John Beisley
0e60804b4a exp/ssh: Add support for (most) of the ciphers from RFC4253, RFC4344 and RFC4345.
R=dave, agl, taruti, rsc, r
CC=golang-dev
https://golang.org/cl/5342057
2011-11-18 12:56:57 -05:00
Adam Langley
c638813ef6 Add huin@google.com to the CONTRIBUTORS
R=r
CC=golang-dev
https://golang.org/cl/5413049
2011-11-18 12:41:25 -05:00
Dmitriy Vyukov
151bcb11a8 exp/terminal: fix Makefile formatting for deps.bash
deps.bash does not understand current format,
so make.bash fails (with MAKEFLAGS=-j20).

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5410046
2011-11-18 15:30:36 +03:00
Andrew Gerrand
5ca38eda49 undo CL 5395044 / d88e746d3785
Breaks with hg 1.6.4. Roll back until it's fixed.

««« original CL description
codereview: cleanup + basic tests

R=adg, bradfitz
CC=golang-dev
https://golang.org/cl/5395044
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/5410047
2011-11-18 21:33:04 +11:00
Rob Pike
25d2987dd9 text/template: refactor set parsing
Parse {{define}} blocks during template parsing rather than separately as a set-specific thing.
This cleans up set parse significantly, and enables the next step, if we want, to unify the
API for templates and sets.
Other than an argument change to parse.Parse, which is in effect an internal function and
unused by client code, there is no API change and no spec change yet.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5393049
2011-11-17 22:53:23 -08:00
Russ Cox
bbf952c3b4 codereview: cleanup + basic tests
R=adg, bradfitz
CC=golang-dev
https://golang.org/cl/5395044
2011-11-18 00:16:15 -05:00
Andrew Gerrand
0bbbb44e99 doc: link to Chinese translation of A Tour of Go
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5415046
2011-11-18 15:22:48 +11:00
Gustavo Niemeyer
558d055352 exp/terminal: fix build after os.Errno changes
Also include exp/terminal in linux build so such failures
are noticed.

R=rsc
CC=golang-dev
https://golang.org/cl/5416044
2011-11-18 01:12:57 -02:00
Anthony Martin
4a2d30e13b runtime: add nanotime for Plan 9
R=paulzhol, rsc, dave, rminnich
CC=golang-dev
https://golang.org/cl/5327063
2011-11-17 22:09:28 -05:00
Gustavo Niemeyer
f6279b46f8 html: fix doc after Err method name change
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5411045
2011-11-18 01:06:59 -02:00
Alex Brainman
9bfe9dfde7 mime: remove ".wav" from tests (to fix build)
It looks like not all computers have
mime type for .wav extension.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5415045
2011-11-18 13:24:17 +11:00
Joe Poirier
984b4e381d misc/windows packager development intermediate check-in
The installer now: allows a user to select an alternative
install directory, it now adds a Go folder to the Programs
Menu, and it places two shortcuts on the user's desktop.
The Program Menu folder contains shortcuts to the uninstaller
and two batch files, go.bat and godoc.bat. The desktop
shortcuts also point to go.bat and godoc.bat.

go.bat sets the Go environment, including Path, and spawns a
Window's shell. godoc.bat starts the godoc server at
localhost:6060 then spawns a browser window pointing to the
document server.

Setting the environment temporarily and spawning a shell, via
go.bat, should be safer than messing with the system's environment
and it makes the user experience a bit more streamlined.

The packager does work in its current state but it still needs
some polishing. And yes, the plan is to add a dialogue to allow
the user to decline the desktop shortcuts.

R=rsc, alex.brainman, tjyang2001
CC=golang-dev
https://golang.org/cl/5399042
2011-11-17 17:54:06 -06:00
Alex Brainman
ac17fd4cd2 mime: implement TypeByExtension for windows
Fixes #2071.

R=golang-dev, hcwfrichter, pascal, rsc
CC=golang-dev
https://golang.org/cl/5369056
2011-11-18 10:07:36 +11:00
Robert Griesemer
9859af879b godoc: provide mode for flat (non-indented) directory listings
This feature should make it easier to look at very large
directory trees.

- a new mode (URL: /pkg/?m=flat) shows directory listings w/o
  indentation and entries with full path (html and text mode)
- in text mode, hierarchical (non-flat) directory listings are
  now presented with indentation (/pkg/?m=text)
- in html mode, hierarchical (non-flat) directory listings are
  presented with slightly less indentation
- there is an internal hook for programmatic control of the
  display mode (for specialized versions of godoc).

R=bradfitz
CC=golang-dev, rsc
https://golang.org/cl/5410043
2011-11-17 14:47:49 -08:00
Joel Sing
ea2c0cd88f os: re-enable hostname test on openbsd
Now that Sysctl() works, re-enable the hostname test.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5408042
2011-11-18 01:53:07 +11:00
Joel Sing
9b571a3120 syscall: hostname/domainname fix for openbsd
Work around a bug that was fixed after OpenBSD 5.0 - a request for
kern.hostname or kern.domainname with a nil value for oldp will result
in a length of zero being returned. If we hit this case use a length
of MAXHOSTNAMELEN (256).

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5408041
2011-11-18 01:52:39 +11:00
Joel Sing
773a921ccb syscall: implement nametomib for openbsd.
Move the existing darwin/freebsd specific nametomib implementation
into the respective operating system dependent files.

Provide a nametomib implementation for openbsd, which operates on a
sysctl MIB that has been pre-generated from the various system headers
by mksysctl_openbsd.pl.

R=rsc
CC=golang-dev
https://golang.org/cl/4935044
2011-11-17 23:13:49 +11:00
Andrew Balholm
a1dbfa6f09 html: parse <isindex>
Pass tests2.dat, test 42:
<isindex test=x name=x>

| <html>
|   <head>
|   <body>
|     <form>
|       <hr>
|       <label>
|         "This is a searchable index. Enter search keywords: "
|         <input>
|           name="isindex"
|           test="x"
|       <hr>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5399049
2011-11-17 13:12:13 +11:00
Andrew Gerrand
0b1bcf8f94 http: fix serving from CWD with http.ServeFile
http: make Dir("") equivalent to Dir(".")

Fixes #2471.

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5370061
2011-11-17 11:42:25 +11:00
Alex Brainman
3ec82f6e09 exp/ssh: change test listen address, also exit test if fails
R=golang-dev, rsc
CC=dave, golang-dev
https://golang.org/cl/5364061
2011-11-17 11:20:42 +11:00
Russ Cox
a479a45548 reflect: make Value an opaque struct
Making Value opaque means we can drop the interface kludges
in favor of a significantly simpler and faster representation.
v.Kind() will be a prime candidate for inlining too.

On a Thinkpad X201s using -benchtime 10:

benchmark                           old ns/op    new ns/op    delta
json.BenchmarkCodeEncoder           284391780    157415960  -44.65%
json.BenchmarkCodeMarshal           286979140    158992020  -44.60%
json.BenchmarkCodeDecoder           717175800    388288220  -45.86%
json.BenchmarkCodeUnmarshal         734470500    404548520  -44.92%
json.BenchmarkCodeUnmarshalReuse    707172280    385258720  -45.52%
json.BenchmarkSkipValue              24630036     18557062  -24.66%

benchmark                            old MB/s     new MB/s  speedup
json.BenchmarkCodeEncoder                6.82        12.33    1.81x
json.BenchmarkCodeMarshal                6.76        12.20    1.80x
json.BenchmarkCodeDecoder                2.71         5.00    1.85x
json.BenchmarkCodeUnmarshal              2.64         4.80    1.82x
json.BenchmarkCodeUnmarshalReuse         2.74         5.04    1.84x
json.BenchmarkSkipValue                 77.92       103.42    1.33x

I cannot explain why BenchmarkSkipValue gets faster.
Maybe it is one of those code alignment things.

R=iant, r, gri, r
CC=golang-dev
https://golang.org/cl/5373101
2011-11-16 19:18:25 -05:00
Russ Cox
4d27f64863 gofmt: do not stop test.sh after 1 error
Fix bug377.go to be gofmt-compliant.

R=gri, r, r
CC=golang-dev
https://golang.org/cl/5400045
2011-11-16 18:44:21 -05:00
Andrew Balholm
3276afd4d4 html: parse </optgroup> and </option>
Pass tests2.dat, test 35:
<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <select>
|       <optgroup>
|         <option>
|       <option>
|     <option>

Also pass tests through test 41:
<!DOCTYPE html><!-- XXX - XXX - XXX -->

R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/5395045
2011-11-17 10:25:33 +11:00
Russ Cox
8c6461bcb1 exp/ssh: fix test?
Fixes use of c after Dial failure (causes crash).
May fix Dial failure by listening to 127.0.0.1:0
instead of 0.0.0.0:0 (tests should only listen on
localhost).

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5395052
2011-11-16 18:13:50 -05:00
Russ Cox
7d1d8fe430 go/printer: make //line formatting idempotent
Fixes "test.sh" (long test) in src/cmd/gofmt.

R=gri
CC=golang-dev
https://golang.org/cl/5307081
2011-11-16 17:55:35 -05:00
Lucio De Re
087a34869a syscall, os, time: fix Plan 9 build
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5371092
2011-11-16 17:37:54 -05:00
Christopher Wedgwood
8fdd6c05b1 exp/ssh: add to pkg Makefile
R=rsc, dave
CC=golang-dev
https://golang.org/cl/5399045
2011-11-16 17:34:18 -05:00
Anthony Martin
920df48fb1 gc: support for building with Plan 9 yacc
I've modified Plan 9's yacc to work with
the grammar in go.y.  These are the only
changes necessary on the Go side.

R=rsc
CC=golang-dev
https://golang.org/cl/5375104
2011-11-16 16:58:02 -05:00
Robert Griesemer
d0b9a84ab3 go/ast: remove unused receiver names (cleanup)
R=iant, iant
CC=golang-dev
https://golang.org/cl/5393047
2011-11-16 13:41:26 -08:00
Lucio De Re
293059ad85 cov: fix for Plan 9 build
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/5374086
2011-11-16 16:23:50 -05:00
Gustavo Niemeyer
c9355596cd net/http: fix EOF handling on response body
http.Response is currently returning 0, nil on EOF.

R=golang-dev, bradfitz, bradfitz
CC=golang-dev
https://golang.org/cl/5394047
2011-11-16 17:35:47 -02:00
Brad Fitzpatrick
881f2076fb fcgi: fix server capability discovery
The wrong length was being sent, and two parameters
were also transposed. Made the record type be a type
and made the constants typed, to prevent that sort
of bug in the future.

Fixes #2469

R=golang-dev, edsrzf
CC=golang-dev
https://golang.org/cl/5394046
2011-11-16 10:11:39 -08:00
Rob Pike
f5db4d05f2 html/template: indirect top-level values before printing
text/template does this (in an entirely different way), so
make html/template do the same. Before this fix, the template
{{.}} given a pointer to a string prints its address instead of its
value.

R=mikesamuel, r
CC=golang-dev
https://golang.org/cl/5370098
2011-11-16 09:32:52 -08:00
Dave Cheney
00f9b7680a exp/ssh: fix unmarshal test
Ensure that empty NameLists always return
a zero length []string, not nil.

In practice NameLists are only used in a few
message types and always consumed by a for
range function so the difference between nil
and []string{} is not significant.

Also, add exp/ssh to pkg/Makefile as suggested
by rsc.

R=rsc, agl
CC=golang-dev
https://golang.org/cl/5400042
2011-11-16 10:19:56 -05:00
Andrew Balholm
3307597069 html: parse <optgroup> tags
Pass tests2.dat, test 34:
<!DOCTYPE html><select><option><optgroup>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <select>
|       <option>
|       <optgroup>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5393045
2011-11-16 19:25:55 +11:00
Andrew Balholm
28546ed56a html: parse <caption> elements
Pass tests2.dat, test 33:
<!DOCTYPE html><table><caption>test TEST</caption><td>test

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <table>
|       <caption>
|         "test TEST"
|       <tbody>
|         <tr>
|           <td>
|             "test"

R=nigeltao
CC=golang-dev
https://golang.org/cl/5371099
2011-11-16 12:18:11 +11:00
Yasuhiro Matsumoto
5e5c5c2789 exp/sql: NumInput() allow -1 to ignore checking.
Some database driver can't get number of parameters.
For example:
        http://support.microsoft.com/kb/240205/en-us
So, added way to ignore checking number of parameters with return -1.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5376091
2011-11-15 16:29:43 -08:00
Brad Fitzpatrick
5b7827ec07 sql: document that for drivers, io.EOF means no more rows
This was used in the sql package + tests, but never
documented.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5372107
2011-11-15 14:29:45 -08:00
Mikio Hara
471e43cf00 net, syscall: add missing copyright notices
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5375099
2011-11-16 06:59:08 +09:00
Russ Cox
3a6744d890 os: fix comment per CL 5370091
Made the edit in the wrong client before submitting.

TBR=r
CC=golang-dev
https://golang.org/cl/5374091
2011-11-15 14:54:00 -05:00
Russ Cox
86a6995a7e os: fix windows build
TBR=brainman
CC=golang-dev
https://golang.org/cl/5373105
2011-11-15 14:05:18 -05:00
Russ Cox
a6106eef37 encoding/json: make BenchmarkSkipValue more consistent
Move scanner allocation out of loop.
It's the only allocation in the test so it dominates
when it triggers a garbage collection.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5369117
2011-11-15 13:59:59 -05:00