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

1812 Commits

Author SHA1 Message Date
Robert Griesemer
8268eadb9e spec: define notion of named type
The notion of a named type is crucial for the definition
of type identity, assignability, definitions of methods.
Explicitly introduce the notion with an extra sentence.

Fixes #5682.

R=r, rsc, iant
CC=golang-dev
https://golang.org/cl/11055043
2013-07-09 21:12:53 -07:00
Andrew Gerrand
1856286fc2 doc: update playground.js
R=dsymonds
CC=golang-dev
https://golang.org/cl/10933044
2013-07-04 14:24:21 +10:00
Rob Pike
f3aa009a12 doc/go1.2.txt: stable sort
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10761048
2013-07-03 11:46:09 +10:00
Andrew Gerrand
493538adbf cmd/godoc: set up playground for examples that are already visible
This fixes an issue where linking directly to an example makes it not
runnable and visible only in a tiny window. To see the bug in action,
visit this link: http://golang.org/pkg/strings/#example_Map

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10679050
2013-07-02 08:44:25 +10:00
Rick Arnold
49b3301f4c flag: add Getter interface; implement for all Value types
Fixes #5383.

R=golang-dev, 0xjnml, r, rsc
CC=golang-dev
https://golang.org/cl/10472043
2013-06-27 15:30:45 -07:00
Rob Pike
4f2278d4db doc/go1.2.txt: cmd/go and coverage; simple hash Sum functions
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/10631043
2013-06-27 09:20:02 -07:00
Robert Griesemer
de47f68c99 spec: fix spec on conversions to match implementations
The existing compilers convert empty strings to empty
but non-nil byte and rune slices. The spec required
a nil byte and rune slice in those cases. That seems
an odd additional requirement. Adjust the spec to
match the reality.

Also, removed over-specification for conversions of
nil []byte and []rune: such nil slices already act
like empty slices and thus don't need extra language.
Added extra examples instead.

Fixes #5704.

R=rsc, r, iant
CC=golang-dev
https://golang.org/cl/10440045
2013-06-21 16:11:13 -07:00
Ian Lance Taylor
ffde4970d0 doc: update gccgo docs
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10401046
2013-06-20 14:49:15 -07:00
Andrew Gerrand
7468b1d36a doc: style tweaks in preparation for Google Feedback link
Fixes #5589.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/10272051
2013-06-18 15:26:15 +10:00
Andrew Gerrand
55511d2b34 doc: add go1.1.1 to the release notes
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10236045
2013-06-13 12:43:26 +10:00
Shenghou Ma
06f55f5009 net: introduce netgo build tag to build a pure Go net package.
Fixes #4078.

R=golang-dev, bradfitz, rsc, iant
CC=golang-dev
https://golang.org/cl/7100050
2013-06-11 02:55:16 +08:00
Shenghou Ma
bdac989ef7 doc/go_spec: more examples for unspecified cases of the evaluation order
R=golang-dev, bradfitz, gri, iant, rsc
CC=golang-dev
https://golang.org/cl/7235044
2013-06-11 02:52:07 +08:00
Shenghou Ma
177191237e doc/install-source.html: recent ARM and 386 updates
R=golang-dev, dave, adg, remyoudompheng, r
CC=golang-dev
https://golang.org/cl/6845083
2013-06-09 23:15:39 +08:00
Patrick Higgins
6bf6cae28e doc/contribute: add "Understanding the extension" section
Fixes #4996

R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/7547043
2013-06-05 21:09:43 -07:00
Adam Langley
2112fed743 crypto/tls: support TLS 1.1.
The significant change between TLS 1.0 and 1.1 is the addition of an explicit IV in the case of CBC encrypted records. Support for TLS 1.1 is needed in order to support TLS 1.2.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7880043
2013-06-04 20:02:22 -04:00
Andrew Gerrand
850d1026ad doc: add Game of Life to playground toys
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/9961043
2013-06-04 12:59:28 +10:00
Shenghou Ma
022818c142 doc/articles: use C90 standard functions in the cgo article.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9953043
2013-06-04 01:40:53 +08:00
Andrew Gerrand
ae43ea432d doc: add Go 1.1 to release.html
Fixes #5468.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9853051
2013-06-03 11:52:36 +10:00
Dave Cheney
ec1769ba7b doc: update linux tarball version for Go 1.1
R=adg
CC=golang-dev
https://golang.org/cl/9819044
2013-06-03 11:47:42 +10:00
Shenghou Ma
1a145cd52d doc/go1.2.txt: update for CL 8248043.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9949044
2013-06-03 03:09:47 +08:00
Oling Cat
5b7d422a05 doc/go1.1.html: remove extra space; close some tags.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9941043
2013-06-01 10:28:04 -04:00
Robert Griesemer
ab5c762a46 spec: better wording re: receiving from closed channels
As suggested by ej@evanjones.ca.

