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

4372 Commits

Author SHA1 Message Date
Russ Cox
0e81e508be fmt: handle os.Error values
Handling os.Error is no different than handling fmt.Stringer
here, so the code is redundant now, but it will be necessary
once error goes in.

Adding it now will make gofix fix it.

R=r
CC=golang-dev
https://golang.org/cl/5331045
2011-10-27 21:20:44 -07:00
Russ Cox
853c84631f template: do not use error as stringer
R=r
CC=golang-dev
https://golang.org/cl/5305069
2011-10-27 21:17:47 -07:00
Russ Cox
c0a0fd6cf4 gob: split uses of gobError, remove unnecessary embedding
Will make gofix for error run more smoothly.
The overloading of gobError appears to be unintentional.

R=r
CC=golang-dev
https://golang.org/cl/5308060
2011-10-27 20:20:59 -07:00
Russ Cox
c1178aae86 strconv: use better errors than os.EINVAL, os.ERANGE
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5327052
2011-10-27 19:46:31 -07:00
Russ Cox
01e9a227cc crypto/tls: add Error method to alert
alerts get used as both values and errors.
Rather than introduce an alertError wrapper,
this CL just adds an Error method, which will
satisfy the error interface when the time comes.

R=agl, bradfitz
CC=golang-dev
https://golang.org/cl/5294073
2011-10-27 19:42:32 -07:00
Russ Cox
29fb5d3e0f xml: simplify test
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5320051
2011-10-27 19:40:41 -07:00
Russ Cox
134d6e4fc4 go/build: avoid os.Error in tests
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5308061
2011-10-27 19:39:40 -07:00
Russ Cox
2b0c49f2e5 go/doc: remove os.NewError anti-heuristic
It will be obsolete when error happens.

Submitting this now will make the error transition earlier,
at the cost of making a locally-built godoc viewing
/pkg/syscall or /pkg/os have some functions appear
under the Error type as constructors.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5305067
2011-10-27 19:39:25 -07:00
Russ Cox
7f91a39d3d encoding/binary: fix type in test
Was working only accidentally.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5303082
2011-10-27 19:38:57 -07:00
Russ Cox
6715551768 crypto/openpgp/error: use Error in names of error impl types
Will make gofix for error work better.
There is no other indication in this file that
these are actually error implementations.

(They are only used elsewhere.)

R=bradfitz
CC=golang-dev
https://golang.org/cl/5305068
2011-10-27 19:38:32 -07:00
Russ Cox
785baa86f1 html: fix print argument in test
R=nigeltao
CC=golang-dev
https://golang.org/cl/5302069
2011-10-27 18:04:29 -07:00
Russ Cox
6808da0163 runtime: lock the main goroutine to the main OS thread during init
We only guarantee that the main goroutine runs on the
main OS thread for initialization.  Programs that wish to
preserve that property for main.main can call runtime.LockOSThread.
This is what programs used to do before we unleashed
goroutines during init, so it is both a simple fix and keeps
existing programs working.

R=iant, r, dave, dvyukov
CC=golang-dev
https://golang.org/cl/5309070
2011-10-27 18:04:12 -07:00
Russ Cox
32f3770ec5 pkg: remove .String() from some print arguments
I found these by adding a check to govet, but the check
produces far too many false positives to be useful.
Even so, these few seem worth cleaning up.

R=golang-dev, bradfitz, iant
CC=golang-dev
https://golang.org/cl/5311067
2011-10-27 18:03:52 -07:00
Andrew Balholm
053549ca1b html: allow whitespace text nodes in <head>
Pass tests1.dat, test 50:
<!DOCTYPE html><script> <!-- </script> --> </script> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <script>
|       " <!-- "
|     " "
|   <body>
|     "-->  EOF"

Also pass tests through test 54:
<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5311066
2011-10-28 09:06:30 +11:00
Russ Cox
fd31d9fd7b go/parser: test and fix := scoping bug
R=iant
CC=golang-dev, gri
https://golang.org/cl/5327048
2011-10-27 12:22:06 -07:00
Andrew Balholm
833fb4198d html: parse <style> elements inside <head> element.
Also correctly handle EOF inside a <style> element.

Pass tests1.dat, test 49:
<!DOCTYPE html><style> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <style>
|       " EOF"
|   <body>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5321057
2011-10-27 10:26:11 +11:00
Andrew Balholm
bd07e4f259 html: close <option> element when opening <optgroup>
Pass tests1.dat, test 34:
<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     "A"
|     <option>
|       "B"
|     <optgroup>
|       "C"
|       <select>
|         "DE"

