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

12428 Commits

Author SHA1 Message Date
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
Russ Cox
bdf71e463b A+C: Ugorji Nwoke (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5746043
2012-03-05 15:36:20 -05:00
Brad Fitzpatrick
7300b43c2b net: remove more use of fmt
Also add a TODO for the broken *dnsMsg String method.

R=golang-dev, rsc, borman
CC=golang-dev
https://golang.org/cl/5720075
2012-03-05 12:20:58 -08:00
Sameer Ajmani
a55a6cb925 misc/emacs: fix extra indentation after comments that end with a period
in emacs go mode.  Thanks Alex Shinn for the patch.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5728063
2012-03-05 14:58:35 -05:00
Brad Fitzpatrick
82a9294d1b net: don't import bytes or fmt in mac.go
Also add some more MAC tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5728065
2012-03-05 11:43:28 -08:00
Russ Cox
eb5db57d1a cmd/go: sync type Package and go list doc
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5730061
2012-03-05 14:41:30 -05:00
Shenghou Ma
eb5af840d5 test/run.go: fix build
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5727068
2012-03-06 03:34:53 +08:00
Shenghou Ma
6e211225d7 syscall: fix mkall.sh, mksyscall_linux.pl, and regen for Linux/ARM
CL 3075041 says ARM is not little-endian, but my test suggests otherwise.
My test program is:

    package main
    import ("fmt"; "syscall"; "os")
    func main() {
       err := syscall.Fallocate(1, 1/*FALLOC_FL_KEEP_SIZE*/, 0, int64(40960));
       fmt.Fprintln(os.Stderr, err)
    }

Without this CL, ./test > testfile will show: file too large; and strace shows:
    fallocate(1, 01, 0, 175921860444160)    = -1 EFBIG (File too large)
With this CL, ./test > testfile will show: <nil>; and strace shows:
    fallocate(1, 01, 0, 40960)              = 0

Quoting rsc:
"[It turns out that] ARM syscall ABI requires 64-bit arguments to use an
(even, odd) register pair, not an (odd, even) pair. Switching to "big-endian"
worked because it ended up using the high 32-bits (always zero in the tests
we had) as the padding word, because the 64-bit argument was the last one,
and because we fill in zeros for the rest of the system call arguments, up to
six. So it happened to work."

I updated mksyscall_linux.pl to accommodate the register pair ABI requirement,
and removed all hand-tweaked syscall routines in favor of the auto-generated
ones. These including: Ftruncate, Truncate, Pread and Pwrite.

Some recent Linux/ARM distributions do not bundle kernel asm headers,
so instead we always get latest asm/unistd.h from git.kernel.org (just like
what we do for FreeBSD).

R=ken, r, rsc, r, dave, iant
CC=golang-dev
https://golang.org/cl/5726051
2012-03-06 03:12:11 +08:00
Brad Fitzpatrick
1042d7d5ef expvar: add missing locking in String methods
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5726062
2012-03-05 11:09:50 -08:00
Rémy Oudompheng
c073a1602a cmd/go: honor buildflags in go test.
Fixes #3196.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5725044
2012-03-05 19:58:04 +01:00
Russ Cox
cae604f734 cmd/gc: must not inline panic, recover
R=lvd, gri
CC=golang-dev
https://golang.org/cl/5731061
2012-03-05 13:51:44 -05:00