Fixes #5604.

R=r
CC=golang-dev
https://golang.org/cl/9899043
2013-05-31 11:21:37 -07:00
Rob Pike
85fc2f70ac doc/go1.2.txt: AllocsPerRun now quantized
R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/9728045
2013-05-30 12:41:20 -04:00
Shenghou Ma
5d081792b6 cmd/5a, cmd/dist, runtime: support m/g in the assembler, drop support for R9/R10
to avoid unintentionally clobber R9/R10.
Thanks Lucio for the suggestion.

PS: yes, this could be considered a big change (but not an API change), but
as it turns out even temporarily changes R9/R10 in user code is unsafe and
leads to very hard to diagnose problems later, better to disable using R9/R10
when the user first uses it.
See CL 6300043 and CL 6305100 for two problems caused by misusing R9/R10.

R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/9840043
2013-05-30 03:03:52 +08:00
Katrina Owen
605da0e2a2 doc: Fix typo in approximation of square root
See https://en.wikipedia.org/wiki/Newton%27s_method#Square_root_of_a_number

R=golang-dev, minux.ma, adg
CC=golang-dev
https://golang.org/cl/9145044
2013-05-29 13:49:51 +10:00
Brian G. Merrell
20c524c5e2 effective_go.html: Fix two links
This fixes two intra-page "type assertion" links that were broken in
different ways.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/9797043
2013-05-27 11:00:12 +10:00
Rob Pike
7472ce0e58 fmt.Printf: introduce notation for random access to arguments.
This text is added to doc.go:

        Explicit argument indexes:

        In Printf, Sprintf, and Fprintf, the default behavior is for each
        formatting verb to format successive arguments passed in the call.
        However, the notation [n] immediately before the verb indicates that the
        nth one-indexed argument is to be formatted instead. The same notation
        before a '*' for a width or precision selects the argument index holding
        the value. After processing a bracketed expression [n], arguments n+1,
        n+2, etc. will be processed unless otherwise directed.

        For example,
                fmt.Sprintf("%[2]d %[1]d\n", 11, 22)
        will yield "22, 11", while
                fmt.Sprintf("%[3]*[2].*[1]f", 12.0, 2, 6),
        equivalent to
                fmt.Sprintf("%6.2f", 12.0),
        will yield " 12.00". Because an explicit index affects subsequent verbs,
        this notation can be used to print the same values multiple times
        by resetting the index for the first argument to be repeated:
                fmt.Sprintf("%d %d %#[1]x %#x", 16, 17)
        will yield "16 17 0x10 0x11".

The notation chosen differs from that in C, but I believe it's easier to read
and to remember (we're indexing the arguments), and compatibility with
C's printf was never a strong goal anyway.

While we're here, change the word "field" to "arg" or "argument" in the
code; it was being misused and was confusing.

R=rsc, bradfitz, rogpeppe, minux.ma, peter.armitage
CC=golang-dev
https://golang.org/cl/9680043
2013-05-24 15:49:26 -07:00
Russ Cox
30fde1b279 doc: start go 1.2 notes
This is a file of hints, not a file of polished text.
Let's not try to do polished text until we start the
release process.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/9750043
2013-05-24 16:34:50 -04:00
Ian Lance Taylor
452f3bc759 doc: GCC 4.8.1 is not updated to Go 1.1
I will try again for 4.8.2.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/9663045
2013-05-22 13:05:31 -07:00
David Symonds
c912150761 doc/go_faq: fix example.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/9564044
2013-05-22 12:28:58 +10:00
Robert Griesemer
6a3859f433 spec: removed old or invalid TODOs
Several old TODOs are either resolved now (e.g. when is a return
needed), or are from a time the language wasn't frozen (^ for uints
only). Consolidated the others.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9599044
2013-05-20 14:01:07 -07:00
Robert Griesemer
bb3a32ef6e spec: fix language about "range" clause
Fixes #5434.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/9595044
2013-05-20 13:27:53 -07:00
Shenghou Ma
df29cdd33d doc/go_spec: fix typos
Fixes #5456.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9400044
2013-05-15 03:50:27 +08:00
Nigel Tao
0ae5036b26 doc: add a "New packages" section to the 1.1 release notes.
R=adg, r
CC=golang-dev
https://golang.org/cl/9344044
2013-05-12 21:58:27 -07:00
Robert Griesemer
2d846f6521 spec: fix incorrect example
Fixes #5430.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9305043
2013-05-08 10:42:08 -07:00
Andrew Gerrand
f0c3d26473 doc: pull front page featured articles using new blog JSON feed
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/9288045
2013-05-08 09:23:50 -07:00
Rob Pike
2f326da27e effective_go.html: be more accepting in the guidelines for interface names
Fixes #5421.

