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

1854 Commits

Author SHA1 Message Date
Adam Langley
fca335e91a crypto/tls: enforce that either ServerName or InsecureSkipVerify be given.
crypto/tls has two functions for creating a client connection: Dial,
which most users are expected to use, and Client, which is the
lower-level API.

Dial does what you expect: it gives you a secure connection to the host
that you specify and the majority of users of crypto/tls appear to work
fine with it.

Client gives more control but needs more care. Specifically, if it
wasn't given a server name in the tls.Config then it didn't check that
the server's certificates match any hostname - because it doesn't have
one to check against. It was assumed that users of the low-level API
call VerifyHostname on the certificate themselves if they didn't supply
a hostname.

A review of the uses of Client both within Google and in a couple of
external libraries has shown that nearly all of them got this wrong.

Thus, this change enforces that either a ServerName or
InsecureSkipVerify is given. This does not affect tls.Dial.

See discussion at https://groups.google.com/d/msg/golang-nuts/4vnt7NdLvVU/b1SJ4u0ikb0J.

Fixes #7342.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/67010043
2014-02-21 15:56:41 -05:00
Russ Cox
e56c6e7535 runtime/debug: add SetPanicOnFault
SetPanicOnFault allows recovery from unexpected memory faults.
This can be useful if you are using a memory-mapped file
or probing the address space of the current program.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/66590044
2014-02-20 16:18:05 -05:00
Rob Pike
ad4601d1c3 doc/go1.3.txt: unicode upgrade to 6.3.0
LGTM=mpvl
R=mpvl
CC=golang-codereviews
https://golang.org/cl/65550044
2014-02-18 11:50:38 -08:00
Dmitriy Vyukov
c3922f0a63 testing: ease writing parallel benchmarks
Add b.RunParallel function that captures parallel benchmark boilerplate:
creates worker goroutines, joins worker goroutines, distributes work
among them in an efficient way, auto-tunes grain size.
Fixes #7090.

R=bradfitz, iant, josharian, tracey.brendan, r, rsc, gobot
CC=golang-codereviews
https://golang.org/cl/57270043
2014-02-17 06:29:56 +04:00
Carlos Castillo
7861cd6082 cmd/go, go/build: support .m files
go/build is changed to list the .m files in a package, and match them for build constraints, adding them to a new field: Package.MFiles.

The go tool is changed to support building .m files and linking in the results during CGO and SWIG builds. This means packages that create a C interface to calls Objective-C code from go are now go-gettable without producing and distributing .syso files. This change is analogous to the one in Go 1.2 made to support C++ built code.

This change doesn't support .mm files (Objective C++).

Also added support for these MFiles to go list's -json mode.

Fixes #6536.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/60590044
2014-02-13 10:11:44 -08:00
Andrew Gerrand
d908ae17b2 doc: remove "Code that grows with grace" video from front page
It was deleted from Vimeo. I will attempt to get a new version online.

Fixes #7297.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/61740043
2014-02-11 16:00:44 +11:00
Andrew Gerrand
ae5bed04c3 doc: restore race detector manual
This got deleted mistakenly during the content re-org.

Fixes #7275.

LGTM=dvyukov
R=golang-codereviews, minux.ma, dvyukov
CC=golang-codereviews
https://golang.org/cl/60850043
2014-02-11 09:26:34 +11:00
Shenghou Ma
2b6eb111e2 doc/install.html: get rid of explicit version number in docs.
So that we don't need to update the file each time a new version is released.

LGTM=dave, r, adg
R=golang-codereviews, dave, josharian, gobot, adg, r
CC=golang-codereviews
https://golang.org/cl/48730043
2014-02-06 16:09:01 -05:00
Josh Bleecher Snyder
57bc80b5e8 cmd/go, doc/go1.3.txt: misc/benchcmp has been replaced by go tool benchcmp
Fixes #7016.

LGTM=r
R=r
CC=adg, bradfitz, dave, golang-codereviews
https://golang.org/cl/60100043
2014-02-04 11:53:13 -08:00
Rob Pike
592415d682 effective_go: move 'Type switch' section into 'Control structures' section.
Needs to be an h3, not an h2.
Thanks to Mingjie Xing for pointing it out.

LGTM=dsymonds
R=golang-codereviews, dsymonds
CC=golang-codereviews
https://golang.org/cl/55980046
2014-01-23 16:26:42 -08:00
Russ Cox
ae56210708 testing: diagnose buggy tests that panic(nil)
Fixes #6546.

