1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00
Commit Graph

1222 Commits

Author SHA1 Message Date
Marcel van Lohuizen
72fb81eeb6 doc: Fixed type in documentation for FormatFloat.
R=r, r, rsc
CC=golang-dev
https://golang.org/cl/5656108
2012-02-19 19:26:05 +01:00
Brad Fitzpatrick
efacb2a1b4 os: remove Getenverror
Fixes #3065

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5675094
2012-02-18 21:18:13 -08:00
Rob Pike
c3ef198020 go 1: add a description of the os error changes.
I'm sure I wrote these before but they've disappeared.

R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5673100
2012-02-19 14:15:26 +11:00
Ian Lance Taylor
253c139275 doc: update gccgo_contribute.html
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5673080
2012-02-18 11:15:52 -08:00
Shenghou Ma
f18b0b0c16 doc: various updates to doc/code.html
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/5649068
2012-02-18 16:13:02 +11:00
Russ Cox
5c3de8ccb3 doc: fix tables
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5676084
2012-02-17 16:59:33 -05:00
Ian Lance Taylor
ebc4007708 doc: clarify gccgo support for segmented stacks
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671081
2012-02-17 05:59:15 -08:00
Rob Pike
1e0f97ac65 faq: add entry about nil interfaces vs. nil pointers
Fixes #2778.

R=bradfitz, rsc, iant, adg
CC=golang-dev
https://golang.org/cl/5672078
2012-02-17 16:27:17 +11:00
Mike Rosset
91672686da doc: provide example filepath.Walk for go1
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5674067
2012-02-17 12:45:55 +11:00
Rob Pike
56069f0333 os: delete os.EINVAL and so on
The set of errors forwarded by the os package varied with system and
was therefore non-portable.
Three helpers added for portable error checking: IsExist, IsNotExist, and IsPermission.
One or two more may need to come, but let's keep the set very small to discourage
thinking about errors that way.

R=mikioh.mikioh, gustavo, r, rsc
CC=golang-dev
https://golang.org/cl/5672047
2012-02-17 10:04:29 +11:00
Robert Griesemer
3908467b1f go spec: struct comparison only compares non-blank fields
Fixes #3031.

R=golang-dev, rsc, r, iant
CC=golang-dev
https://golang.org/cl/5676054
2012-02-16 14:13:17 -08:00
David Symonds
8342793e7b net/url: Rename ParseWithReference to ParseWithFragment.
Updates #2946.

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5671061
2012-02-16 15:56:03 +11:00
Nigel Tao
da8f037b57 fix: add fix for bufio, gzip, zlib NewWriterXxx changes.
Fixes #2979.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5664046
2012-02-15 14:41:47 +11:00
Andrew Gerrand
eccc22e542 doc: fix snapshot notes
R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5675056
2012-02-15 14:20:21 +11:00
Andrew Gerrand
d2f65a6461 weekly.2012-02-14
R=golang-dev, dsymonds, r, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5675055
2012-02-15 14:15:33 +11:00
Lai Jiangshan
932cdfbc4c doc: fix codewalk/markov.go
When I build it, I got:
/home/njubee/work/golang/doc/codewalk/markov.go:124: undefined: time.Nanoseconds
time.Nanoseconds() does not exist now, use time.Now().UnixNano() instead

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5668044
2012-02-15 13:07:34 +11:00
Andrew Gerrand
3509687d6a doc: add playground.js
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5649087
2012-02-15 12:59:50 +11:00
Andrew Gerrand
dd91d83d24 doc: add App Engine docs to 'learn' and 'reference' pages
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5672048
2012-02-15 12:58:40 +11:00
Andrew Gerrand
a50315304d doc: grey out line numbers
R=gri
CC=golang-dev
https://golang.org/cl/5675049
2012-02-15 10:31:28 +11:00
Adam Langley
c2e58dc568 go1.tmpl: fix merge
hg massively messed up a simple merge for 9d7addec2635 in what I can
only imagine was a public service announcement that everyone should
use git.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5668043
2012-02-14 07:13:57 -05:00
Andrew Gerrand
e07f089cb0 doc: update install.html for binary distros, add install-source.html
R=bsiegert, rsc, r
CC=golang-dev
https://golang.org/cl/5605047
2012-02-14 17:02:28 +11:00
Andrew Gerrand
5ab935f68a godoc: list examples in index
Fixes #2897.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5658047
2012-02-14 14:52:00 +11:00
Andrew Gerrand
763716ae2a doc: color comments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5657047
2012-02-14 11:45:27 +11:00
Andrew Gerrand
04868b28ac archive/zip: hide Write method from *Writer type
This was an implementation detail that snuck into the public interface.
*Writer.Create gives you an io.Writer, the *Writer itself was never
meant to be written to.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5654076
2012-02-14 10:47:48 +11:00
Ian Lance Taylor
9126c6570c spec: clarify implementation restrictions on untyped floats
Drop reference to "machine type."  Specify that integer
overflow must be an error.  Drop requirement that exponent
must be 128 bits--that's a lot.  Clarify that floating point
expressions may be rounded, including intermediate values.