R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/9274043
2013-05-07 11:41:36 -07:00
Andrew Gerrand
61dbc3401a doc: add FAQ entry about language changes
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/9244043
2013-05-06 15:02:56 -07:00
Shenghou Ma
6de184b385 syscall: fix prototype of Fchflags (API change)
API change, but the old API is obviously wrong.

R=golang-dev, iant, r, rsc
CC=golang-dev
https://golang.org/cl/9157044
2013-05-07 05:20:00 +08:00
Andrew Gerrand
48c4a87a94 doc: fix formatting in effective go code snippet
Fixes #5403.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/9100046
2013-05-03 15:24:05 -04:00
Russ Cox
a941491b4e doc: only U+FEFF is a byte-order mark; U+FFFE is not
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9103046
2013-05-02 15:01:31 -04:00
Andrew Gerrand
3bd076991b doc: link to Go 1.1 release notes
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9047045
2013-05-01 10:00:05 -04:00
Andrew Gerrand
e2b2e0d8d1 doc/go1.1: remove discussion of "go run" change
Update #5164

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/9049043
2013-04-30 09:47:23 -04:00
Shenghou Ma
7bec1a6033 all: fix typos
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8896045
2013-04-24 04:46:14 +08:00
Oling Cat
e680710d0e doc/code.html: remove doubled word; modify the tab to space.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8919043
2013-04-23 13:13:51 -07:00
Jeremy Jackins
2dd0c03427 doc: fix typo in race_detector.html
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8625044
2013-04-23 13:11:58 -07:00
Shenghou Ma
ed19ab47c3 doc/effective_go.html: fix syntax error in code example
Fixes #5333.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8698046
2013-04-24 03:51:31 +08:00
Andrew Gerrand
994c486aa9 doc: fix typo in Effective Go
Fixes #5329.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8897044
2013-04-22 16:57:23 +02:00
Jonathan Rudenberg
b0cd458605 doc: add missing <code> to go1.1.html
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8880043
2013-04-21 13:10:19 +02:00
Brad Fitzpatrick
10cdb92000 doc: fix another broken link
Fixes #5316

R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/8871043
2013-04-19 12:00:40 -07:00
Rob Pike
1f4055a0ec doc/go1.1.html: document io.ErrNoProgress
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8833050
2013-04-18 17:37:09 -07:00
Brad Fitzpatrick
db6ddff842 doc: fix another broken link
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8763045
2013-04-18 14:48:54 -07:00
Brad Fitzpatrick
12566a60d7 doc: misc tweaks, new links, fix broken links
I read docs and wrote a crawler + link checker on the plane,
which also checks for #fragments. I'll send that out later
when it's less gross.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8729050
2013-04-18 12:43:23 -07:00
Brad Fitzpatrick
32f2fd15df doc/go1.1.html, mime/multipart: document quoted-printable decoding
Fixes #5293

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8840043
2013-04-17 13:25:28 -07:00
Rob Pike
a9c695204d doc: more doubled words
I wrote a tool.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8695047
2013-04-16 14:20:06 -07:00
Rob Pike
f29013d19b doc/effective_go: another doubled word
It's clear that that should never happen.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8798045
2013-04-16 13:59:10 -07:00
Shenghou Ma
86cd1d9e15 doc/effective_go.html: fix typo
Fixes #5296.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8682044
2013-04-17 04:41:28 +08:00
Shenghou Ma
80de7ab190 doc/reference.html: update list of sub-repositories.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/8766043
2013-04-16 04:31:25 +08:00
Stefan Nilsson
0009210b2e doc: fix typo
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/8729045
2013-04-14 09:22:57 +10:00
Rob Pike
548c65a568 spec: add another sentence about BOMs
Although one may argue that they should be legal, gc (at least)
disallows byte order marks that are not the first code point
in the file. Added a sentence to the "Implementation restriction"
clause in the "Source code representation" section to document
this better.