Also passes tests 35-48. Test 48 is:
</ COM--MENT >

R=nigeltao
CC=golang-dev
https://golang.org/cl/5311063
2011-10-27 09:45:53 +11:00
Russ Cox
6323a40f31 gofix: test import insertion, deletion
Small change to go/ast, go/parser, go/printer so that
gofix can delete the blank line left from deleting an import.

R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/5321046
2011-10-26 14:04:07 -07:00
Adam Langley
4403e6b6d8 crypto/rsa: change public exponent from 3 to 65537
Although there's still no concrete security reason not to use 3, I
think Bleichenbacher has convinced me that it's a useful defense and
it's what everyone else does.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5307060
2011-10-26 10:41:24 -04:00
Alex Brainman
c3733b29d4 net: document why we do not use SO_REUSEADDR on windows
R=rsc, adg
CC=golang-dev
https://golang.org/cl/5302058
2011-10-26 22:25:20 +11:00
Andrew Gerrand
f777be8f83 redo CL 5302057 / dac58d9c9e4a
««« original CL description
http: remove Connection header in ReverseProxy

Fixes #2342

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

R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5296055
2011-10-26 15:27:29 +09:00
Russ Cox
c945f77f41 exp/norm: use rune
Nothing terribly interesting here. (!)

Since the public APIs are all in terms of UTF-8,
the changes are all internal only.

R=mpvl, gri, r
CC=golang-dev
https://golang.org/cl/5309042
2011-10-25 22:26:12 -07:00
Russ Cox
b50a847c3c csv, gob, json, mail, mime, xml: use rune
Nothing terribly interesting here.

R=golang-dev, r, borman
CC=golang-dev
https://golang.org/cl/5315043
2011-10-25 22:23:54 -07:00
Russ Cox
9f6d036f33 bufio, io: use rune
ReadRune, WriteRune change signature.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5314043
2011-10-25 22:23:34 -07:00
Russ Cox
7630a107bb unicode, utf8, utf16: use rune
Everything changes.

R=r
CC=golang-dev
https://golang.org/cl/5310045
2011-10-25 22:23:15 -07:00
Russ Cox
cfa036ae3a old/regexp, old/template, template: use rune
Nothing terribly interesting here.

R=r, gri
CC=golang-dev
https://golang.org/cl/5308042
2011-10-25 22:22:42 -07:00
Russ Cox
4911622055 exp/template/html: use rune
Nothing terribly interesting here.

R=mikesamuel, nigeltao, r
CC=golang-dev
https://golang.org/cl/5307044
2011-10-25 22:22:26 -07:00
Russ Cox
8f5718176f bytes, strings: use rune
Various rune-based APIs change.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5306044
2011-10-25 22:22:09 -07:00
Russ Cox
0e513317b1 big: update for fmt interface changes
Nothing terribly interesting here.

R=gri
CC=golang-dev
https://golang.org/cl/5305046
2011-10-25 22:21:49 -07:00
Russ Cox
4e4eca2618 fmt: use rune
Lots of internal edits.

Formatter and Scanner interfaces change
(clients to be checked by govet).

R=r
CC=golang-dev
https://golang.org/cl/5305045
2011-10-25 22:21:33 -07:00
Russ Cox
28c06182c0 exp/winfsnotify: fix govet-found bug
R=golang-dev, hectorchu
CC=golang-dev
https://golang.org/cl/5304044
2011-10-25 22:21:14 -07:00
Russ Cox
3e52dadfd7 regexp: use rune
Public API of syntax tree changes.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5302046
2011-10-25 22:20:57 -07:00
Russ Cox
5be33e9543 godoc, exp/ebnf, exp/types, go/scanner, scanner: use rune
API question: is a scanner token an int or a rune?

Since the rune is the common case and the token values
are the special (negative) case, I chose rune.  But it could
easily go the other way.

R=gri
CC=golang-dev
https://golang.org/cl/5301049
2011-10-25 22:20:20 -07:00
Russ Cox
db33959797 cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use rune
Nothing terribly interesting here.

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5300043
2011-10-25 22:20:02 -07:00
Russ Cox
6ed3fa6553 gc: introduce rune
R=ken, r
CC=golang-dev
https://golang.org/cl/5293046
2011-10-25 22:19:39 -07:00
Russ Cox
f4568882eb exp/types: add rune to universe
R=gri
CC=golang-dev
https://golang.org/cl/5295045
2011-10-25 22:19:09 -07:00
Andrew Gerrand
5abb29d1b8 undo CL 5302057 / dac58d9c9e4a
need a clean base from weekly.2011-10-25 for rune change