LGTM=dave, bradfitz, r
R=r, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/55780043
2014-01-22 16:04:50 -05:00
David Symonds
1e67453d93 doc: replace "private" with "unexported" in Effective Go.
R=r
CC=golang-codereviews
https://golang.org/cl/53720043
2014-01-17 09:06:39 -08:00
Dmitriy Vyukov
c0b9e6218c runtime: output how long goroutines are blocked
Example of output:

goroutine 4 [sleep for 3 min]:
time.Sleep(0x34630b8a000)
        src/pkg/runtime/time.goc:31 +0x31
main.func·002()
        block.go:16 +0x2c
created by main.main
        block.go:17 +0x33

Full program and output are here:
http://play.golang.org/p/NEZdADI3Td

Fixes #6809.

R=golang-codereviews, khr, kamil.kisiel, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/50420043
2014-01-16 12:54:46 +04:00
Rob Pike
227fe5f64e spec: tighten the wording around . imports
Make it clear that if you do a . import, you cannot use a qualified identifier.

R=gri
CC=golang-codereviews
https://golang.org/cl/52390043
2014-01-14 15:16:01 -08:00
Brad Fitzpatrick
c0eb88029e doc: add cmd/gofmt entry to go1.3.txt
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/52240043
2014-01-14 12:27:51 -08:00
Rob Pike
82e2db70f6 spec: s/and/or/ for correctness and parallelism
No change to the meaning, just bad writing found by
Doug McIlroy.
Let's start the new year off with a bang.

R=golang-codereviews, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/47110044
2014-01-04 10:52:59 -08:00
Emil Hessman
13141315ad spec: Fix broken type identity link
Fixes #7003.

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/47780043
2014-01-03 22:48:03 -08:00
David Symonds
8f3fc547d0 2014: Year of the Gopher.
R=adg, djd, mpvl, nigeltao
CC=golang-codereviews
https://golang.org/cl/46660043
2014-01-01 00:00:22 +11:00
Mihai Borobocea
8183ed19b9 spec: example shows wrong value for complex constant
Looks like a typo.
Fixes #7011.