Lifting this restriction (again - the rule has changed at least
twice already) would not break any existing programs, should
we later decide yet again to fiddle the rules about these little
fly specks.

R=golang-dev, dsymonds, gri
CC=golang-dev
https://golang.org/cl/8649043
2013-04-11 11:33:25 -07:00
Jonathan Rudenberg
f9af491307 doc: fix typos in go1.1.html
R=golang-dev, adg, adg
CC=golang-dev
https://golang.org/cl/8488047
2013-04-08 12:04:50 +10:00
Andrew Gerrand
78c4d50d25 doc: document go1.1 build tag
Fixes #5235.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8426048
2013-04-08 11:41:01 +10:00
Kamil Kisiel
13d6f8f7f3 godoc: enable visibility of element linked from URL hash
Expands the example when visiting a URL such as
http://golang.org/pkg/net/http/#example_Hijacker

Fixes #5212.

R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/8378043
2013-04-05 08:04:02 +11:00
Andriy Lytvynov
a854535556 doc/code.html: fix typos
Fixed example program's output to match program's code.
Fixes #5204.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/8365043
2013-04-04 11:11:54 -07:00
Duncan Holm
52700d24bc doc: use the already defined GOPATH in PATH
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8248044
2013-04-04 16:36:10 +11:00
Dave Cheney
19cc9f91fa doc/go1.1.html: mention cgo and cross compilation
R=r, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/8304043
2013-04-04 16:13:29 +11:00
Andrew Gerrand
485c066222 doc: mention availability of race detector in go1.1 doc
R=r
CC=golang-dev
https://golang.org/cl/8301044
2013-04-04 16:10:30 +11:00
Jonathan Rudenberg
2a99f2fb2a cmd/go: run main package when no files are listed
Fixes 5164.

R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/8119049
2013-04-04 12:04:35 +11:00
Dmitriy Vyukov
72d99aec88 doc: fix typos in go1.1
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8342044
2013-04-03 17:03:42 -07:00
Alexei Sholik
5977e34741 doc: fix typos and trailing spaces
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8285044
2013-04-03 16:44:03 -07:00
Andrew Gerrand
e798cd857c doc: mention godoc.org in "How to Write Go Code"
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8344043
2013-04-04 08:56:11 +11:00
Andrew Gerrand
ee923e3f90 doc: simplify How to write Go code article
This version just tells you what to do, rather
than trying to teach you how it all works.
Should be much better for newcomers.

R=dave, gary.burd, alcosholik, r
CC=golang-dev
https://golang.org/cl/8247044
2013-04-04 08:19:24 +11:00
Rob Pike
c4e82bb923 doc: link the race detector document into the release notes
Also:
- put GORACE into the go env command
- do minor housekeeping on the race detector article

Fixes #4995.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/8319044
2013-04-03 13:56:24 -07:00
Rob Pike
a9e1c8fb41 doc/go1.1.html: document the state of gccgo
Fixes #5053.

R=adg, iant
CC=golang-dev
https://golang.org/cl/8337043
2013-04-03 13:29:06 -07:00
Rob Pike
e0f338cca5 doc/go1.1.html: document os/signal.Stop
Also fix the sort order of the laundry list.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8325044
2013-04-03 10:59:36 -07:00
Rob Pike
91cb9995c3 doc/go1.1.html: state that the heap is bigger on 64-bit machines
Be deliberately vague, since the precise details should not be depended upon.
Fixes #5155.