««« original CL description
http: remove Connection header in ReverseProxy

Fixes #2342

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

R=rsc
CC=golang-dev
https://golang.org/cl/5294068
2011-10-26 14:16:34 +09:00
Brad Fitzpatrick
7c5d90dfbd http: remove Connection header in ReverseProxy
Fixes #2342

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5302057
2011-10-25 22:11:01 -07:00
Andrew Balholm
05ed18f4f6 html: improve parsing of lists
Make a <li> tag close the previous <li> element.
Make a </ul> tag close <li> elements.

Pass tests1.dat, test 33:
<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <li>
|       "hello"
|     <li>
|       "world"
|       <ul>
|         "how"
|         <li>
|           "do"
|       "you"
|   <!-- do -->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5321051
2011-10-26 14:02:30 +11:00
Andrew Balholm
6e318bda6c html: improve parsing of tables
When foster parenting, merge adjacent text nodes.
Properly close table row at </tr> tag.

Pass tests1.dat, test 32:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5323048
2011-10-26 11:36:46 +11:00
Ian Lance Taylor
7959aeb0f9 syscall: correct name of mksyscall script in comment
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5310055
2011-10-25 12:49:51 -07:00
Hector Chu
2572ca2ff2 runtime: include bootstrap m in mcpu accounting
R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5307052
2011-10-25 08:35:20 +01:00
Brad Fitzpatrick
d72267ae23 http: doc typo
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5303067
2011-10-24 19:29:44 -07:00
David Anderson
85b9f3573e syscall: use uintptr for Mount flags.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5308044
2011-10-24 19:28:50 -07:00
Nigel Tao
18b025d530 html: remove the Tokenizer.ReturnComments option.
The original intention was to simplify the parser, in making it skip
all comment tokens. However, checking that the Go html package is
100% compatible with the WebKit HTML test suite requires parsing the
comments. There is no longer any real benefit for the option.

R=gri, andybalholm
CC=golang-dev
https://golang.org/cl/5321043
2011-10-25 11:28:07 +11:00
Dave Cheney
5791233461 exp/ssh: introduce Session to replace Cmd for interactive commands
This CL replaces the Cmd type with a Session type representing
interactive channels. This lays the foundation for supporting
other kinds of channels like direct-tcpip or x11.

client.go:
* replace chanlist map with slice.
* generalize stdout and stderr into a single type.
* unexport ClientChan to clientChan.

doc.go:
* update ServerConfig/ServerConn documentation.
* update Client example for Session.

message.go:
* make channelExtendedData more like channelData.

session.go:
* added Session which replaces Cmd.

R=agl, rsc, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5302054
2011-10-24 19:13:55 -04:00
Andrew Balholm
2f3f3aa2ed html: dump attributes when running parser tests.
The WebKit test data shows attributes as though they were child nodes:

<a X>0<b>1<a Y>2
dumps as:
| <html>
|   <head>
|   <body>
|     <a>
|       x=""
|       "0"
|       <b>
|         "1"
|     <b>
|       <a>
|         y=""
|         "2"

So we need to do the same when dumping a tree to compare with it.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5322044
2011-10-25 09:33:15 +11:00
Brad Fitzpatrick
2b5aa28383 http: add package comment
Fixes #2378

R=rsc
CC=golang-dev
https://golang.org/cl/5312052
2011-10-24 13:59:31 -07:00
Alex Brainman
c1d0f0e76c net: do not set SO_REUSEADDR for windows
Fixes #2307.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5306049
2011-10-24 09:11:01 +11:00
Andrew Balholm
2aa589c843 html: implement foster parenting
Implement the foster-parenting algorithm for content that is inside a table
but not in a cell.

Also fix a bug in reconstructing the active formatting elements.

Pass test 30 in tests1.dat:
<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y

R=nigeltao
CC=golang-dev
https://golang.org/cl/5309052
2011-10-23 18:36:01 +11:00
Nigel Tao
2f352ae48a html: parse <select> tags.
The additional test case in parse_test.go is:
<select><b><option><select><option></b></select>X

