1
0
mirror of https://github.com/golang/go synced 2024-09-24 19:20:13 -06:00
Commit Graph

12438 Commits

Author SHA1 Message Date
Ian Lance Taylor
25f15d5f22 doc: add note about import . to Go 1 compatibility notes
R=r
CC=golang-dev
https://golang.org/cl/5752065
2012-03-06 17:50:11 -08:00
Brad Fitzpatrick
502e29f485 database/sql: add docs about connection state, pooling
Fixes #3223

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5755063
2012-03-06 17:44:47 -08:00
Johan Euphrosine
26dc17ce78 doc: fix typos in laws_of_reflection article, add copyright notice.
Update #2547.

R=golang-dev, minux.ma, r, r, adg
CC=golang-dev
https://golang.org/cl/5755051
2012-03-07 11:24:00 +11:00
Alex Brainman
7a3c6c950b os: fix SameFile to work for directories on windows
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756064
2012-03-07 11:01:23 +11:00
Adam Langley
3ea3a7c9a5 deps: allow crypto/x509 cgo and io/ioutil.
In order to land 5700087 (which moves the knowledge of how to get the
root certificates for the system from crypto/tls to crypto/x509), we
need to relax the restrictions on crypto/x509. Afterwards, we can
probably tighten them up in crypto/tls.

R=golang-dev, rsc, krautz
CC=golang-dev
https://golang.org/cl/5753060
2012-03-06 17:18:09 -05:00
Brad Fitzpatrick
48eacd90a8 database/sql: fix typo bug resulting in double-Prepare
Bug reported by Blake Mizerany found while writing
his new Postgres driver.

R=golang-dev, blake.mizerany
CC=golang-dev
https://golang.org/cl/5754057
2012-03-06 14:10:58 -08:00
Shenghou Ma
97b13acb67 doc: update links
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5754051
2012-03-07 08:15:47 +11:00
Rob Pike
aeefe0fa6e path/filepath: disable AbsTest on windows
SameFile has a bug.

R=golang-dev
TBR=rsc
CC=golang-dev
https://golang.org/cl/5754055
2012-03-07 08:14:12 +11:00
Shenghou Ma
efbd79ce5a doc: remove unsued progs and makehtml script, update progs/run
Due to removal of go_tutorial, unused programs are removed.
        makehtml is unnecessary (it also gives wrong messages when
        the destination file doesn't exist)
        progs/run now compiles all remaining programs under doc/progs.
        Fixes #3076 (again)

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5755053
2012-03-07 08:05:10 +11:00
Rob Pike
2184137cf3 path/filepath/path_test.go: repair and enable TestAbs
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759051
2012-03-07 07:54:56 +11:00
Andrew Gerrand
73b8ccb0b0 doc: add "The go command" article based on Russ' mail
This is a philosophical document. We can soup it up at a later stage,
but for now it's nice to have a URL to point to that isn't a mailing
list post.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5676061
2012-03-07 07:40:21 +11:00
Robert Griesemer
39b186da6c go/parser: fix build (temporarily disable recent change)
R=golang-dev
CC=golang-dev
https://golang.org/cl/5752059
2012-03-06 11:23:27 -08:00
Robert Griesemer
67cbe9431f go/parser: better error sync. if commas are missing
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5756045
2012-03-06 11:05:16 -08:00
Adam Langley
4f25e4be02 crypto/tls: make the package description more accurate and less aspirational.
Fixes #3216.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755056
2012-03-06 12:49:29 -05:00
Shenghou Ma
db80edde7d time: during short test, do not bother tickers take longer than expected
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5752058
2012-03-07 01:10:55 +08:00
Ian Lance Taylor
aabbcda816 runtime: remove unused runtime·signame and runtime·newError
R=golang-dev
CC=golang-dev
https://golang.org/cl/5756044
2012-03-06 09:07:00 -08:00
Maxim Pimenov
eb2163ffbb cmd/go: honour buildflags in go run
Either documentation or implementation
of go run's flags is wrong currently.
This change assumes the documentation
to be right.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752054
2012-03-06 09:33:35 -05:00
Rémy Oudompheng
9eda2b9977 net: do not use reflect for DNS messages.
Fixes #3201.

R=bradfitz, bradfitz, rsc
CC=golang-dev, remy
https://golang.org/cl/5753045
2012-03-06 08:02:39 +01:00
Mikio Hara
9442c4429a net: add skip message to test
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5753048
2012-03-06 15:41:17 +09:00
Brad Fitzpatrick
932c8ddba1 cmd/go: allow go get with arbitrary URLs
This CL permits using arbitrary, non-VCS-qualified URLs as
aliases for fully VCS-qualified and/or well-known code hosting
sites.

Example 1) A VCS-qualified URL can now be shorter.