This is a reworking of https://golang.org/cl/5577068/ .

Fixes #2789.

R=r, rsc, r, gri, ken, ken, iant
CC=golang-dev, remyoudompheng
https://golang.org/cl/5655049
2012-02-13 11:25:56 -08:00
Russ Cox
35586f718c os/signal: selective signal handling
Restore package os/signal, with new API:
Notify replaces Incoming, allowing clients
to ask for certain signals only.  Also, signals
go to everyone who asks, not just one client.

This could plausibly move into package os now
that there are no magic side effects as a result
of the import.

Update runtime for new API: move common Unix
signal handling code into signal_unix.c.
(It's so easy to do this now that we don't have
to edit Makefiles!)

Tested on darwin,linux 386,amd64.

Fixes #1266.

R=r, dsymonds, bradfitz, iant, borman
CC=golang-dev
https://golang.org/cl/3749041
2012-02-13 13:52:37 -05:00
Adam Langley
cdd7e02583 crypto/...: more fixes for bug 2841
1) Remove the Reset() member in crypto/aes and crypto/des (and
   document the change).
2) Turn several empty error structures into vars. Any remaining error
   structures are either non-empty, or will probably become so in the
   future.
3) Implement SetWriteDeadline for TLS sockets. At the moment, the TLS
   status cannot be reused after a Write error, which is probably fine
   for most uses.
4) Make crypto/aes and crypto/des return a cipher.Block.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5625045
2012-02-13 12:38:45 -05:00
Rob Pike
7bd6ebb104 spec: strings are more slices than arrays
Thanks to Aaron Kemp for noticing.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645097
2012-02-13 23:39:56 +11:00
Andrew Gerrand
d84de09e1d godoc: new design
This is not the finished product,
but a good checkpoint from which to
proceed with further development.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5571061
2012-02-13 21:22:36 +11:00
Russ Cox
878153682e cmd/fix: warn about exp, old, deleted packages
Fixes #2776.

There was a previous attempt at CL 5592043 but that
seems to have stalled.  This one is simpler, and more up to date
(correct handling of spdy, for example).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5645091
2012-02-12 23:55:33 -05:00
Robert Griesemer
b1d9ae9406 go spec: method names must be unique
Fixes #2916.

R=golang-dev, remyoudompheng, r, rsc
CC=golang-dev
https://golang.org/cl/5652064
2012-02-12 20:03:30 -08:00
Rob Pike
8040f9bb86 spec: typographical adjustment for ellipsis
The paragraph describing the ellipses presents the horizontal ellipsis
in two different fonts and at least on my screen they look too different.
Switch to a consistent rendering.

Of small steps are great journeys undertaken.

R=golang-dev, rsc, dsymonds, gri
CC=golang-dev
https://golang.org/cl/5650055
2012-02-13 14:38:31 +11:00
Rob Pike
aee1c38cda go1: fix old reference to Sys method
The example was fixed; the simplifying rewrite was missed.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5651080
2012-02-13 08:05:53 +11:00
Rob Pike
46dc76f5da go1: update recipe for recovering Stat_t
Fixes #2983.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5654063
2012-02-12 09:17:57 +11:00
Rob Pike
14efdea359 effective_go: use new map deletion syntax
Fixes #2984.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5652071
2012-02-12 09:11:44 +11:00
Nigel Tao
22636be8b0 flate: delete WrongValueError type.
Fixes #2838.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5651060
2012-02-11 12:09:11 +11:00
Robert Griesemer
f8cf82f6f2 go/printer: implement SourcePos mode
If a printer is configured with the SourcePos mode
set, it will emit //-line comments as necessary to
ensure that the result - if reparsed - reflects the
original source position information.

This change required a bit of reworking of the
output section in printer.go. Specifically:

- Introduced new Config mode 'SourcePos'.