R=golang-dev, gri, adg
CC=golang-dev
https://golang.org/cl/8283044
2013-04-03 10:40:33 -07:00
Robert Griesemer
b34f055138 spec: Go has no 'reference types'
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8288044
2013-04-02 23:17:37 -07:00
Dave Cheney
839c4f0159 doc/go1.1.html: additional tweaks
R=r, adg, minux.ma
CC=golang-dev
https://golang.org/cl/8250043
2013-04-03 16:49:17 +11:00
Andrew Gerrand
062a86b07d doc: add prominent download button to getting started page
Also remove the introduction, which says what the rest of the
page says anyway.

Fixes #5182.

R=golang-dev, kamil.kisiel, r
CC=golang-dev
https://golang.org/cl/8281044
2013-04-03 15:59:17 +11:00
Brad Fitzpatrick
751a24e86e net: delete DialOpt and DialOption; add struct Dialer
Per discussions on golang-nuts and golang-dev:
"Some concerns with DialOpt"
https://groups.google.com/d/msg/golang-nuts/Hfh9aqhXyUw/W3uYi8lOdKcJ
https://groups.google.com/d/msg/golang-dev/37omSQeWv4Y/KASGIfPpXh0J

R=golang-dev, google, r
CC=golang-dev
https://golang.org/cl/8274043
2013-04-02 13:24:16 -07:00
Brad Fitzpatrick
4432be3b28 compress/gzip: add Writer.Flush to call flate.Writer's Flush
From a discussion on golang-nuts.

R=golang-dev, dsymonds, nigeltao, coocood, adg
CC=golang-dev
https://golang.org/cl/8251043
2013-04-02 09:07:43 -07:00
Dave Cheney
54faecac0b doc/go1.1.html: add a note about additional platforms
Mention support for NetBSD, OpenBSD, and cgo for linux/arm.

R=golang-dev, dvyukov, r, minux.ma, adg, bradfitz, adg
CC=golang-dev
https://golang.org/cl/8152043
2013-04-02 15:08:28 +11:00
Rob Pike
b91ae5c27c doc/codewalk/markov: fix slice error in description
Fixes #5176.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8118046
2013-04-01 15:52:15 -07:00
Shenghou Ma
6e054190f7 doc/go1.1: mention (*testing.B).ReportAllocs()
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/8198043
2013-03-31 02:17:25 +08:00
Elias Naur
c1786a9e3b doc: fix typo in effective_go.html
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7548045
2013-03-29 10:28:37 -07:00
Robert Griesemer
04341b246e cmd/godoc: cleanups
- removed gratuitous empty lines that creeped into command line output
- changed comment color to a dark green so that links don't visually melt into them
- removed some TODOs
- updated doc.go

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8108044
2013-03-28 13:05:30 -07:00
Rob Pike
48ecfc979f faq: update with some links and 1.1-specific details
R=golang-dev, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/8038048
2013-03-27 15:26:57 -07:00
Jonathan Rudenberg
0657e7df9f doc: fix go1.1.html typos
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7635049
2013-03-27 11:09:14 -07:00
Dave Cheney
24c2c88b90 doc: consistent path names in example
Always use /home/you for $HOME in examples.

Trivial enough that someone else can integrate this change if they are editing go1.1.html

R=r
CC=golang-dev
https://golang.org/cl/8025043
2013-03-27 09:22:23 +11:00
Rob Pike
a101bfc620 doc/go1.1.html: net/mail, net/smtp
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7835049
2013-03-26 11:47:27 -07:00
Rob Pike
237b8b8b66 doc/go1.1.html: describe Zone and other net changes
Mild adaptation of rsc's 8021043, which I was unable to clpatch.
(rsc is offline)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7741049
2013-03-26 10:54:55 -07:00
Andrew Gerrand
a52855535a doc: fix typo in go 1.1 doc
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7725049
2013-03-26 09:37:17 -07:00
David Symonds
1e0e65ea59 doc/articles: update reference to obsolete "package documentation".
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7475048
2013-03-26 13:01:24 +11:00
Rob Pike
4529c047b8 doc/go1.1.html: introduction
R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/7696045
2013-03-25 17:41:12 -07:00
Brad Fitzpatrick
35c85321cc doc: add summary of net/http additions to Go 1.1
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7812050
2013-03-25 15:17:44 -07:00
Brad Fitzpatrick
fc4c5b14ef doc: add DialOpt and friends to go1.1.html
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7725048
2013-03-25 10:31:19 -07:00
Rob Pike
4c48e4ecb5 doc/go1.1.html: performance
An overview is all that's required.

