1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:40:23 -07:00
Commit Graph

1094 Commits

Author SHA1 Message Date
Andrew Gerrand
c5fce33101 doc: remove an errant dot.
Curses!

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5489048
2011-12-15 17:17:39 +11:00
Andrew Gerrand
3388e9f67b weekly.2011-12-14
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5494045
2011-12-15 16:56:12 +11:00
Rob Pike
c26ca912e5 spec: skip carriage returns in raw literals
This change guarantees that whether the line ending convention
when the source is created includes carriage returns is irrelevant
to the value of the string. See issue 680.

The compilers do not yet implement this.

R=golang-dev, adg, r, gri, rsc, iant
CC=golang-dev
https://golang.org/cl/5491043
2011-12-14 21:52:41 -08:00
Robert Griesemer
599c18fa3f spec: values of underlying type uintptr can be converted to unsafe.Pointer
Not a language change, just stating the facts.

Fixes #1793.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5488071
2011-12-13 17:22:11 -08:00
Florian Weimer
b1175bebd0 contribute.html: do not fill in the reviewer field
The golang-dev mailing list is added automatically.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5482060
2011-12-13 17:45:01 -05:00
Rob Pike
5fa18e1061 doc/go1: time
R=rsc
CC=golang-dev
https://golang.org/cl/5477077
2011-12-12 21:08:03 -08:00
Rob Pike
f76bd4fe0f doc/go1: more package updates
Everything there (as first draft) except the time package.

R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/5487052
2011-12-12 19:25:25 -08:00
Russ Cox
83f648c962 spec: allow comparison of structs, arrays containing comparable values
Also, clarify when interface comparison panics and
that comparison to nil is a special syntax rather than
a general comparison rule.

R=r, gri, r, iant, cw, bradfitz
CC=golang-dev
https://golang.org/cl/5440117
2011-12-12 22:21:46 -05:00
Andrew Gerrand
c400a0b7db doc: add Error Handling article
Originally published on The Go Programming Language Blog, July 12, 2011.

http://blog.golang.org/2011/07/error-handling-and-go.html

Update #2547

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5475060
2011-12-13 09:44:06 +11:00
Rob Pike
ebdcbf1cdc doc/go1: the simpler package changes
R=golang-dev, fullung, dsymonds, r, adg
CC=golang-dev
https://golang.org/cl/5477056
2011-12-12 12:26:56 -08:00
Andrew Gerrand
4068e3fc70 doc: remove file.go from run (fix windows build)
R=golang-dev, r, alex.brainman, r
CC=golang-dev
https://golang.org/cl/5479069
2011-12-12 16:14:38 +11:00
Rob Pike
b78a7b7dab doc/go_tutorial: make clear the file example is Unix-specific
Fixes #2553.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5472074
2011-12-11 21:03:49 -08:00
Andrew Gerrand
49d82b4ca1 doc: add Defer, Panic, and Recover article
Originally published on The Go Programming Language Blog, August 4 2010.

http://blog.golang.org/2010/08/defer-panic-and-recover.html

Update #2547

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5479053
2011-12-12 13:15:29 +11:00
Lucio De Re
90913cf170 Housekeeping: Cleaning up the clean-up process.
src/clean.bash:
        Add clean-ups for previously overlooked directories.
doc/codelab/wiki/Makefile:
        Dropped "index.html" from CLEANFILES so it will not be
        deleted on cleaning.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5476050
2011-12-11 09:23:17 -08:00
Robert Hencke
1084ab98b7 spec: adjust complex constant example
Fixes https://golang.org/cl/5444053/#msg41

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5478058
2011-12-10 10:04:33 -08:00
Rob Pike
71ccf73a74 doc/go1: syscalls, strconv
R=rsc
CC=golang-dev
https://golang.org/cl/5472054
2011-12-09 14:12:51 -08:00
Rob Pike
2e338fa69f doc/go1: the rest of the language changes
R=rsc
CC=golang-dev
https://golang.org/cl/5478047
2011-12-09 08:31:57 -08:00
Rob Pike
940c25faa4 tmpltohtml: feature for easier snippet extraction
Lines that end with OMIT are omitted from the output.
A comment such as
        // Example stops here. OMIT