Before:
$ go get camlistore.org/r/p/camlistore.git/pkg/blobref
After:
$ go get camlistore.org/pkg/blobref

Example 2) A custom domain can be used as the import,
referencing a well-known code hosting site.

Before:
$ go get github.com/bradfitz/sonden
After:
$ go get bradfitz.com/pkg/sonden

The mechanism used is a <meta> tag in the HTML document
retrieved from fetching:

    https://<import>?go-get=1  (preferred)
    http://<import>?go-get=1   (fallback)

The meta tag should look like:

<meta name="go-import" content="import-alias-prefix vcs full-repo-root">

The full-repo-root must be a full URL root to a repository containing
a scheme and *not* containing a ".vcs" qualifier.

The vcs is one of "git", "hg", "svn", etc.

The import-alias-prefix must be a prefix or exact match of the
package being fetched with "go get".

If there are multiple meta tags, only the one with a prefix
matching the import path is used. It is an error if multiple
go-import values match the import prefix.

If the import-alias-prefix is not an exact match for the import,
another HTTP fetch is performed, at the declared root (which does
*not* need to be the domain's root).

For example, assuming that "camlistore.org/pkg/blobref" declares
in its HTML head:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... then:

$ go get camlistore.org/pkg/blobref

... looks at the following URLs:

   https://camlistore.org/pkg/blobref?go-get=1
   http://camlistore.org/pkg/blobref?go-get=1
   https://camlistore.org/?go-get=1
   http://camlistore.org/?go-get=1

Ultimately it finds, at the root (camlistore.org/), the same go-import:

<meta name="go-import" content="camlistore.org git https://camlistore.org/r/p/camlistore" />

... and proceeds to trust it, checking out git //camlistore.org/r/p/camlistore at
the import path of "camlistore.org" on disk.

Fixes #3099

R=r, rsc, gary.burd, eikeon, untheoretic, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/5660051
2012-03-05 22:36:15 -08:00
Alex Brainman
36708a40e0 cmd/dist: use correct hg tag for go version
When looking for suitable tag always start
from current version, not the tip.

R=minux.ma, rsc
CC=golang-dev
https://golang.org/cl/5731059
2012-03-06 17:21:39 +11:00
Andrew Gerrand
f35fa85a3f doc/gopher: flip frontpage gopher's eyes
R=r, r
CC=golang-dev
https://golang.org/cl/5759045
2012-03-06 16:56:30 +11:00
Russ Cox
347cc981f0 cmd/go: add -compiler
go/build: add Context.Compiler

Fixes #3157.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756047
2012-03-06 00:36:24 -05:00
Russ Cox
e9d5a641d7 strconv: add table-based isPrint
Not used yet for simpler merge.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5756048
2012-03-06 00:36:12 -05:00
Brad Fitzpatrick
9ff00c8fc9 go/build: fix windows and plan9 builds
Bit of a band-aid fix.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5757045
2012-03-05 21:33:44 -08:00
Rob Pike
eab4261946 strconv: remove dependency on bytes
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5759044
2012-03-06 15:25:42 +11:00
Andrew Gerrand
4191ff2436 godoc: switch on +1 buttons
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5754048
2012-03-06 15:16:45 +11:00
Andrew Gerrand
d70627e5d0 doc: update install docs for Windows and Go 1, add golang-announce to /project
R=golang-dev, bradfitz, r, rsc
CC=golang-dev
https://golang.org/cl/5758044
2012-03-06 15:16:02 +11:00
Russ Cox
88e86936be go/build: add dependency test
This exercises the Import function but more importantly
gives us a place to write down the policy for dependencies
within the Go tree.  It also forces us to look at the dependencies,
which may lead to adjustments.

Surprises:
 - go/doc imports text/template, for HTMLEscape (could fix)
 - it is impossible to use math/big without fmt (unfixable)
 - it is impossible to use crypto/rand without math/big (unfixable)

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5732062
2012-03-05 23:13:00 -05:00
Rob Pike
98c1baff6f unicode/utf16: delete dependence on package unicode
In the test, verify the copied constants are correct.
Also put the test into package utf16 rather than utf16_test;
the old location was probably due creating the test from
utf8, but the separation is not needed here.

R=golang-dev, bradfitz, rsc, rsc, r
CC=golang-dev
https://golang.org/cl/5752047
2012-03-06 14:58:08 +11:00
Russ Cox
866317af5e cmd/godoc: fixes
These appear to have been left out of the CL I submitted earlier.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5759043
2012-03-05 22:47:35 -05:00
Russ Cox
5e41fe0e45 build: use run.go for running tests
Also, tweak run.go to use no more than 2x the
number of CPUs, and only one on ARM.

53.85u 13.33s 53.69r 	 ./run
50.68u 12.13s 18.85r 	 go run run.go

Fixes #2833.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754047
2012-03-05 22:47:23 -05:00
Russ Cox
4e110af169 runtime: add Compiler
R=iant, r, gri
CC=golang-dev
https://golang.org/cl/5720073
2012-03-05 22:28:02 -05:00
Russ Cox
0a6fdcf63b net: silence another epoll print
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5752048
2012-03-05 22:07:22 -05:00
Andrew Gerrand
f200b72a7c doc: add more gophers
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5753047
2012-03-06 12:50:52 +11:00
Mikio Hara
195ccd5dac net: fix windows build
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5755045
2012-03-06 10:07:08 +09:00
Mikio Hara
d4e1383285 net: improve server and file tests
* Splits into three server tests.
  - TestStreamConnServer for tcp, tcp4, tcp6 and unix networks
  - TestSeqpacketConnServer for unixpacket networks
  - TestDatagramPacketConnServer for udp, udp4, udp6 and unixgram networks
* Adds both PacketConn and Conn test clients to datagram packet conn tests.
* Fixes wildcard listen test cases on dual IP stack platform.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5701066
2012-03-06 09:43:45 +09:00
Ian Lance Taylor
06b7024462 test: match gccgo error messages for bug388.go
As runtime.UintType is no longer defined, the gccgo error
messages have changed.

bug388.go:12:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:12:10: error: invalid named/anonymous mix
bug388.go:13:21: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:17:10: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:18:18: error: reference to undefined identifier ‘runtime.UintType’
bug388.go:22:9: error: non-name on left side of ‘:=’
bug388.go:27:10: error: expected type
bug388.go:32:9: error: expected type
bug388.go:23:14: error: reference to field ‘i’ in object which has no fields or methods

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5755044
2012-03-05 16:21:46 -08:00
Rob Pike
d9832987ba unicode/utf8: remove dependence on unicode.
The dependency was there only to pull in two constants.
Now we define them locally and verify equality in the test.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5754046
2012-03-06 11:14:45 +11:00
Ian Lance Taylor
46031400d0 reflect: fix comment spacing
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5757043
2012-03-05 15:51:58 -08:00
Robert Griesemer
6b2586d29a misc/xcode: fix typos
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5756043
2012-03-05 15:50:48 -08:00
Emil Hessman
4863980f16 Xcode: Example install of language specification for Xcode 4.x.
go.xclangspec is identical to the one in misc/xcode/3/, except for the heading.

Partial workaround for issue 2401.

R=gri
CC=golang-dev
https://golang.org/cl/5732051
2012-03-05 15:11:08 -08:00
Robert Griesemer
286fb69746 C+A: adding c.emil.hessman@gmail.com
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5754044
2012-03-05 15:10:58 -08:00
David Symonds
63e383cff8 expvar: add locking to String, and use RWMutex properly throughout.
R=bradfitz
CC=golang-dev
https://golang.org/cl/5754043
2012-03-06 09:13:26 +11:00
Andrew Gerrand
5e46a8c9f9 misc/dist: add windows packaging support
R=golang-dev, bsiegert, jdpoirier
CC=golang-dev
https://golang.org/cl/5727059
2012-03-06 08:55:53 +11:00
Rémy Oudompheng
aa1aaee7fd runtime: wait for main goroutine before setting GOMAXPROCS.
Fixes #3182.

R=golang-dev, dvyukov, rsc
CC=golang-dev, remy
https://golang.org/cl/5732057
2012-03-05 16:40:27 -05:00
Brad Fitzpatrick
610b5b2fd8 net: remove all direct fmt and bytes imports
Once dnsMsg stops using reflect, we lose even more
indirect dependencies.

R=rsc
CC=golang-dev
https://golang.org/cl/5751043
2012-03-05 13:36:05 -08:00
Russ Cox
6e3a7930eb cmd/gc: if $GOROOT_FINAL is set, rewrite file names in object files
GOROOT_FINAL is a build parameter that means "eventually
the Go tree will be installed here".  Make the file name information
match that eventual location.

Fixes #3180.

R=ken, ken
CC=golang-dev
https://golang.org/cl/5742043
2012-03-05 16:13:33 -05:00
Russ Cox
c0a842e57f runtime/debug: fix test when source cannot be found
This happens with GOROOT_FINAL=/somewhere/else

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5727069
2012-03-05 16:13:15 -05:00
Ugorji Nwoke
0eb4df0bc8 cmd/godoc: remove extra / in paths
If I click on links which should send you to source code (e.g. type, function, etc),
the link is to //src/... (instead of /src/...).
This causes a DNS resolution failure on the browser.

Quick fix is to remove the leading / from package.html
(since godoc.go src links automatically add a leading / as necessary).

Fixes #3193.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5730059
2012-03-05 15:36:33 -05:00