R=andybalholm
CC=golang-dev
https://golang.org/cl/5293051
2011-10-22 20:18:12 +11:00
Robert Griesemer
696ced50fe big: usable zero Rat values without need for explicit initialization
- no explicit API change, but new(big.Rat) now creates a big.Rat value
  of 0 that is immediately usable, in sync. w/ the conventions elsewhere
- various cleanups along the way

R=r
CC=golang-dev
https://golang.org/cl/5301056
2011-10-21 14:11:36 -07:00
Rob Pike
d481d7c854 fmt: simplify the code some more by storing the field in the pp structure.
R=rsc
CC=golang-dev
https://golang.org/cl/5293058
2011-10-21 13:59:27 -07:00
Robert Griesemer
4854bd9ced big: implemented Rat.Inv
Also:
- changed semantics of return values for [Int|Rat].SetString
  if an error occured (returned value is nil); will expose
  hidden errors where return values are not checked
- added more tests
- various cleanups throughout

Fixes #2384.

R=r
CC=golang-dev
https://golang.org/cl/5312044
2011-10-21 13:26:00 -07:00
Brad Fitzpatrick
2cab897ce0 http: Transport: with TLS InsecureSkipVerify, skip hostname check
Fixes #2386

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5312045
2011-10-21 08:14:38 -07:00
Dave Cheney
8bfb217123 exp/ssh: server cleanups
server.go/channel.go:
* rename Server to ServerConfig to match Client.
* rename ServerConnection to ServeConn to match Client.
* add Listen/Listener.
* ServerConn.Handshake(), general cleanups.

client.go:
* fix bug where fmt.Error was not assigned to err

R=rsc, agl
CC=golang-dev
https://golang.org/cl/5265049
2011-10-21 11:04:28 -04:00
Dave Cheney
792a55f5db exp/ssh: add experimental ssh client
Requires CL 5285044

client.go:
* add Dial, ClientConn, ClientChan, ClientConfig and Cmd.

doc.go:
* add Client documentation.

server.go:
* adjust for readVersion change.

transport.go:
* return an os.Error not a bool from readVersion.

R=rsc, agl, n13m3y3r
CC=golang-dev
https://golang.org/cl/5162047
2011-10-20 15:44:45 -04:00
Robert Griesemer
e8a426aebe go/ast: use single-element map in test
Avoids test failure due to undefined map iteration order.

R=rsc, iant, iant
CC=golang-dev
https://golang.org/cl/5297048
2011-10-20 12:37:13 -07:00
Ian Lance Taylor
22dd0ba90d go/ast, go/token: actually run tests; fix go/ast test
R=gri
CC=golang-dev
https://golang.org/cl/5292048
2011-10-20 10:30:01 -07:00
Hector Chu
9e1a2adf07 exp/winfsnotify: fix test
R=alex.brainman, mattn.jp
CC=golang-dev
https://golang.org/cl/5311047
2011-10-20 08:10:58 +01:00
Nigel Tao
64306c9fd0 html: parse and render comment nodes.
The first additional test case in parse_test.go is:
<!--><div>--<!-->

The second one is unrelated to the comment change, but also passes:
<p><hr></p>

R=andybalholm
CC=golang-dev
https://golang.org/cl/5299047
2011-10-20 11:45:30 +11:00
Gustavo Niemeyer
526d0818cc fmt: don't panic formatting nil interfaces
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5296044
2011-10-19 18:26:08 -02:00
Russ Cox
b4d6b71e16 unicode: sort tables.go
Makes tables.go output consistent across maketable runs.
(It was already inconsistent across architectures; the new
map iteration order just make it inconsistent across runs.)

R=r
CC=golang-dev
https://golang.org/cl/5303046
2011-10-19 16:02:22 -04:00
Russ Cox
bb8c4ed22a exp/types: fix crash in parseBasicType on unknown type
R=gri
CC=golang-dev
https://golang.org/cl/5302044
2011-10-19 12:49:01 -04:00
Adam Langley
ec0b5533c9 crypto/x509: fix names in certificate generation.
I had a brain fart in af84b15fbae2 and messed up the names in
generated certificates.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5315046
2011-10-19 12:19:13 -04:00
Brad Fitzpatrick
314afb417a http: comment tweaks
It hasn't been primitive in a while.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5287041
2011-10-19 08:48:26 -07:00
Brad Fitzpatrick
cf0952d352 syscall: update ztypes_linux_386 for terminal changes
R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/5299045
2011-10-19 08:45:38 -07:00
Dave Cheney
ec80beb9f0 syscall: update ztypes_linux_arm for terminal changes
regenerated on a debian sid arm5 host.