R=golang-dev, remyoudompheng, bradfitz, adg
CC=golang-dev
https://golang.org/cl/7577050
2013-03-23 08:29:59 -07:00
Robert Griesemer
259e8cec7a doc/go1.1.html: fix broken links
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7834049
2013-03-22 16:41:27 -07:00
Rob Pike
bfeb79bae5 doc/go1.1.html: blockprofile, method values, ListenUnixgram, etc.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/7496051
2013-03-22 15:45:16 -07:00
Robert Griesemer
462a17e0f3 spec: remove most §links for the now more common in-text links
Also:
- more consistenly use "xxx" statement rather than <code>xxx</code> statement
- fix/remove unnecessary links

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7821050
2013-03-22 15:36:04 -07:00
Rob Pike
7191ef7199 doc/go1.1.html: return requirements
R=golang-dev, rsc, jeremyjackins, gri
CC=golang-dev
https://golang.org/cl/7838045
2013-03-22 14:51:22 -07:00
Rob Pike
d02089101c spec: add example showing missing return statement
Will help people find the rules by searching the spec by
having a comment saying "missing return";
"terminating statement" does not evoke the rule to the
uninitiated.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7838044
2013-03-22 10:03:55 -07:00
Rob Pike
d88133137b go1.1.html: bufio.Scanner and reflect; more about surrogates
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7958043
2013-03-21 22:37:13 -07:00
Russ Cox
aafc444b74 debug/elf: restore Go 1.0 semantics for (*File).Symbols
Also adjust the implementation of applyRelocationsAMD64
so that the test added in CL 6848044 still passes.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7686049
2013-03-21 17:01:39 -04:00
Rob Pike
178d8d4f7a doc/go1.1.html: more TODOs done
Only the net stuff remains as significant work in the "minor changes" section.

R=golang-dev, dave, elias.naur, rsc
CC=golang-dev
https://golang.org/cl/7933044
2013-03-21 13:51:49 -07:00
Rob Pike
b636f192e2 spec: fix description of initialization
The analysis does not depend on the values of the items.
Fixes #4648.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/7593050
2013-03-20 15:05:28 -07:00
Russ Cox
6e15683cae spec: define method values
Fixes #2280.

R=golang-dev, r, bradfitz, iant, andybalholm, gri
CC=golang-dev
https://golang.org/cl/7816045
2013-03-20 16:54:07 -04:00
Rob Pike
ee5a794fbb doc/go1.1.html: add links to the text, write some new sections
R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/7914043
2013-03-19 16:40:19 -07:00
Rob Pike
b89a2bcf01 doc/go1.1.html: document the surrogate and BOM changes
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7853048
2013-03-18 22:50:32 -07:00
Rob Pike
f005eddb3a doc/go1.1.html: document some of the library changes.
Still much to do, but this is a start.

R=golang-dev, adg, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/7729046
2013-03-18 15:27:05 -07:00
Robert Griesemer
58e21ddaf9 spec: remove special int rule for shifts
The rule is not concistently followed by gc.
It appears that gccgo is ignoring it. go/types
does not implement this rule. However, both
gccgo and now go/types can compile/type-check
the entire std library (and thus all the shift
expressions occuring in it) w/o errors. For
more details see the discussion in issue 4883.

Fixes #4880.
Fixes #4881.
Fixes #4883.

R=rsc, r, iant, ken, ken, mtj, rogpeppe
CC=golang-dev
https://golang.org/cl/7707043
2013-03-15 13:55:50 -07:00
Herbert Georg Fischer
99021b767f doc: explain why cmd/go uses https for repositories and how to work around it
Fixes #3418.

R=golang-dev, r
CC=adg, golang-dev
https://golang.org/cl/7712045
2013-03-15 13:43:10 -07:00
Rob Pike
09cd13c51d doc/go_faq.html: add entry about pointer to interface
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7546050
2013-03-15 11:38:50 -07:00
Mike Rosset
b4afe88973 doc: clarify that gccgo is a GCC front-end
R=golang-dev, r, iant, iant
CC=golang-dev
https://golang.org/cl/6454072
2013-03-12 17:12:56 -07:00
Rob Pike
c34050fd53 spec: rewrite the description of panic and recover.
The old description was misleading and inaccurate.

Fixes #4774.