R=golang-codereviews, r, bradfitz
CC=golang-codereviews
https://golang.org/cl/45350043
2013-12-30 13:29:56 -08:00
Shawn Smith
2f5f193923 doc/contribute: golang-dev -> golang-codereviews
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/46320043
2013-12-29 11:11:28 -08:00
Alex Brainman
e8b7def7f4 doc/go1.3.txt: mention windows syscall.NewCallbackCDecl
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/44160044
2013-12-21 12:52:53 +11:00
Josh Bleecher Snyder
de4ca13eac doc: fix typo in Effective Go
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/44430043
2013-12-20 09:59:51 -08:00
Shenghou Ma
c184940d3f doc/install-source.html: mention make.bash to skip tests
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/42590043
2013-12-15 21:03:12 -05:00
Aram Hăvărneanu
22a7b3442e doc/articles/wiki: remove GNU make dependency
R=golang-dev, adg, minux.ma
CC=golang-dev
https://golang.org/cl/38410043
2013-12-15 17:51:03 -05:00
Ian Lance Taylor
8189605a96 doc: change "threads" to "goroutines"
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/40510049
2013-12-12 18:48:40 -08:00
Andrew Gerrand
e8a1de720f doc: add Go 1.2 to release history page
Fixes #6939.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/41540043
2013-12-13 09:31:49 +11:00
Rob Pike
0d624e1808 doc/go1.3.txt: first checkins: makerelease, liblink
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/40650047
2013-12-12 11:17:54 -08:00
Oling Cat
b349477eab doc/effective_go.html: close some tags.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/37700043
2013-12-11 09:49:28 +11:00
Peter Collingbourne
a5cc5bab5a doc: update list of gccgo import search paths
R=iant
CC=golang-dev
https://golang.org/cl/38560043
2013-12-06 13:33:10 -08:00
Rob Pike
b204448f7e doc/go1.3.txt: add file to track significant CLs for 1.3
Nothing significant so far (right?), but let's lay the keystone.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/36830043
2013-12-03 17:08:51 -08:00
Oling Cat
07d2195c66 doc/install.html: fix a tag.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/30900044
2013-11-25 13:36:16 +11:00
Andrew Gerrand
c497c9ea4b doc: update installation instructions
Clarify that GOROOT should only be set when using a custom install path.
Remove NetBSD from binary install page (we don't provide binaries).
Remove "What's next" links from installation instructions.
Emphasize "How to Write Go Code" page.

Fixes #6613.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/28700043
2013-11-21 07:55:29 +11:00
Russ Cox
a664b49457 doc/asm: more about SP, ARM R11
Also rename URL to /doc/asm.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/26170043
2013-11-13 21:29:34 -05:00
Russ Cox
7dd086e52d encoding/gob: do not use MarshalText, UnmarshalText
This seems to be the best of a long list of bad ways to fix this issue.

Fixes #6760.

R=r
CC=golang-dev
https://golang.org/cl/22770044
2013-11-13 21:29:19 -05:00
Rob Pike
2fbcb08192 doc/asm.html: new document, a brief guide to the assembler
Fixes #6060

R=golang-dev, iant, bradfitz, josharian, minux.ma, aram, rsc
CC=golang-dev
https://golang.org/cl/20930043
2013-11-12 20:04:22 -08:00
Robert Griesemer
f57bf7a556 spec: clarify rules for blank identifiers
This documents the status quo more precisely.
Not a language change.

Fixes #6006.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/14415043
2013-11-12 21:06:54 -05:00
Andrew Gerrand
c72bce901e doc: use the same wording for OS X as the other OSes
I used "and above" when I should have said "or later".

Sorry for the churn.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/25670043
2013-11-13 11:53:01 +11:00
Andrew Gerrand
14b32ed7b2 doc: we support all recent versions of OS X
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/25370045
2013-11-13 11:35:25 +11:00
Ian Lance Taylor
8d206d9d80 doc: update note about GCC 4.8.2 in gccgo instructions
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/22510043
2013-11-06 13:58:35 -08:00
Andrew Gerrand
c1ef845a71 doc/go1.2: link to cgo documentation
I know it's linked in the previous sentence, but this new link is where I want it to be while reading this sentence.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/21770043
2013-11-05 13:54:48 +11:00
Rob Pike
95ae85fb82 doc/go1.2.html: delete repeated word
TBR=rsc

R=golang-dev
CC=golang-dev
https://golang.org/cl/19840043
2013-10-30 09:39:20 -07:00
Rob Pike
0f706d39d4 doc/go1.2.html: stack sizes, thread limits
R=golang-dev, minux.ma, adg, rsc
CC=golang-dev
https://golang.org/cl/19600043
2013-10-30 08:54:53 -07:00
Andrew Gerrand
8b0fad11e5 doc: update front page summary text
R=rsc
CC=golang-dev
https://golang.org/cl/18080045
2013-10-29 15:56:38 +09:00
Robert Griesemer
15da997c7e spec: clarify re-use of underlying arrays in slice operations
Please note the slight rewording for append: The spec now
requires that append reuses the underlying array if it is
sufficiently large. Per majority sentiment.

This is technically a language change but the current
implementation always worked this way.

Fixes #5818.
Fixes #5180.

R=rsc, iant, r, ken, minux.ma, dan.kortschak, rogpeppe, go.peter.90
CC=golang-dev
https://golang.org/cl/14419054
2013-10-16 16:16:54 -07:00
Shenghou Ma
244014e402 doc/effective_go.html: fix code example
Fixes #6595.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14425062
2013-10-15 21:30:49 -04:00
Oling Cat
6f53c4136b doc/contrib.html: fix some tags
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14516057
2013-10-15 18:41:23 +11:00
Shenghou Ma
26f43a089e doc: fix small HTML problems
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/14629043
2013-10-12 18:40:41 -04:00
Rob Pike
7f168f9ccf doc/effective_go.html: fix unescaped less-than character
Why doesn't tidy complain about these?
Found by manlio.perillo.
Fixes #6571

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14608044
2013-10-11 16:39:40 -07:00
Ian Lance Taylor
db3374e24d doc/progs: don't try building cgo tests if CGO_ENABLED=0
R=golang-dev, jsing, r
CC=golang-dev
https://golang.org/cl/14523056
2013-10-11 08:55:13 -07:00
Rob Pike
beca0e124d doc/effective_go.html: fix a couple of cosmetic issues
At the moment, godoc expands the example in the link, but in
the past it has not. Add a waffle word to allow either possibility.
Also change the order of cases in the switch in Compare to
be consistent with the other switch in the function.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14439055
2013-10-10 17:26:03 -07:00