can be used as a marker but not appear in the output.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5477050
2011-12-09 08:31:04 -08:00
Russ Cox
ef1c535727 spec: examples of untyped boolean, string constants
This is a spec correction, not a language change.
The implementations have behaved like this for years
(and there are tests to that effect), and elsewhere in
the spec true and false are defined to be untyped
boolean constants.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5477047
2011-12-09 00:13:19 -05:00
Russ Cox
6a47bb4974 spec: remove redundant, outdated definition of default literal types
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5480047
2011-12-09 00:12:49 -05:00
Russ Cox
d7f050a73e spec: rune is now an alias for int32
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5467048
2011-12-09 00:11:43 -05:00
Charles L. Dorian
9a358df947 spec: fix typo in example comment
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5475046
2011-12-08 22:27:14 -05:00
Russ Cox
a933635579 spec: var x = 'a' defaults to type rune
R=gri, r, r, adg, iant, ken
CC=golang-dev
https://golang.org/cl/5444053
2011-12-08 21:48:19 -05:00
Rob Pike
136c04f71a doc/go1: most of the simple language changes
R=rsc, adg, r
CC=golang-dev
https://golang.org/cl/5477044
2011-12-08 16:39:05 -08:00
Rob Pike
9d59c40eab doc/go1: document rearranged package hierarchy
Some exciting HTML and CSS here.

R=remyoudompheng, rsc, r
CC=golang-dev
https://golang.org/cl/5460047
2011-12-08 11:35:28 -08:00
Rob Pike
1ddedbae31 tmpltohtml: put a DO NOT EDIT mark automatically in the output
R=r, rsc, r
CC=golang-dev
https://golang.org/cl/5469045
2011-12-08 11:26:49 -08:00
Rob Pike
2fa987b6cd doc/go1: map deletion
This CL is in part a proposal for how to write these sections:
- Brief discussion of change
- No attempt to analyze the thinking about it
- Old code
- New code, runnable if possible
- How to update old programs

R=golang-dev, remyoudompheng, gri, adg
CC=golang-dev
https://golang.org/cl/5454044
2011-12-07 16:11:17 -08:00
Rob Pike
bab4dec142 doc: skeleton for release note document
No content yet other than titles and an introductory paragraph.
Once this is in, content can arise as separate manageable CLs.

R=rsc
CC=golang-dev
https://golang.org/cl/5435090
2011-12-07 14:33:37 -08:00
Andrew Gerrand
8d1da1c66a doc: fix weekly.2011-12-06 release notes typo
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5453072
2011-12-07 13:33:59 +11:00
Andrew Gerrand
0367eebb05 weekly.2011-12-06
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5453070
2011-12-07 13:15:10 +11:00
Russ Cox
2666b815a3 use new strconv API
All but 3 cases (in gcimporter.go and hixie.go)
are automatic conversions using gofix.

No attempt is made to use the new Append functions
even though there are definitely opportunities.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5447069
2011-12-05 15:48:46 -05:00
Russ Cox
98553f1422 spec: remove contentious composite literal shortening
R=gri, r, gustavo, r
CC=golang-dev
https://golang.org/cl/5451099
2011-12-05 14:22:23 -05:00
Russ Cox
5f49456465 spec: additional composite literal shortenings per Go 1 plan
R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/5449067
2011-12-02 14:12:53 -05:00
Russ Cox
8a8445ba71 spec: pointer to array can be sliced
This has always been true, but we lost it from the spec
somewhere along the way, probably when we disallowed
the general 'pointer to anything sliceable' slice case.

R=gri
CC=golang-dev
https://golang.org/cl/5437121
2011-12-02 13:11:30 -05:00
Russ Cox
da5a251dde doc: do not slice array literal
The special case in the spec is that you can take the
address of a composite literal using the & operator.

A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid.  This tutorial code and one bug
report are the only places in the tree where it appears.