R=bradfitz, iant
CC=golang-dev
https://golang.org/cl/5298046
2011-10-19 07:38:32 -07:00
Mikio Hara
e13635c1e0 os/inotify: move to exp/inotify
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5295044
2011-10-19 10:54:45 +09:00
Nigel Tao
98e723ed09 html: fix escape_test.go for CSS escaper change 5306042.
R=mikesamuel
CC=golang-dev
https://golang.org/cl/5313044
2011-10-19 10:54:04 +11:00
Rob Pike
811d334a65 fmt: clean up after reflect.Interface change.
Store the reflect.Value in the internal print state. Code is simpler, cleaner,
and a little faster - back to what it was before the change.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5299046
2011-10-18 16:23:07 -07:00
Rob Pike
4c56c30b78 rpc: don't panic on write error.
The mechanism to record the error in the call is already in place.
Fixes #2382.

R=golang-dev, dsymonds, bradfitz, r
CC=golang-dev
https://golang.org/cl/5307043
2011-10-18 15:52:49 -07:00
Mike Samuel
fc3ce34903 exp/template/html: fix bug in cssEscaper
cssEscaper escapes using the CSS convention: `\` + hex + optional-space

It outputs the space when the escape could be followed by
a hex digit to distinguish a "\na" from "\u00aa".

It did not output a space when the escape is followed by a space
character so did not distinguish "\n " from "\n".

Currently when doing lookahead, it does not distinguish spaces that
will be escaped later by the same function from ones that will not.
This is correct but suboptimal.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5306042
2011-10-18 17:01:42 -05:00
Andrew Gerrand
aa42881ed0 http: add test for panic inside hijacked request
R=golang-dev, rsc, rsc
CC=golang-dev
https://golang.org/cl/5283052
2011-10-19 08:23:13 +11:00
Nigel Tao
b1fd528db5 html: parse raw text and RCDATA elements, such as <script> and <title>.
Pass tests1.dat, test 26:
#data
<script><div></script></div><title><p></title><p><p>
#document
| <html>
|   <head>
|     <script>
|       "<div>"
|     <title>
|       "<p>"
|   <body>
|     <p>
|     <p>

Thanks to Andy Balholm for driving this change.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5301042
2011-10-19 08:03:30 +11:00
Hector Chu
7ecf6c997e exp/winfsnotify: filesystem watcher for Windows
R=rsc, alex.brainman, bradfitz
CC=bsiegert, go.peter.90, golang-dev
https://golang.org/cl/4188047
2011-10-18 21:09:58 +01:00
Robert Griesemer
c7cf56bec9 big: handle aliasing correctly for Rat.SetFrac.
Fixes #2379.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5305043
2011-10-18 12:40:41 -07:00
Andrey Mirtchovski
565793996c net: remove duplicate error information in Dial
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5293045
2011-10-18 14:51:40 -04:00
Russ Cox
48bb3e8f28 net: allow LookupSRV on non-standard DNS names
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5313043
2011-10-18 13:57:04 -04:00
Adam Langley
9d99d52fcb http, crypto/tls: fix read timeouts and closing.
tls.Conn.Close() didn't close the underlying connection and tried to
do a handshake in order to send the close notify alert.

http didn't look for errors from the TLS handshake.

Fixes #2281.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5283045
2011-10-18 12:59:32 -04:00
Adam Langley
7bc4f8de0f exp/terminal: split terminal handling from exp/ssh
This change splits terminal handling from exp/ssh, as suggested
several times in the ssh code review.

shell.go and shell_test.go are copies from exp/ssh with minimal
changes, so don't need another full review. A future CL will remove
that code from exp/ssh.

R=bradfitz, r, dave, rsc
CC=golang-dev
https://golang.org/cl/5278049
2011-10-18 12:58:57 -04:00
Dave Cheney
ec158f77bd exp/ssh: general cleanups for client support
common.go:
* simplify findAgreedAlgorithms.
* add channelExtendedData support.

messages.go:
* add clientExtendedData.

server.go:
*  use simplified findAgreedAlgorithms.

server_shell.go:
* fix shadowed err return value.

transport.go:
* introduce separate cipher, mac and compression for each direction.
* added filteredConn and packetWriter interfaces.
* newTransport requires a source of randomness.

R=golang-dev, agl, rsc
CC=golang-dev
https://golang.org/cl/5285044
2011-10-18 12:54:48 -04:00
Robert Griesemer
1db31f8933 big: more explicit documentation for div/mod/quo/rem
Fixes #2380.

R=rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/5313041
2011-10-18 09:45:38 -07:00
Russ Cox
4e7aac5413 reflect: make unsafe use of SliceHeader gc-friendly
Revert workaround in compiler and
revert test for compiler workaround.

Tested that the 386 build continues to fail if
the gc change is made without the reflect change.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5312041
2011-10-18 10:03:37 -04:00
Russ Cox
313c8224d5 gofix -r mapdelete
R=golang-dev, r, adg, r, cw
CC=golang-dev
https://golang.org/cl/5266045
2011-10-18 09:56:34 -04:00
Russ Cox
1d687c742d gc: add delete(m, x) but leave in m[x] = 0, false.
The old m[x] = 0, false syntax will be deleted
in a month or so, once people have had time to
change their code (there is a gofix in a separate CL).

R=ken2
CC=golang-dev
https://golang.org/cl/5265048
2011-10-18 09:41:32 -04:00
David Symonds
9049abbd2d reflect: make map test independent of map iteration order.
This should fix the 386 builds.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5298042
2011-10-18 12:47:34 +11:00
David Symonds
fdc6376c00 reflect: fix test failure reporting.
There's a problem that is manifesting on the 386 builders,
but this test bug is masking it.

R=adg
CC=golang-dev
https://golang.org/cl/5295042
2011-10-18 12:26:09 +11:00
David Symonds
e45e324420 fmt: fix test relying on map iteration order.
This fixes the 386 builds.

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5293043
2011-10-18 11:47:11 +11:00
Robert Griesemer
df219d5197 scanner: invalidate scanner.Position when no token is present
scanner.Position is the position of the most recently
scanned token. Make sure it is invalid if there is no
token scanned and update corresponding comment. This
is particularly important when reporting errors.

Fixes #2371.

R=r
CC=golang-dev
https://golang.org/cl/5294041
2011-10-17 16:35:12 -07:00
Russ Cox
e40d6e066a runtime: random offset for map iteration
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5285042
2011-10-17 18:49:02 -04:00
Russ Cox
304cf4dc9b reflect: disallow Interface method on Value obtained via unexported name
Had been allowing it for use by fmt, but it is too hard to lock down.
Fix other packages not to depend on it.

R=r, r
CC=golang-dev
https://golang.org/cl/5266054
2011-10-17 18:48:45 -04:00
Nigel Tao
e5f3dc8bc5 html: refactor the tokenizer; parse "</>" correctly.
Previously, Next would call either nextText or nextTag, but nextTag
could also call nextText. Both nextText and nextTag were responsible
for detecting "</a" end tags and "<!" comments. This change simplifies
the call chain and puts that responsibility in a single place.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5263050
2011-10-18 09:42:16 +11:00
Russ Cox
d2b73730b7 exp/template/html: do not depend on reflection on internal fields
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5286049
2011-10-17 18:23:59 -04:00
Dmitriy Vyukov
b0c674b65d gc: treat uintptr as potentially containing a pointer
Fixes #2376

R=golang-dev, lvd, rsc
CC=golang-dev
https://golang.org/cl/5278048
2011-10-17 15:14:07 -04:00
Russ Cox
bdf66114c7 http: do not depend on map iteration order
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5284050
2011-10-17 14:51:54 -04:00
Russ Cox
9a7dd71944 template: do not depend on map iteration order
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5268048
2011-10-17 14:51:45 -04:00
Paul Borman
eea86de656 csv: fix issue 2366 - overly aggressive TrimLeadingSpace
Address the issue coalescing two records together when TrimLeadingSpace
is set to true.

The input

        a,b,
        c,d,e

Would result with a singled a,b,c,d,e record.
With TrailingComma set to true it should give two records.
With TrailingComma set to false it should be an error.

Fixes #2366.

R=golang-dev, go.peter.90, r
CC=golang-dev
https://golang.org/cl/5284046
2011-10-17 11:10:39 -07:00
Andrew Gerrand
64471ae762 http: fix panic when recovering from hijacked connection panic
Fixes #2375.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5279049
2011-10-17 15:54:36 +11:00
Nigel Tao
1887907fee html: tokenize "a < b" as one whole text token.
R=andybalholm
CC=golang-dev
https://golang.org/cl/5284042
2011-10-16 20:50:11 +11:00