- Introduced new position 'out' which tracks the
position of the generated output if it were read
in again. If there is a discrepancy between out
and the current AST/source position, a //line
comment is emitted to correct for it.

- Lazy emission of indentation so that //line
comments can be placed correctly. As a result,
the trimmer will have to do less work.

- Merged writeItem into writeString.

- Merged writeByteN into writeByte.

- Use a []byte instead of a byte.Buffer both in the
printer and in the trimmer (eliminates dependency).

Also: introduced explicit printer.Mode type (in
sync w/ parser.Mode, scanner.Mode, etc.)

Runs all tests. Applied gofmt to src, misc w/o changes.

Fixes #1047.
Fixes #2697.

R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5643066
2012-02-10 13:27:32 -08:00
Nigel Tao
cc9ed447d0 compress: make flate, gzip and zlib's NewWriterXxx functions all return
(*Writer, error) if they take a compression level, and *Writer otherwise.
Rename gzip's Compressor and Decompressor to Writer and Reader, similar to
flate and zlib.

Clarify commentary when writing gzip metadata that is not representable
as Latin-1, and fix io.EOF comment bug.

Also refactor gzip_test to be more straightforward.

Fixes #2839.

R=rsc, r, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5639057
2012-02-10 18:49:19 +11:00
Rob Pike
cbd6c34131 testing/script: delete
Dead code.

Fixes #2961.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5650053
2012-02-10 14:31:08 +11:00
Brad Fitzpatrick
4152b43457 os: delete Exec, NewFile takes uintptr, rename ShellExpand, doc fixes
Delete O_NDELAY, O_NONBLOCK, O_NOCTTY, O_ASYNC.

Clean up some docs.

Rename ShellExpand -> ExpandEnv.

Make NewFile take a uintptr; change File.Fd to return one.
(for API compatibility between Unix and Windows)

Fixes #2947

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5655045
2012-02-10 14:16:15 +11:00
Brad Fitzpatrick
7750fc894a os: remove Time; callers should use time.Time.
Part of issue 2947

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5651051
2012-02-10 11:44:51 +11:00
Rob Pike
1c1ecd7473 log/syslog: fix documentation for NewLogger
Fixes #2798.

R=golang-dev, bradfitz, r, rsc, rsc
CC=golang-dev
https://golang.org/cl/5642071
2012-02-09 14:40:56 +11:00
Rob Pike
8c4a2ca83b encoding/binary: add Size, to replace the functionality of the old TotalSize
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5644063
2012-02-09 11:26:03 +11:00
Rob Pike
68794e7910 doc: new document about compatibility of releases
The doc is not linked anywhere yet; that will come later.

R=golang-dev, adg, gri, rsc, edsrzf
CC=golang-dev
https://golang.org/cl/5647050
2012-02-09 09:42:40 +11:00
Russ Cox
7c5d6409f5 spec: address CL 5647054 comments
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5641057
2012-02-08 15:37:58 -05:00
Russ Cox
e7a138b856 spec: send on closed channel counts as "proceeding"
Other wordings are possible but defining this as one
of the ways to proceed means we don't have to add
language about this to the description of select.

Fixes #2825.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5643062
2012-02-08 15:24:48 -05:00
Rob Pike
cf80ccd8f6 doc/go1: mention that the compiler catches TotalSize and NewReaderSize
Today is Size day and the compiler will reject old code using these functions.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5644053
2012-02-09 07:09:52 +11:00
Robert Griesemer
d08dd8bec1 go/scanner: clean up error interface
Issue 2856 asks for a rename of a few methods to a
more idiomatic Go style. This is a very early API
that evolved organically throughout the years.
Together with the fact that ErrorVectors were embedded
in other data structures (e.g. Parser), just renaming
methods (e.g. GetError -> Error) would lead to undesired
behavior (e.g., Parser would act like an Error). Instead,
cleaned up API a bit more:

- removed ErrorVector in favor of ErrorList (already
present)
- simplified Scanner.Init by making the error handler a
function instead of requiring an ErrorHandler implementation
- adjusted helper functions accordingly
- updated Go 1 doc

Fixes #2856.

R=rsc
CC=golang-dev
https://golang.org/cl/5624047
2012-02-08 11:41:32 -08:00
Russ Cox
388816ae07 spec: disallow recursive embedded interfaces
Fixes #1814.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5647054
2012-02-08 14:35:00 -05:00
Russ Cox
fd2a511253 spec: add forward links from 'method set' to where it gets used
Fixes #1797.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5645058
2012-02-08 14:28:51 -05:00