R=r, gri
CC=golang-dev
https://golang.org/cl/5437120
2011-12-02 12:30:37 -05:00
Russ Cox
4dfe976d97 spec: avoid slice of array literal
R=gri
CC=golang-dev
https://golang.org/cl/5451078
2011-12-02 12:30:20 -05:00
Andrew Gerrand
517503dab8 doc: correct weekly snapshot notes on hash.Hash change
I had the wrong idea when I wrote this.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5437111
2011-12-02 13:36:21 +11:00
Andrew Gerrand
7af813a7f2 weekly.2011-12-02
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5447067
2011-12-02 08:09:49 +11:00
Volker Dobler
a6729b3085 go/doc: Detect headings in comments and format them as h3 in html.
To structure larger sections of comments in html output headings
are detected in comments and formated as h3 in the generated html.
A simple heuristic is used to detect headings in comments:
A heading is a non-blank, non-indented line preceded by a blank
line. It is followed by a blank and a non-blank, non-indented line.
A heading must start with an uppercase letter and end with a letter,
digit or a colon.  A heading may not contain punctuation characters.

R=jan.mercl, gri, adg, rsc, r
CC=golang-dev
https://golang.org/cl/5437056
2011-12-01 09:49:58 -08:00
Andrew Gerrand
9dd07f680a weekly.2011-12-01
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5448067
2011-12-01 16:17:24 +11:00
David Symonds
72a2979ef0 spec: update spacing to match gofmt, where reasonable.
R=gri, rsc
CC=golang-dev
https://golang.org/cl/5327053
2011-11-29 15:47:36 -08:00
Christopher Wedgwood
62203141ac doc/tmptohtml: output fix
R=r, gri
CC=golang-dev
https://golang.org/cl/5441047
2011-11-28 09:50:40 -08:00
Rob Pike
d1324d8a7a effective_go: remove unused variable from a couple of examples
Fixes #2481.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5435068
2011-11-24 08:51:47 -08:00
Rob Pike
f56db6f534 text/template: new, simpler API
The Set type is gone. Instead, templates are automatically associated by
being parsed together; nested definitions implicitly create associations.
Only associated templates can invoke one another.

This approach dramatically reduces the breadth of the construction API.

For now, html/template is deleted from src/pkg/Makefile, so this can
be checked in. Nothing in the tree depends on it. It will be updated next.

R=dsymonds, adg, rsc, r, gri, mikesamuel, nigeltao
CC=golang-dev
https://golang.org/cl/5415060
2011-11-23 20:17:22 -08:00
Rob Pike
422e247332 tutorial: update go_tutorial.html
There's version skew with respect to the programs in doc/progs.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5433048
2011-11-22 11:53:30 -08:00
Russ Cox
6e3e380923 allow direct conversion between string and named []byte, []rune
The allowed conversions before and after are:
        type Tstring string
        type Tbyte []byte
        type Trune []rune

        string <-> string  // ok
        string <-> []byte  // ok
        string <-> []rune // ok
        string <-> Tstring // ok
        string <-> Tbyte // was illegal, now ok
        string <-> Trune // was illegal, now ok

        Tstring <-> string  // ok
        Tstring <-> []byte  // ok
        Tstring <-> []rune // ok
        Tstring <-> Tstring // ok
        Tstring <-> Tbyte // was illegal, now ok
        Tstring <-> Trune // was illegal, now ok

Update spec, compiler, tests.  Use in a few packages.

We agreed on this a few months ago but never implemented it.

Fixes #1707.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5421057
2011-11-22 12:30:02 -05: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
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
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
Russ Cox
d03611f628 allow copy of struct containing unexported fields
An experiment: allow structs to be copied even if they
contain unexported fields.  This gives packages the
ability to return opaque values in their APIs, like reflect
does for reflect.Value but without the kludgy hacks reflect
resorts to.

In general, we trust programmers not to do silly things
like *x = *y on a package's struct pointers, just as we trust
programmers not to do unicode.Letter = unicode.Digit,
but packages that want a harder guarantee can introduce
an extra level of indirection, like in the changes to os.File
in this CL or by using an interface type.

All in one CL so that it can be rolled back more easily if
we decide this is a bad idea.

Originally discussed in March 2011.
https://groups.google.com/group/golang-dev/t/3f5d30938c7c45ef

R=golang-dev, adg, dvyukov, r, bradfitz, jan.mercl, gri
CC=golang-dev
https://golang.org/cl/5372095
2011-11-15 12:20:59 -05:00