R=iant, rsc, gri
CC=golang-dev
https://golang.org/cl/7761044
2013-03-12 14:28:16 -07:00
Rob Pike
9dfcfb9385 effective_go.html: fix semaphore example
It didn't work properly according to the Go memory model.
Fixes #5023.

R=golang-dev, dvyukov, adg
CC=golang-dev
https://golang.org/cl/7698045
2013-03-12 10:53:01 -07:00
Robert Griesemer
b66df0e9ba spec: typed indices must be of integer type
The same rules apply for make arguments.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/7656043
2013-03-11 09:20:52 -07:00
Robert Griesemer
c729ed631f spec: result type of a comparison is always untyped bool
For details see the cited issue.

Fixes #4793.

R=rsc, r, iant, ken
CC=golang-dev
https://golang.org/cl/7524044
2013-03-11 09:16:29 -07:00
Rick Arnold
cea78cb58e doc/contribute: add instructions to fix codereview on windows
Tell Windows users how to update Mercurial's library.zip to add some missing dependencies.

Fixes #4745.

R=golang-dev, patrick.allen.higgins, minux.ma, adg
CC=golang-dev
https://golang.org/cl/7558043
2013-03-11 12:14:42 +11:00
Rob Pike
33e8ca4d67 effective_go.html: add a section on type assertions
The information was missing, oddly enough.

R=golang-dev, rsc, iant
CC=golang-dev
https://golang.org/cl/7636044
2013-03-08 13:53:17 -08:00
Rob Pike
9e329a0d16 effective_go.html: move and rework the blank identifier section
Also rename the relevant examples and make sure the working one compiles.

R=golang-dev, bradfitz, adg, iant, rsc
CC=golang-dev
https://golang.org/cl/7597043
2013-03-08 10:41:20 -08:00
Robert Griesemer
51338095eb spec: clarify unsafe.Offsetof
Fixes #4905.

R=rsc, r, iant, ken
CC=golang-dev
https://golang.org/cl/7583043
2013-03-07 20:11:37 -08:00
Rob Pike
45a3b3714f doc/effective_go.html: unify and expand the discussion of Sprintf and String
It's a common mistake to build a recursive String method; explain it well and
show how to avoid it.

R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/7486049
2013-03-06 15:47:49 -08:00
Rob Pike
5f07125cb9 effective_go.html: round 3 of minor edits.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7489044
2013-03-06 10:08:48 -08:00
Rob Pike
b3915112b9 doc/effective_go.html: update slices and maps.
Drop the phrase "reference types", which has caused confusion.
Add a section about 2D arrays, a common newbie question.

R=golang-dev, cespare, adg, rsc
CC=golang-dev
https://golang.org/cl/7423051
2013-03-05 14:13:53 -08:00
Robert Griesemer
9905cec0dc spec: terminating statements for functions
The only functional change is the new section
on terminating statements.

There is a minor syntax rewrite (not change)
of function declarations to make it easier to
refer to the notion of a function from all places
where it is used (function decls, method decls,
and function literals).

Includes some minor fixes/additions of missing links.

Based closely on Russ' proposal.

Fixes #65.

R=rsc, r, iant, ken, bradfitz
CC=golang-dev
https://golang.org/cl/7415050
2013-03-04 13:55:35 -08:00
Robert Griesemer
4be38dde84 spec: cyclic imports are illegal
Fixes #4976.

R=r
CC=golang-dev
https://golang.org/cl/7421050
2013-03-04 12:59:40 -08:00
Rob Pike
bfbac2dc1c doc/go1.1.html: fix typo in URL
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7423050
2013-03-03 09:12:36 -08:00
Rob Pike
5aacf43651 doc/go1.1.html: document the moving of exp/... and old/....
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7445050
2013-03-02 11:55:25 -08:00
Robert Griesemer
67a6b4f0ef spec: fallthrough may not appear in last clause of a switch
Replacement for CL 7370053 which attempted to make fallthrough's
syntactically a part of switch statements. Because they may be
labeled, fixing that CL completely would require too much spec
surgery.

Fixes #4923.

