Commit Graph

6062 Commits

Author SHA1 Message Date
Brad Fitzpatrick
9b64fef71a mime/multipart and HTTP multipart/form-data support
Somewhat of a work-in-progress (in that MIME is a large spec), but this is
functional and enough for discussion and/or code review.

In addition to the unit tests, I've tested with curl and Chrome with
a variety of test files, making sure the digests of files are unaltered
when read via a multipart Part.

R=rsc, adg, dsymonds1, agl1
CC=golang-dev
https://golang.org/cl/1681049
2010-07-14 17:26:14 -07:00
Russ Cox
e9bcbc5398 os: use /tmp again
R=adg
CC=golang-dev
https://golang.org/cl/1823041
2010-07-14 17:25:46 -07:00
Joe Poirier
9028d6bf7c windows: append executable extension (done as per Russ' suggestion)
R=rsc
CC=brainman, golang-dev
https://golang.org/cl/1690053
2010-07-14 17:21:13 -07:00
Russ Cox
0432f289f7 cgo: various bug fixes
* remember #defined names, so that C.stdout can refer
  to the real name (on OS X) __stdoutp.
* better handling of #defined constant expressions
* allow n, err = C.strtol("asdf", 0, 123) to get errno as os.Error
* write all output files to current directory
* don't require gcc output if there was no input

Fixes #533.
Fixes #709.
Fixes #756.

R=r
CC=dho, golang-dev, iant
https://golang.org/cl/1734047
2010-07-14 17:17:53 -07:00
Evan Shaw
e8fcf60093 codereview: Fix for Mercurial >= 1.6
R=rsc, adg, rsc1
CC=golang-dev
https://golang.org/cl/1804041
2010-07-14 17:17:04 -07:00
Robert Griesemer
dc60c5a7ec go spec: clarification of channel close()
R=r, rsc
CC=golang-dev
https://golang.org/cl/1766042
2010-07-14 16:09:22 -07:00
Rob Pike
708d7160fa tutorial: show how to compile helloworld3, which depends on ./file
make shell prompts consistent

R=rsc
CC=golang-dev
https://golang.org/cl/1824042
2010-07-14 13:29:12 -07:00
Robert Griesemer
47b835e4a8 channel tests: added a couple of tests with closed channels
R=rsc
CC=golang-dev
https://golang.org/cl/1774047
2010-07-14 13:18:57 -07:00
Robert Griesemer
a3855235cd fix build: reverting exp/eval Makefile to old form
(gofmt doesn't exist when this is built)

R=rsc
CC=golang-dev
https://golang.org/cl/1838041
2010-07-14 10:11:12 -07:00
Robert Griesemer
d00b479888 select statement: initial set of test cases for corner cases
R=r, rsc
CC=golang-dev
https://golang.org/cl/1772043
2010-07-14 09:55:08 -07:00
Evan Shaw
b97292791b exp/eval: Converted from bignum to big
Also in this CL:
* Removed util.go, as its functionality is in big
* Removed some semicolons from the code generated by gen.go
* Added a generate target to Makefile
* Removed an outdated TODO from value.go

R=gri
CC=golang-dev
https://golang.org/cl/1780042
2010-07-14 09:39:59 -07:00
Adam Langley
c9406f930d crypto/tls: add client OCSP stapling support.
R=r, rsc
CC=golang-dev
https://golang.org/cl/1750042
2010-07-14 10:40:15 -04:00
Russ Cox
cec007d3d2 runtime: better error for send/recv on nil channel
R=ken2
CC=golang-dev
https://golang.org/cl/1835041
2010-07-13 17:27:26 -07:00
Rob Pike
041d11623f Go specification: Lock down some details about channels and select:
- nil channel in regular send or receive panics
- empty select blocks forever

R=rsc, gri, iant, ken2
CC=golang-dev
https://golang.org/cl/1825043
2010-07-13 16:23:54 -07:00
Russ Cox
2e3dc2cc35 crypto/rand: add missing Unlock
R=r
CC=golang-dev
https://golang.org/cl/1812043
2010-07-13 12:37:47 -07:00
Robert Griesemer
0c2e6b3637 go spec: specify len/cap for nil slices, maps, and channels
Fixes #891.

R=r, rsc
CC=golang-dev
https://golang.org/cl/1760043
2010-07-13 11:54:57 -07:00
Andrew Gerrand
da795fcefc runtime/tiny: style and doc tweaks
R=r, rsc
CC=golang-dev
https://golang.org/cl/1821041
2010-07-13 10:47:52 +10:00
Russ Cox
11f9c03986 fix build
R=gri
CC=golang-dev
https://golang.org/cl/1813042
2010-07-12 17:46:03 -07:00
Peter Mundy
b6850fe739 os: Use TempFile with default TempDir for temp test files
Use io/ioutil.TempFile with default os.TempDir for temporary test files.
For os_test.go temporary test files, use a local file system and OS
independent directory names. Avoid problems with NFS.

Fixes #848.

R=adg
CC=golang-dev
https://golang.org/cl/1806043
2010-07-13 10:31:51 +10:00
Andrew Gerrand
48e4d67b23 websocket: fix comment indentation
To make code samples formatted correctly by godoc.

R=r, ukai, rsc
CC=golang-dev, gri
https://golang.org/cl/1738048
2010-07-13 10:29:41 +10:00
Robert Griesemer
d9c47cd8c8 container/vector: rename Data() -> Copy()
R=rsc
CC=golang-dev
https://golang.org/cl/1814043
2010-07-12 17:22:21 -07:00
Andrew Gerrand
1930cd5d38 dashboard: use jQuery Autocomplete plugin from Google AJAX Libs API
R=rsc
CC=golang-dev
https://golang.org/cl/1677053
2010-07-13 10:21:08 +10:00
Rob Pike
18d78dd7b1 tweak comment for %#X
Fixes #904.

R=rsc
CC=golang-dev
https://golang.org/cl/1803043
2010-07-12 16:57:11 -07:00
Russ Cox
36560d2b4a pem: print \n after 1 header line too
rearrange to make reason for if clear.

Fixes #911.

R=agl1
CC=golang-dev
https://golang.org/cl/1774044
2010-07-12 16:48:49 -07:00
Peter Mundy
ccd28e8eb6 crypto/rand for Windows
R=rsc, brainman
CC=golang-dev
https://golang.org/cl/1773041
2010-07-12 16:37:53 -07:00
Rob Pike
c9f83372d8 add missing argument to usage message.
Fixes #912.

R=rsc
CC=golang-dev
https://golang.org/cl/1819041
2010-07-12 16:31:51 -07:00
Andrew Gerrand
880beafc9f http: fix ParseURL to handle //relative_path properly
Fixes #900.

R=rsc
CC=golang-dev
https://golang.org/cl/1756042
2010-07-13 09:21:42 +10:00
Robert Griesemer
97bcf049f7 big: added a few missing functions:
- sign to determine if a value is < 0, == 0, > 0
- abs to compute absolute value
- Rat.IsInt to test if a rational number is representable as an integer

R=rsc
CC=golang-dev
https://golang.org/cl/1761042
2010-07-12 16:09:27 -07:00
Robert Griesemer
bebd22f8e0 fix build
R=rsc
CC=golang-dev
https://golang.org/cl/1815042
2010-07-12 14:53:28 -07:00
Robert Griesemer
345f9c9eb2 container/vector: remove Iter() from interface
(Iter() is almost never the right mechanism to call.
Per discussion with rsc.)

R=rsc
CC=golang-dev
https://golang.org/cl/1771043
2010-07-12 13:51:42 -07:00
Vinu Rajashekhar
89192ce4fe test/fixedbugs/bug243.go: instead of closing stdout,
remove the print statements.

This change is because of the port of gccgo to RTEMS.
These tests use the GCC DejaGNU framework. In some cases,
the tests need to be run on qemu where the status code
cannot be sent back to DejaGNU, so it prints the exit status
by putting a wrapper around the exit and abort calls.

This testcase closes the stdout, and hence prohibits DejaGNU
from knowing the status in such cases, and causes this test
to be wrongly declared as a failure.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/1792042
2010-07-12 13:17:32 -07:00
Charles L. Dorian
c28bd5445c math: amd64 version of log
Benchmarks 25ns/op (was 58ns/op) on 2.53GHz Intel Core 2 Duo.

R=rsc
CC=golang-dev
https://golang.org/cl/1740043
2010-07-12 11:30:11 -07:00
Micah Stetson
b5b6ce0804 json: Add HTMLEscape
R=rsc
CC=golang-dev
https://golang.org/cl/1496042
2010-07-12 11:26:41 -07:00
Ian Lance Taylor
e03a50dd11 Test case that gccgo fails (crashes rather than printing error).
R=rsc
CC=Raj_, golang-dev
https://golang.org/cl/1740044
2010-07-12 06:34:36 -07:00
Vinu Rajashekhar
a9a24d4d8a Corrected a print statement from printing netfd to fd.
R=iant
CC=golang-dev
https://golang.org/cl/1805041
2010-07-10 14:40:48 -07:00
Robert Griesemer
71ed4eb7a5 fix build: adjustest a few tests that I missed before
R=r
CC=golang-dev
https://golang.org/cl/1762044
2010-07-09 13:11:20 -07:00
Robert Griesemer
d87f7e2392 gofmt: update test script
R=r
CC=golang-dev
https://golang.org/cl/1791041
2010-07-09 13:03:25 -07:00
Robert Griesemer
73ca127e67 go/spec: fix typo
R=r
CC=golang-dev
https://golang.org/cl/1790041
2010-07-09 13:02:54 -07:00
Robert Griesemer
7529d32ee1 go/parser: require that '...' parameters are followed by a type
(matching latest syntax changes)

R=r
CC=golang-dev
https://golang.org/cl/1762042
2010-07-09 13:02:32 -07:00
Evan Shaw
2e00bf9877 big: Improvements to Rat.SetString
* Allow an exponent part. This is necessary for exp/eval.
* Fix a bug for input that had no numbers after the decimal.
* In Int.SetString, allow a leading + sign.
* In Int.SetString, error if the input is "-" with no number.
* In nat.scan, normalize the resulting nat.

R=gri
CC=golang-dev
https://golang.org/cl/1733045
2010-07-09 11:24:31 -07:00
Peter Mundy
56b3e5d644 io: fix SectionReader Seek to seek backwards
Fixes #899.

R=golang-dev, rminnich, adg
CC=golang-dev
https://golang.org/cl/1749041
2010-07-08 16:57:07 +10:00
Andrew Gerrand
bf5b05f2d4 A+C: Markus Duft
R=nigeltao
CC=golang-dev
https://golang.org/cl/1682052
2010-07-08 12:47:16 +10:00
Markus Duft
d49c0d71f6 runtime/tiny: add destroyLock stub, and docs for additional VMs
updated thread.c to provide destroylock, which seems to be
	      required to link.
        updated README with different virtualization programs.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1746047
2010-07-08 00:15:47 +10:00
Andrew Gerrand
eca2ec0786 doc/go_tutorial: mention order of compilation
In response to this recurring issue:
	http://groups.google.com/group/golang-nuts/t/710d1e8347cd51fa

R=r
CC=golang-dev
https://golang.org/cl/1682050
2010-07-05 16:25:29 +10:00
Adam Langley
a169e6cc6a http, crypto/tls: followup fixes from 1684051.
(TBR because this is just addressing previous review comments.)

R=r
CC=golang-dev
https://golang.org/cl/1697048
2010-07-02 16:43:48 -04:00
Adam Langley
fc23def67f crypto/tls, http: Make HTTPS servers easier.
R=r, adg, rsc
CC=golang-dev
https://golang.org/cl/1684051
2010-07-02 13:00:18 -04:00
Russ Cox
44eaaaaa78 ld: fix handling of "". names in #pragma dynimport/dynexport
Fixes #728.

R=r
CC=golang-dev
https://golang.org/cl/1706053
2010-07-01 21:48:13 -07:00
Andrew Gerrand
520d5db4d3 Add various items to the Go Resources page.
R=r
CC=golang-dev
https://golang.org/cl/1674045
2010-07-02 13:32:02 +10:00
Russ Cox
81c3e8cabc gc: implement new len spec, range bug fix, optimization
Fixes #885.

R=ken2
CC=golang-dev
https://golang.org/cl/1680048
2010-07-01 18:04:25 -07:00
Russ Cox
f4429181df spec: restrict when len(x) is constant
R=gri, iant, ken2, r
CC=golang-dev
https://golang.org/cl/1687047
2010-07-01 17:49:47 -07:00