R=r, iant, rsc, ken
CC=golang-dev
https://golang.org/cl/7416048
2013-03-01 16:45:14 -08:00
Rob Pike
6bfec725cf doc/effective_go.html: minor updates, part 1
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7454044
2013-02-28 16:57:55 -08:00
Andrew Gerrand
17d12d6cb6 doc: fix root.html styles
R=r
CC=golang-dev
https://golang.org/cl/7442045
2013-03-01 11:22:13 +11:00
Rob Pike
2145cd51e3 doc/articles/image_package.html: fix x/y mistake
Fixes #4942.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7444047
2013-02-28 15:52:58 -08:00
Rob Pike
7ae41e8010 doc: correct some minor HTML errors found by tidy
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7439046
2013-02-28 13:32:36 -08:00
Rob Pike
fbec8347cb doc/effective_go.html: use correct name in Interface Checks section
Fixes #4897.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7377061
2013-02-27 14:42:53 -08:00
Andrew Gerrand
93158bf243 doc: document that weekly.html is only a historical reference
Fixes #4810.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7401050
2013-02-26 09:23:34 +11:00
Andrew Gerrand
052d845c5c doc: fix wiki codelab description of template parsing
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7372048
2013-02-26 08:31:47 +11:00
Russ Cox
aed05446b4 doc: mention go fix in go1.1 release notes draft
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/7379045
2013-02-21 14:28:34 -05:00
Brad Fitzpatrick
92ab6fb4e1 doc: fix old broken link
The Camlistore code tree rearranged after the go tool came
out. (I didn't know this link was here until I saw it in
some logs.)

R=adg
CC=golang-dev
https://golang.org/cl/7374043
2013-02-19 22:40:54 -08:00
Shenghou Ma
d251fc39f2 doc/gccgo_contribute: mention gofrontend-dev@googlegroups.com mailing list
R=iant
CC=golang-dev
https://golang.org/cl/7323064
2013-02-19 19:20:44 +08:00
Russ Cox
61e02ee901 spec: clarify when range x does not evaluate x
Fixes #4644.

R=r, adonovan
CC=golang-dev
https://golang.org/cl/7307083
2013-02-15 14:39:28 -05:00
Oling Cat
aecbcd0914 doc/contribute: fix some tags, remove extra space.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7327048
2013-02-15 14:01:12 +11:00
David Symonds
4101469ccc doc: adjust indentation in Effective Go commentary example.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7225080
2013-02-13 16:43:55 +11:00
Russ Cox
71c941b6f6 spec: only require parens around ambiguous conversions
This is documenting the status quo. The previous cleanup
added this language as an implementation restriction, but
at least for now it is really part of the language proper.

Fixes #4605.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7305071
2013-02-11 07:48:14 -05:00
Russ Cox
7576179aa3 spec: document fp rounding during explicit constant conversion
The gc compilers already behave this way. It was an explicit
decision during the very long constant design discussions,
but it appears not to have made it into the spec.

Fixes #4398.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7313069
2013-02-11 07:47:41 -05:00
Russ Cox
0a22018d46 spec: reject top-level init names
Fixes #4586.

R=golang-dev, remyoudompheng, r
CC=golang-dev
https://golang.org/cl/7307082
2013-02-11 07:46:39 -05:00
Dave Cheney
eda9590aae doc: update contribute.html
Fixes #4582.

* mentioned hg upload.
* added section on hg file.
* added small mention about being inside $GOROOT.
* added hg revert @NNNN
* reorganise the hg submit section for the common case of a non committer.
* made the Copyright section h2
* added note about leaving copyright years unchanged.

R=golang-dev, metanata4, shivakumar.gn, minux.ma, adg, shanemhansen
CC=golang-dev, metanata4
https://golang.org/cl/7278047
2013-02-10 19:40:33 -05:00
Dave Cheney
d8630694db doc: move os specific build instructions to wiki
Fixes #4010.

This proposal avoids cluttering the main install-source.html with OS specific instructions by linking to the wiki for details. See discussion in the comments.

R=adg, minux.ma
CC=golang-dev
https://golang.org/cl/7241068
2013-02-10 17:39:13 -05:00
Greg Ward
74e1577645 doc: link to wiki Projects page instead of old Project Dashboard.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7308079
2013-02-11 09:18:31 +11:00
Russ Cox
81eb930f7e spec: clarify that any unsafe.Pointer type is okay in conversion
The spec is not clear about whether this is allowed or not,
but both compilers allow it, because the reflect implementation
takes advantage of it. Document current behavior.

Fixes #4679.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7303064
2013-02-09 17:36:31 -05:00