Compare commits

..

84 Commits

Author SHA1 Message Date
Andrew Gerrand
a1ef950a15 [release-branch.go1.5] go1.5.4
Change-Id: I7b62b2f358d2c2540e8d84e5c4739cfba73a19d1
Reviewed-on: https://go-review.googlesource.com/21827
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
2016-04-11 23:39:07 +00:00
Alex Brainman
90bf0f1e5d runtime: leave directory before removing it in TestDLLPreloadMitigation
Fixes #15120

Change-Id: I1d9a192ac163826bad8b46e8c0b0b9e218e69570
Reviewed-on: https://go-review.googlesource.com/21520
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/21681
Run-TryBot: Andrew Gerrand <adg@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2016-04-08 05:11:52 +00:00
Brad Fitzpatrick
77ef9c7e79 syscall: point to x/sys in DLL loading docs, update syscall generator
Updates the syscall generator for patchset 4 of https://golang.org/cl/21388.

Updates #14959

Change-Id: Icbd6df489887d3dcc076dfc73d4feb1376abaf8b
Reviewed-on: https://go-review.googlesource.com/21428
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-on: https://go-review.googlesource.com/21680
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-08 05:11:49 +00:00
Brad Fitzpatrick
a241a38d20 runtime, syscall: only search for Windows DLLs in the System32 directory
Make sure that for any DLL that Go uses itself, we only look for the
DLL in the Windows System32 directory, guarding against DLL preloading
attacks.

(Unless the Windows version is ancient and LoadLibraryEx is
unavailable, in which case the user probably has bigger security
problems anyway.)

This does not change the behavior of syscall.LoadLibrary or NewLazyDLL
if the DLL name is something unused by Go itself.

This change also intentionally does not add any new API surface. Instead,
x/sys is updated with a LoadLibraryEx function and LazyDLL.Flags in:
    https://golang.org/cl/21388

Updates #14959

Change-Id: I8d29200559cc19edf8dcf41dbdd39a389cd6aeb9
Reviewed-on: https://go-review.googlesource.com/21140
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/21639
Run-TryBot: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-08 05:11:45 +00:00
Brad Fitzpatrick
5b874ee8b7 crypto/rsa, crypto/ecdsa: fail earlier on zero parameters
Change-Id: Ia6ed49d5ef3a256a55e6d4eaa1b4d9f0fc447013
Reviewed-on: https://go-review.googlesource.com/21560
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-on: https://go-review.googlesource.com/21638
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
2016-04-08 05:11:42 +00:00
Robert Griesemer
2cfbb87520 crypto/dsa: eliminate invalid PublicKey early
For PublicKey.P == 0, Verify will fail. Don't even try.

Change-Id: I1009f2b3dead8d0041626c946633acb10086d8c8
Reviewed-on: https://go-review.googlesource.com/21533
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/21637
2016-04-08 05:11:39 +00:00
Alberto Donizetti
92faba5418 [release-branch.go1.5] doc: update install from source instructions for go1.5.3
Fixes #14020

Change-Id: I454c2613912a7efcb464c6e6f3ac2e0ec89fb719
Reviewed-on: https://go-review.googlesource.com/18750
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/18945
2016-01-27 18:57:04 +00:00
Chris Broadfoot
27d5c0ede5 [release-branch.go1.5] go1.5.3
Change-Id: Id0700749ff51122cd3e0793f5d6adb50121bfe6c
Reviewed-on: https://go-review.googlesource.com/18595
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-01-13 19:43:20 +00:00
Russ Cox
575890b120 [release-branch.go1.5] math/big: fix nat test
Go 1.5 does not have nat.utoa(16) but has nat.hexString().

Change-Id: Iac91c8bf3c6cd404f255f75d237c2d3b84d99359
Reviewed-on: https://go-review.googlesource.com/18613
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-01-13 19:05:51 +00:00
Russ Cox
62eae67994 [release-branch.go1.5] doc: document Go 1.5.3
Change-Id: I9b4b76abfba66ff655aef55b43d9b4721aba604a
Reviewed-on: https://go-review.googlesource.com/18587
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-on: https://go-review.googlesource.com/18594
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-13 18:23:45 +00:00
Russ Cox
b2cf5e7aa0 [release-branch.go1.5] math/big: fix Exp(x, x, x) for certain large x
Fixes #13907.

Change-Id: Ieaa5183f399b12a9177372212adf481c8f0b4a0d
Reviewed-on: https://go-review.googlesource.com/18491
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Vlad Krasnov <vlad@cloudflare.com>
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-on: https://go-review.googlesource.com/18586
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2016-01-13 18:22:21 +00:00
Russ Cox
0027ed1872 [release-branch.go1.5] math/big: fix carry propagation in Int.Exp Montgomery code
Fixes #13515.

Change-Id: I7dd5fbc816e5ea135f7d81f6735e7601f636fe4f
Reviewed-on: https://go-review.googlesource.com/17672
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-on: https://go-review.googlesource.com/18585
2016-01-13 18:20:38 +00:00
Chris Broadfoot
e89d3b45f6 [release-branch.go1.5] doc: add heading IDs to Code of Conduct
Fixes #13514

Change-Id: I3903d3926ed4f5d54cfb77209d93c950b832b933
Reviewed-on: https://go-review.googlesource.com/17511
Reviewed-by: Francesc Campoy Flores <campoy@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/17512
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-07 22:07:12 +00:00
Chris Broadfoot
5ff82f8500 doc: correct ordering of go1.5 minor revisions
Fixes #13474

Change-Id: Ic86e54f6bc67db46504f7d43a0666647af308177
Reviewed-on: https://go-review.googlesource.com/17404
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/17406
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-04 01:00:32 +00:00
Chris Broadfoot
40cbf58f96 [release-branch.go1.5] go1.5.2
Change-Id: I65289f4019a975126d4cda3fd26379829912c0cd
Reviewed-on: https://go-review.googlesource.com/17336
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-03 00:44:15 +00:00
Chris Broadfoot
3cca924e64 [release-branch.go1.5] doc: correct release date for go1.5.2
Change-Id: I6bee207db7485f96a499f51b2d1346c35e086d41
Reviewed-on: https://go-review.googlesource.com/17337
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17338
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-03 00:31:00 +00:00
Chris Broadfoot
377a8a806b [release-branch.go1.5] doc: document go1.5.2
Change-Id: Ib6a9e131113523e6b1e5b7604480028b9ffbfa93
Reviewed-on: https://go-review.googlesource.com/17178
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/17335
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-12-03 00:18:53 +00:00
Andrew Gerrand
8ad1dc42ad [release-branch.go1.5] doc: add Code of Conduct
Fixes #13073

Change-Id: I4fd9c6c61f1b9d49f66816839ca35209b4147ae3
Reviewed-on: https://go-review.googlesource.com/17167
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17168
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-11-24 04:33:05 +00:00
Austin Clements
6b26788c55 [release-branch.go1.5] runtime: take stack barrier lock during copystack
Commit bbd1a1c prevented SIGPROF from scanning stacks that were being
copied, but it didn't prevent a stack copy (specifically a stack
shrink) from happening while SIGPROF is scanning the stack. As a
result, a stack copy may adjust stack barriers while SIGPROF is in the
middle of scanning a stack, causing SIGPROF to panic when it detects
an inconsistent stack barrier.

Fix this by taking the stack barrier lock while adjusting the stack.
In addition to preventing SIGPROF from scanning this stack, this will
block until any in-progress SIGPROF is done scanning the stack.

For 1.5.2.

Fixes #13362.
Updates #12932.

Change-Id: I422219c363054410dfa56381f7b917e04690e5dd
Reviewed-on: https://go-review.googlesource.com/17191
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17194
2015-11-24 02:18:46 +00:00
Austin Clements
9f9b95bb59 [release-branch.go1.5] runtime: improve stack barrier debugging
This improves stack barrier debugging messages in various ways:

1) Rather than printing only the remaining stack barriers (of which
   there may be none, which isn't very useful), print all of the G's
   stack barriers with a marker at the position the stack itself has
   unwound to and a marker at the problematic stack barrier (where
   applicable).

2) Rather than crashing if we encounter a stack barrier when there are
   no more stkbar entries, print the same debug message we would if we
   had encountered a stack barrier at an unexpected location.

Hopefully this will help with debugging #12528.

Change-Id: I2e6fe6a778e0d36dd8ef30afd4c33d5d94731262
Reviewed-on: https://go-review.googlesource.com/17147
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17193
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-11-24 01:33:14 +00:00
David Crawshaw
3facf7eceb [release-branch.go1.5] misc/ios: keep whole buffer in go_darwin_arm_exec
The existing go_darwin_arm_exec.go script does not work with Xcode 7,
not due to any significant changes, but just ordering and timing of
statements from lldb. Unfortunately the current design of
go_darwin_arm_exec.go makes it not obvious what gets stuck where, so
this moves from a moving buffer window to a complete buffer of the
lldb output.

The result is easier code to follow, and it works with Xcode 7.

Updates #12660.

Change-Id: I3b8b890b0bf4474119482e95d84e821a86d1eaed
Reviewed-on: https://go-review.googlesource.com/16634
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-on: https://go-review.googlesource.com/17146
2015-11-23 15:16:54 +00:00
Ian Lance Taylor
bebbc62402 [release-branch.go1.5] cmd/cgo: ignore vars with no name or type if they have a AttrSpecification
Fixes #13344.

Change-Id: I33c6721fd33d144c85c87840ddf27ce15aa72328
Reviewed-on: https://go-review.googlesource.com/17151
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/17145
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-11-23 04:38:50 +00:00
Russ Cox
2876020ee7 [release-branch.go1.5] cmd/go: disable TestNoteReading on dragonfly
It started failing on the dragonfly builder at an unrelated commit
(one that changed the wording in a few comments in the compiler).

Created #13364 to track this.

Change-Id: I462880bed8ff565a9950e7e185de97d43999c5e2
Reviewed-on: https://go-review.googlesource.com/17143
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17144
2015-11-23 03:10:30 +00:00
Russ Cox
2246923267 [release-branch.go1.5] runtime: fix bad signal stack when using cgo-created threads and async signals
Cgo-created threads transition between having associated Go g's and m's and not.
A signal arriving during the transition could think it was safe and appropriate to
run Go signal handlers when it was in fact not.
Avoid the race by masking all signals during the transition.

Fixes #12277.

Change-Id: Ie9711bc1d098391d58362492197a7e0f5b497d14
Reviewed-on: https://go-review.googlesource.com/16915
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17141
2015-11-23 02:01:28 +00:00
Shawn Walker-Salas
61e1caee5b [release-branch.go1.5] cmd/go: fix Go buildid reading on Solaris
TestNoteReading fails on Solaris with linkmode=external due to some
assumptions made about how ELF .note sections are written by some
linkers.

On current versions of Solaris and older derivatives, SHF_ALLOC is
intentionally ignored for .note sections unless the .note section is
assigned to the text segment via a mapfile.  Also, if .note sections
are assigned to the text segment, no PT_NOTE program header will be
created thwarting Go's attempts at attempting to quickly find the
.note.

Furthermore, Go assumes that the relevant note segment will be placed
early in the file while the Solaris linker currently places the note
segment last in the file, additionally thwarting Go's optimisation
attempts that read only the first 16KB of the file to find the
buildid.

The fix is to detect when the note section is outside of the first
16KB of the file and then fallback to additionally reading that
section of the file.  This way, in future versions of Solaris when
this linking behaviour is changed, the fast path will always succeed
and we'll only be slower if it fails; likewise, any other linker that
does this will also just work.

Fixes #12178

Change-Id: I61c1dc3f744ae3ad63938386d2ace8a432c0efe1
Reviewed-on: https://go-review.googlesource.com/14210
Run-TryBot: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-on: https://go-review.googlesource.com/17142
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-23 02:01:20 +00:00
Shenghou Ma
497e4a8093 [release-branch.go1.5] runtime: make it possible to call syscall on solaris without g
The nosplit stack is now much bigger, so we can afford to allocate
libcall on stack.

Fix asmsysvicall6 to not update errno if g == nil.

These two fixes TestCgoCallbackGC on solaris, which used to stuck
in a loop.

Change-Id: Id1b13be992dae9f059aa3d47ffffd37785300933
Reviewed-on: https://go-review.googlesource.com/17076
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17140
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
2015-11-23 01:15:02 +00:00
Russ Cox
edc3452f4a [release-branch.go1.5] runtime: make asmcgocall work without a g
Solaris needs to make system calls without a g,
and Solaris uses asmcgocall to make system calls.
I know, I know.

I hope this makes CL 16915, fixing #12277, work on Solaris.

Change-Id: If988dfd37f418b302da9c7096f598e5113ecea87
Reviewed-on: https://go-review.googlesource.com/17072
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17129
2015-11-23 01:14:55 +00:00
Russ Cox
a28f3ef1c2 [release-branch.go1.5] cmd/go: skip TestNoteReading2K on Windows
It's intended primarily as a torture test for OS X.
Apparently Windows can't take it.

Updates fix for #12327.

Change-Id: If2af249ea8e2f55bff8f232dce06172e6fef9f49
Reviewed-on: https://go-review.googlesource.com/17073
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/17128
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-11-23 01:14:23 +00:00
Russ Cox
55c62d6e32 [release-branch.go1.5] cmd/go: fix loading of buildid on OS X executables
This is a bit of a belt-and-suspenders fix.
On OS X, we now parse the Mach-O file to find the __text section,
which is arguably the more proper fix. But it's a bit worrisome to
depend on a name like __text not changing, so we also read more
of the initial file (now 32 kB, up from 8 kB) and scan that too.

Fixes #12327.

Change-Id: I3a201a3dc278d24707109bb3961c3bdd8b8a0b7b
Reviewed-on: https://go-review.googlesource.com/17038
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/17127
2015-11-23 01:13:28 +00:00
Russ Cox
aca4fa5cf5 [release-branch.go1.5] cmd/link: link go.o first
Does not fix #12327 but nicer anyway.

Change-Id: I4ad730a4ca833d76957b7571895b3a08a6a530d4
Reviewed-on: https://go-review.googlesource.com/16964
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/17126
2015-11-23 01:13:20 +00:00
Russ Cox
0c64370422 [release-branch.go1.5] cmd/compile: fix crash with -race on large expr containing string->[]byte conversion
The assumption is that there are no nested function calls in complex expressions.
For the most part that assumption is true. It wasn't for these calls inserted during walk.
Fix that.

I looked through all the calls to mkcall in walk and these were the only cases
that emitted calls, that could be part of larger expressions (like not delete),
and that were not already handled.

Fixes #12225.

Change-Id: Iad380683fe2e054d480e7ae4e8faf1078cdd744c
Reviewed-on: https://go-review.googlesource.com/17034
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/17125
2015-11-23 01:13:14 +00:00
Russ Cox
29a22abfc8 [release-branch.go1.5] cmd/compile: fix Val vs Opt collision
Fixes #12686.

Change-Id: I7a9f49dbd1f60b1d0240de57787753b425f9548c
Reviewed-on: https://go-review.googlesource.com/17031
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/17124
2015-11-23 01:13:04 +00:00
Austin Clements
08ea82529a [release-branch.go1.5] runtime: prevent sigprof during all stack barrier ops
A sigprof during stack barrier insertion or removal can crash if it
detects an inconsistency between the stkbar array and the stack
itself. Currently we protect against this when scanning another G's
stack using stackLock, but we don't protect against it when unwinding
stack barriers for a recover or a memmove to the stack.

This commit cleans up and improves the stack locking code. It
abstracts out the lock and unlock operations. It uses the lock
consistently everywhere we perform stack operations, and pushes the
lock/unlock down closer to where the stack barrier operations happen
to make it more obvious what it's protecting. Finally, it modifies
sigprof so that instead of spinning until it acquires the lock, it
simply doesn't perform a traceback if it can't acquire it. This is
necessary to prevent self-deadlock.

Updates #11863, which introduced stackLock to fix some of these
issues, but didn't go far enough.

Updates #12528.

Change-Id: I9d1fa88ae3744d31ba91500c96c6988ce1a3a349
Reviewed-on: https://go-review.googlesource.com/17036
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17057
2015-11-20 19:55:36 +00:00
Russ Cox
7ab4cba9ad [release-branch.go1.5] runtime: fix new stack barrier check
During a crash showing goroutine stacks of all threads
(with GOTRACEBACK=crash), it can be that f == nil.

Only happens on Solaris; not sure why.

Change-Id: Iee2c394a0cf19fa0a24f6befbc70776b9e42d25a
Reviewed-on: https://go-review.googlesource.com/17110
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/17122
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-20 19:55:27 +00:00
Austin Clements
2a6c7739b5 [release-branch.go1.5] runtime: handle sigprof in stackBarrier
Currently, if a profiling signal happens in the middle of
stackBarrier, gentraceback may see inconsistencies between stkbar and
the barriers on the stack and it will certainly get the wrong return
PC for stackBarrier. In most cases, the return PC won't be a PC at all
and this will immediately abort the traceback (which is considered
okay for a sigprof), but if it happens to be a valid PC this may sent
gentraceback down a rabbit hole.

Fix this by detecting when the gentraceback starts in stackBarrier and
simulating the completion of the barrier to get the correct initial
frame.

Change-Id: Ib11f705ac9194925f63fe5dfbfc84013a38333e6
Reviewed-on: https://go-review.googlesource.com/17035
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17056
2015-11-20 19:53:41 +00:00
Austin Clements
a10b27094c [release-branch.go1.5] runtime: handle sysReserve returning a pointer below the arena
In mheap.sysAlloc, if an allocation at arena_used would exceed
arena_end (but wouldn't yet push us past arena_start+_MaxArean32), it
trie to extend the arena reservation by another 256 MB. It extends the
arena by calling sysReserve, which, on 32-bit, calls mmap without
MAP_FIXED, which means the address is just a hint and the kernel can
put the mapping wherever it wants. In particular, mmap may choose an
address below arena_start (the kernel also chose arena_start, so there
could be lots of space below it). Currently, we don't detect this case
and, if it happens, mheap.sysAlloc will corrupt arena_end and
arena_used then return the low pointer to mheap.grow, which will crash
when it attempts to index in to h_spans with an underflowed index.

Fix this by checking not only that that p+p_size isn't too high, but
that p isn't too low.

Fixes #13143.

Change-Id: I8d0f42bd1484460282a83c6f1a6f8f0df7fb2048
Reviewed-on: https://go-review.googlesource.com/16927
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/16988
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:25:11 +00:00
Austin Clements
e49330911f [release-branch.go1.5] runtime: avoid stat underflow crash
If the area returned by sysReserve in mheap.sysAlloc is outside the
usable arena, we sysFree it. We pass a fake stat pointer to sysFree
because we haven't added the allocation to any stat at that point.
However, we pass a 0 stat, so sysFree panics when it decrements the
stat because the fake stat underflows.

Fix this by setting the fake stat to the allocation size.

Updates #13143 (this is a prerequisite to fixing that bug).

Change-Id: I61a6c9be19ac1c95863cf6a8435e19790c8bfc9a
Reviewed-on: https://go-review.googlesource.com/16926
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/16987
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:25:04 +00:00
Michael Hudson-Doyle
20a053611b [release-branch.go1.5] runtime: ignore rt_sigaction error if it is for SIGRTMAX
A forward port of https://codereview.appspot.com/124900043/ which somehow
got lost somewhere.

Fixes #13024

Change-Id: Iab128899e65c51d90f6704e3e1b2fc9326e3a1c2
Reviewed-on: https://go-review.googlesource.com/16853
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/16986
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-11-17 02:24:56 +00:00
Austin Clements
a8e839bb55 [release-branch.go1.5] runtime: make SIGPROF skip stacks that are being copied
sigprof tracebacks the stack across systemstack switches to make
profile tracebacks more complete. However, it does this even if the
user stack is currently being copied, which means it may be in an
inconsistent state that will cause the traceback to panic.

One specific way this can happen is during stack shrinking. Some
goroutine blocks for STW, then enters gchelper, which then assists
with root marking. If that root marking happens to pick the original
goroutine and its stack needs to be shrunk, it will begin to copy that
stack. During this copy, the stack is generally inconsistent and, in
particular, the actual locations of the stack barriers and their
recorded locations are temporarily out of sync. If a SIGPROF happens
during this inconsistency, it will walk the stack all the way back to
the blocked goroutine and panic when it fails to unwind the stack
barriers.

Fix this by disallowing jumping to the user stack during SIGPROF if
that user stack is in the process of being copied.

Fixes #12932.

Change-Id: I9ef694c2c01e3653e292ce22612418dd3daff1b4
Reviewed-on: https://go-review.googlesource.com/16819
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/16985
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:24:49 +00:00
Alex Brainman
ecb9ce6a78 [release-branch.go1.5] net: fix off by one error while counting interfaces on windows
Fixes #12301

Change-Id: I8d01ec9551c6cff7e6129e06a7deb36a3be9de41
Reviewed-on: https://go-review.googlesource.com/16751
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/16984
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:24:40 +00:00
Michael Hudson-Doyle
5dda3bc2fd [release-branch.go1.5] cmd/internal/obj/ppc64: fix assembly of SRADCC with immediate
sradi and sradi. hide the top bit of their immediate argument apart from the
rest of it, but the code only handled the sradi case.

I'm pretty sure this is the only instruction missing (a couple of the rotate
instructions encode their immediate the same way but their handling looks OK).

This fixes the failure of "GOARCH=amd64 ~/go/bin/go install -v runtime" as
reported in the bug.

Fixes #11987

Change-Id: I0cdefcd7a04e0e8fce45827e7054ffde9a83f589
Reviewed-on: https://go-review.googlesource.com/16710
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/16983
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:24:27 +00:00
Ian Lance Taylor
c0c730da28 [release-branch.go1.5] cmd/link: support new 386/amd64 relocations
The GNU binutils recently picked up support for new 386/amd64
relocations.  Add support for them in the Go linker when doing an
internal link.

The 386 relocation R_386_GOT32X was proposed in
https://groups.google.com/forum/#!topic/ia32-abi/GbJJskkid4I .  It can
be treated as identical to the R_386_GOT32 relocation.

The amd64 relocations R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX were
proposed in
https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0 .  They
can both be treated as identical to the R_X86_64_GOTPCREL relocation.

The purpose of the new relocations is to permit additional linker
relaxations in some cases.  We do not attempt to support those cases.

While we're at it, remove the unused and in some cases out of date
_COUNT names from ld/elf.go.

Fixes #13114.

Change-Id: I34ef07f6fcd00cdd2996038ecf46bb77a49e968b
Reviewed-on: https://go-review.googlesource.com/16529
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/16982
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:23:57 +00:00
Michael Hudson-Doyle
8b3f554d86 [release-branch.go1.5] cmd/compile: do not let regopt use REGTMP on ppc64
ppc64 codegen assumes that it is OK to stomp on r31 at any time, but it is not
excluded from the set of registers that regopt is allowed to use.

Fixes #12597

Change-Id: I29c7655e32abd22f3c21d88427b73e4fca055233
Reviewed-on: https://go-review.googlesource.com/15245
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/16981
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:23:39 +00:00
Austin Clements
244294f821 [release-branch.go1.5] runtime: adjust huge page flags only on huge page granularity
This fixes an issue where the runtime panics with "out of memory" or
"cannot allocate memory" even though there's ample memory by reducing
the number of memory mappings created by the memory allocator.

Commit 7e1b61c worked around issue #8832 where Linux's transparent
huge page support could dramatically increase the RSS of a Go process
by setting the MADV_NOHUGEPAGE flag on any regions of pages released
to the OS with MADV_DONTNEED. This had the side effect of also
increasing the number of VMAs (memory mappings) in a Go address space
because a separate VMA is needed for every region of the virtual
address space with different flags. Unfortunately, by default, Linux
limits the number of VMAs in an address space to 65530, and a large
heap can quickly reach this limit when the runtime starts scavenging
memory.

This commit dramatically reduces the number of VMAs. It does this
primarily by only adjusting the huge page flag at huge page
granularity. With this change, on amd64, even a pessimal heap that
alternates between MADV_NOHUGEPAGE and MADV_HUGEPAGE must reach 128GB
to reach the VMA limit. Because of this rounding to huge page
granularity, this change is also careful to leave large used and
unused regions huge page-enabled.

This change reduces the maximum number of VMAs during the runtime
benchmarks with GODEBUG=scavenge=1 from 692 to 49.

Fixes #12233.

Change-Id: Ic397776d042f20d53783a1cacf122e2e2db00584
Reviewed-on: https://go-review.googlesource.com/15191
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/16980
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:23:29 +00:00
Francisco Claude
36fe6f2d5d [release-branch.go1.5] multipart: fixes problem parsing mime/multipart of certain lengths
When parsing the multipart data, if the delimiter appears but doesn't
finish with -- or \n or \r\n, it assumes the data can be consumed. This
is incorrect when the peeking buffer finishes with --delimiter-

Fixes #12662

Change-Id: I329556a9a206407c0958289bf7a9009229120bb9
Reviewed-on: https://go-review.googlesource.com/14652
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/16969
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:20:49 +00:00
David Crawshaw
6a18122614 [release-branch.go1.5] runtime: preserve R11 in darwin/arm entrypoint
The _rt0_arm_darwin_lib entrypoint has to conform to the darwin ARMv7
calling convention, which requires functions to preserve the value of
R11. Go uses R11 as the liblink REGTMP register, so save it manually.

Also avoid using R4, which is also callee-save.

Fixes #12590

Change-Id: I9c3b374e330f81ff8fc9c01fa20505a33ddcf39a
Reviewed-on: https://go-review.googlesource.com/14603
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/16968
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:20:29 +00:00
Ian Lance Taylor
a89768461f [release-branch.go1.5] runtime: unblock special glibc signals on each thread
Glibc uses some special signals for special thread operations.  These
signals will be used in programs that use cgo and invoke certain glibc
functions, such as setgid.  In order for this to work, these signals
need to not be masked by any thread.  Before this change, they were
being masked by programs that used os/signal.Notify, because it
carefully masks all non-thread-specific signals in all threads so that a
dedicated thread will collect and report those signals (see ensureSigM
in signal1_unix.go).

This change adds the two glibc special signals to the set of signals
that are unmasked in each thread.

Fixes #12498.

Change-Id: I797d71a099a2169c186f024185d44a2e1972d4ad
Reviewed-on: https://go-review.googlesource.com/14297
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-on: https://go-review.googlesource.com/16967
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:20:21 +00:00
Shenghou Ma
2cfde41520 [release-branch.go1.5] runtime/cgo: explicitly link msvcrt on windows
It's because runtime links to ntdll, and ntdll exports a couple
incompatible libc functions. We must link to msvcrt first and
then try ntdll.

Fixes #12030.

Change-Id: I0105417bada108da55f5ae4482c2423ac7a92957
Reviewed-on: https://go-review.googlesource.com/14472
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/16966
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:20:12 +00:00
Keith Randall
095710b39e [release-branch.go1.5] cmd/compile/internal/gc: handle weird map literals in key dedup
We compute whether two keys k1 and k2 in a map literal are duplicates by
constructing the expression OEQ(k1, k2) and calling the constant
expression evaluator on that expression, then extracting the boolean
result.

Unfortunately, the constant expression evaluator can fail for various
reasons.  I'm not really sure why it is dying in the case of 12536, but
to be safe we should use the result only if we get a constant back (if
we get a constant back, it must be boolean).  This probably isn't a
permanent fix, but it should be good enough for 1.5.2.

A permanent fix would be to ensure that the constant expression
evaluator can always work for map literal keys, and if not the compiler
should generate an error saying that the key isn't a constant (or isn't
comparable to some specific other key).

This patch has the effect of allowing the map literal to compile when
constant eval of the OEQ fails.  If the keys are really equal (which the
map impl will notice at runtime), one will overwrite the other in the
resulting map.  Not great, but better than a compiler crash.

Fixes #12536

Change-Id: Ic151a5e3f131c2e8efa0c25c9218b431c55c1b30
Reviewed-on: https://go-review.googlesource.com/14400
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/16965
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-17 02:20:02 +00:00
Keith Randall
0b5982f08e [release-branch.go1.5] runtime: memmove/memclr pointers atomically
Make sure that we're moving or zeroing pointers atomically.
Anything that is a multiple of pointer size and at least
pointer aligned might have pointers in it.  All the code looks
ok except for the 1-pointer-sized moves.

Fixes #13160
Update #12552

Change-Id: Ib97d9b918fa9f4cc5c56c67ed90255b7fdfb7b45
Reviewed-on: https://go-review.googlesource.com/16668
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/16910
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-13 17:26:50 +00:00
Michael Hudson-Doyle
d3a413569b [release-branch.go1.5] runtime: adjust the arm64 memmove and memclr to operate by word as much as they can
Not only is this an obvious optimization:

benchmark                           old MB/s     new MB/s     speedup
BenchmarkMemmove1-4                 35.35        29.65        0.84x
BenchmarkMemmove2-4                 63.78        52.53        0.82x
BenchmarkMemmove3-4                 89.72        73.96        0.82x
BenchmarkMemmove4-4                 109.94       95.73        0.87x
BenchmarkMemmove5-4                 127.60       112.80       0.88x
BenchmarkMemmove6-4                 143.59       126.67       0.88x
BenchmarkMemmove7-4                 157.90       138.92       0.88x
BenchmarkMemmove8-4                 167.18       231.81       1.39x
BenchmarkMemmove9-4                 175.23       252.07       1.44x
BenchmarkMemmove10-4                165.68       261.10       1.58x
BenchmarkMemmove11-4                174.43       263.31       1.51x
BenchmarkMemmove12-4                180.76       267.56       1.48x
BenchmarkMemmove13-4                189.06       284.93       1.51x
BenchmarkMemmove14-4                186.31       284.72       1.53x
BenchmarkMemmove15-4                195.75       281.62       1.44x
BenchmarkMemmove16-4                202.96       439.23       2.16x
BenchmarkMemmove32-4                264.77       775.77       2.93x
BenchmarkMemmove64-4                306.81       1209.64      3.94x
BenchmarkMemmove128-4               357.03       1515.41      4.24x
BenchmarkMemmove256-4               380.77       2066.01      5.43x
BenchmarkMemmove512-4               385.05       2556.45      6.64x
BenchmarkMemmove1024-4              381.23       2804.10      7.36x
BenchmarkMemmove2048-4              379.06       2814.83      7.43x
BenchmarkMemmove4096-4              387.43       3064.96      7.91x
BenchmarkMemmoveUnaligned1-4        28.91        25.40        0.88x
BenchmarkMemmoveUnaligned2-4        56.13        47.56        0.85x
BenchmarkMemmoveUnaligned3-4        74.32        69.31        0.93x
BenchmarkMemmoveUnaligned4-4        97.02        83.58        0.86x
BenchmarkMemmoveUnaligned5-4        110.17       103.62       0.94x
BenchmarkMemmoveUnaligned6-4        124.95       113.26       0.91x
BenchmarkMemmoveUnaligned7-4        142.37       130.82       0.92x
BenchmarkMemmoveUnaligned8-4        151.20       205.64       1.36x
BenchmarkMemmoveUnaligned9-4        166.97       215.42       1.29x
BenchmarkMemmoveUnaligned10-4       148.49       221.22       1.49x
BenchmarkMemmoveUnaligned11-4       159.47       239.57       1.50x
BenchmarkMemmoveUnaligned12-4       163.52       247.32       1.51x
BenchmarkMemmoveUnaligned13-4       167.55       256.54       1.53x
BenchmarkMemmoveUnaligned14-4       175.12       251.03       1.43x
BenchmarkMemmoveUnaligned15-4       192.10       267.13       1.39x
BenchmarkMemmoveUnaligned16-4       190.76       378.87       1.99x
BenchmarkMemmoveUnaligned32-4       259.02       562.98       2.17x
BenchmarkMemmoveUnaligned64-4       317.72       842.44       2.65x
BenchmarkMemmoveUnaligned128-4      355.43       1274.49      3.59x
BenchmarkMemmoveUnaligned256-4      378.17       1815.74      4.80x
BenchmarkMemmoveUnaligned512-4      362.15       2180.81      6.02x
BenchmarkMemmoveUnaligned1024-4     376.07       2453.58      6.52x
BenchmarkMemmoveUnaligned2048-4     381.66       2568.32      6.73x
BenchmarkMemmoveUnaligned4096-4     398.51       2669.36      6.70x
BenchmarkMemclr5-4                  113.83       107.93       0.95x
BenchmarkMemclr16-4                 223.84       389.63       1.74x
BenchmarkMemclr64-4                 421.99       1209.58      2.87x
BenchmarkMemclr256-4                525.94       2411.58      4.59x
BenchmarkMemclr4096-4               581.66       4372.20      7.52x
BenchmarkMemclr65536-4              565.84       4747.48      8.39x
BenchmarkGoMemclr5-4                194.63       160.31       0.82x
BenchmarkGoMemclr16-4               295.30       630.07       2.13x
BenchmarkGoMemclr64-4               480.24       1884.03      3.92x
BenchmarkGoMemclr256-4              540.23       2926.49      5.42x

but it turns out that it's necessary to avoid the GC seeing partially written
pointers.

It's of course possible to be more sophisticated (using ldp/stp to move 16
bytes at a time in the core loop and unrolling the tail copying loops being
the obvious ideas) but I wanted something simple and (reasonably) obviously
correct.

Fixes #12552

Change-Id: Iaeaf8a812cd06f4747ba2f792de1ded738890735
Reviewed-on: https://go-review.googlesource.com/14813
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/16909
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-13 17:26:45 +00:00
Austin Clements
fc0f36b2ce [release-branch.go1.5] runtime: use 4 byte writes in amd64p32 memmove/memclr
Currently, amd64p32's memmove and memclr use 8 byte writes as much as
possible and 1 byte writes for the tail of the object. However, if an
object ends with a 4 byte pointer at an 8 byte aligned offset, this
may copy/zero the pointer field one byte at a time, allowing the
garbage collector to observe a partially copied pointer.

Fix this by using 4 byte writes instead of 8 byte writes.

Updates #12552.

Change-Id: I13324fd05756fb25ae57e812e836f0a975b5595c
Reviewed-on: https://go-review.googlesource.com/15370
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-on: https://go-review.googlesource.com/16908
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-13 17:26:39 +00:00
Michael Hudson-Doyle
9f59bc85a2 [release-branch.go1.5] runtime: adjust the ppc64x memmove and memclr to copy by word as much as it can
Issue #12552 can happen on ppc64 too, although much less frequently in my
testing. I'm fairly sure this fixes it (2 out of 200 runs of oracle.test failed
without this change and 0 of 200 failed with it). It's also a lot faster for
large moves/clears:

name           old speed      new speed       delta
Memmove1-6      157MB/s ± 9%    144MB/s ± 0%    -8.20%         (p=0.004 n=10+9)
Memmove2-6      281MB/s ± 1%    249MB/s ± 1%   -11.53%        (p=0.000 n=10+10)
Memmove3-6      376MB/s ± 1%    328MB/s ± 1%   -12.64%        (p=0.000 n=10+10)
Memmove4-6      475MB/s ± 4%    345MB/s ± 1%   -27.28%         (p=0.000 n=10+8)
Memmove5-6      540MB/s ± 1%    393MB/s ± 0%   -27.21%        (p=0.000 n=10+10)
Memmove6-6      609MB/s ± 0%    423MB/s ± 0%   -30.56%         (p=0.000 n=9+10)
Memmove7-6      659MB/s ± 0%    468MB/s ± 0%   -28.99%         (p=0.000 n=8+10)
Memmove8-6      705MB/s ± 0%   1295MB/s ± 1%   +83.73%          (p=0.000 n=9+9)
Memmove9-6      740MB/s ± 1%   1241MB/s ± 1%   +67.61%         (p=0.000 n=10+8)
Memmove10-6     780MB/s ± 0%   1162MB/s ± 1%   +48.95%         (p=0.000 n=10+9)
Memmove11-6     811MB/s ± 0%   1180MB/s ± 0%   +45.58%          (p=0.000 n=8+9)
Memmove12-6     820MB/s ± 1%   1073MB/s ± 1%   +30.83%         (p=0.000 n=10+9)
Memmove13-6     849MB/s ± 0%   1068MB/s ± 1%   +25.87%        (p=0.000 n=10+10)
Memmove14-6     877MB/s ± 0%    911MB/s ± 0%    +3.83%        (p=0.000 n=10+10)
Memmove15-6     893MB/s ± 0%    922MB/s ± 0%    +3.25%         (p=0.000 n=10+9)
Memmove16-6     897MB/s ± 1%   2418MB/s ± 1%  +169.67%         (p=0.000 n=10+9)
Memmove32-6     908MB/s ± 0%   3927MB/s ± 2%  +332.64%         (p=0.000 n=10+8)
Memmove64-6    1.11GB/s ± 0%   5.59GB/s ± 0%  +404.64%          (p=0.000 n=9+9)
Memmove128-6   1.25GB/s ± 0%   6.71GB/s ± 2%  +437.49%         (p=0.000 n=9+10)
Memmove256-6   1.33GB/s ± 0%   7.25GB/s ± 1%  +445.06%        (p=0.000 n=10+10)
Memmove512-6   1.38GB/s ± 0%   8.87GB/s ± 0%  +544.43%        (p=0.000 n=10+10)
Memmove1024-6  1.40GB/s ± 0%  10.00GB/s ± 0%  +613.80%        (p=0.000 n=10+10)
Memmove2048-6  1.41GB/s ± 0%  10.65GB/s ± 0%  +652.95%         (p=0.000 n=9+10)
Memmove4096-6  1.42GB/s ± 0%  11.01GB/s ± 0%  +675.37%         (p=0.000 n=8+10)
Memclr5-6       269MB/s ± 1%    264MB/s ± 0%    -1.80%        (p=0.000 n=10+10)
Memclr16-6      600MB/s ± 0%    887MB/s ± 1%   +47.83%        (p=0.000 n=10+10)
Memclr64-6     1.06GB/s ± 0%   2.91GB/s ± 1%  +174.58%         (p=0.000 n=8+10)
Memclr256-6    1.32GB/s ± 0%   6.58GB/s ± 0%  +399.86%         (p=0.000 n=9+10)
Memclr4096-6   1.42GB/s ± 0%  10.90GB/s ± 0%  +668.03%         (p=0.000 n=8+10)
Memclr65536-6  1.43GB/s ± 0%  11.37GB/s ± 0%  +697.83%          (p=0.000 n=9+8)
GoMemclr5-6     359MB/s ± 0%    360MB/s ± 0%    +0.46%        (p=0.000 n=10+10)
GoMemclr16-6    750MB/s ± 0%   1264MB/s ± 1%   +68.45%        (p=0.000 n=10+10)
GoMemclr64-6   1.17GB/s ± 0%   3.78GB/s ± 1%  +223.58%         (p=0.000 n=10+9)
GoMemclr256-6  1.35GB/s ± 0%   7.47GB/s ± 0%  +452.44%        (p=0.000 n=10+10)

Update #12552

Change-Id: I7192e9deb9684a843aed37f58a16a4e29970e893
Reviewed-on: https://go-review.googlesource.com/14840
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/16907
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-13 17:26:31 +00:00
Austin Clements
71a7647662 [release-branch.go1.5] runtime: fix recursive GC assist better
Commit c257dfb attempted to fix recursive allocation in gcAssistAlloc;
however, it only reduced it: setting gp.gcalloc to 0 isn't sufficient
to disable assists at the beginning of the GC cycle when gp.gcscanwork
is also small or zero.

Fix this recursion more completely by setting gcalloc to a sentinel
value that directly disables assists.

Fixes #12894 (again).

Change-Id: I9599566222d8f540d0b39806846bfc702e6666e5
Reviewed-on: https://go-review.googlesource.com/15891
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-10-15 19:33:11 +00:00
Austin Clements
c257dfb178 [release-branch.go1.5] runtime: fix recursive GC assist
If gcAssistAlloc is unable to steal or perform enough scan work, it
calls timeSleep, which allocates. If this allocation requires
obtaining a new span, it will in turn attempt to assist GC. Since
there's likely still no way to satisfy the assist, it will sleep
again, and so on, leading to potentially deep (not infinite, but also
not bounded) recursion.

Fix this by disallowing assists during the timeSleep.

This same problem was fixed on master by 65aa2da. That commit built on
several other changes and hence can't be directly cherry-picked. This
commit implements the same idea.

Fixes #12894.

Change-Id: I152977eb1d0a3005c42ff3985d58778f054a86d4
Reviewed-on: https://go-review.googlesource.com/15720
Reviewed-by: Rick Hudson <rlh@golang.org>
2015-10-12 21:50:18 +00:00
Austin Clements
6f21d7cc26 doc: update release tag in source directions to go1.5.1
Change-Id: I8da1c7a86adf6672e5e5c44cbab422706833c1da
Reviewed-on: https://go-review.googlesource.com/15350
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/15244
2015-10-03 08:00:50 +00:00
Chris Broadfoot
3c5af9a846 [release-branch.go1.5] doc: document go1.4.3
Change-Id: Ib1bfe4038e2b125a31acd9ff7772e462b0a6358f
Reviewed-on: https://go-review.googlesource.com/14852
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14854
2015-09-23 04:10:56 +00:00
Chris Broadfoot
f2e4c8b5fb [release-branch.go1.5] go1.5.1
Change-Id: I98d9fefd923e2a35031385045382ba372f1d614a
Reviewed-on: https://go-review.googlesource.com/14401
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-09 00:52:53 +00:00
Chris Broadfoot
e7915b2727 [release-branch.go1.5] doc: document go1.5.1
Change-Id: I56452559acc432e06c15844d3f25dbeacafe77b7
Reviewed-on: https://go-review.googlesource.com/14402
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14403
2015-09-09 00:50:40 +00:00
Rob Pike
23c646c226 [release-branch.go1.5] cmd/asm: handle CMPF and CMPD on ARM
These instructions are special cases that were missed in the translation.
The second argument must go into the Reg field not the To field.

Fixes #12458

For Go 1.5.1

Change-Id: Iad57c60c7e38e3bcfafda483ed5037ce670e8816
Reviewed-on: https://go-review.googlesource.com/14183
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14358
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2015-09-08 23:23:05 +00:00
Rob Pike
71387ff53f [release-branch.go1.5] fmt: in Scanf, %c can scan a space, so don't skip spaces at %c
In short, %c should just give you the next rune, period.
Apparently this is the design. I use the term loosely.

Fixes #12275

Change-Id: I6f30bed442c0e88eac2244d465c7d151b29cf393
Reviewed-on: https://go-review.googlesource.com/13821
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14395
2015-09-08 23:19:57 +00:00
Rob Pike
5e1648d5fe [release-branch.go1.5] doc: mention that go install removes binaries built by go build
Fixes #12288.

For inclusion in the 1.5.1 release.

Change-Id: I9354b7eaa76000498465c4a5cbab7246de9ecb7c
Reviewed-on: https://go-review.googlesource.com/14382
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/14394
2015-09-08 22:51:17 +00:00
Brad Fitzpatrick
7765a5b7d0 [release-branch.go1.5] AUTHORS: add Oracle as corporate copyright holder
Some commits made by Aram from his personal email address are
actually copyright Oracle:

a77fcb3 net: fix comment in sendFile
b0e71f4 net: link with networking libraries when net package is in use
92e959a syscall, net: use sendfile on Solaris
db8d5b7 net: try to fix setKeepAlivePeriod on Solaris
fe5ef5c runtime, syscall: link Solaris binaries directly instead of using dlopen/dlsym
2b90c3e go/build: enable cgo by default on solaris/amd64
2d18ab7 doc/progs: disable cgo tests that use C.Stdout on Solaris
2230e9d misc/cgo: add various solaris build lines
649c7b6 net: add cgo support for Solaris
24396da os/user: small fixes for Solaris
121489c runtime/cgo: add cgo support for solaris/amd64
83b25d9 cmd/ld: make .rela and .rela.plt sections contiguous
c94f1f7 runtime: always load address of libcFunc on Solaris
e481aac cmd/6l: use .plt instead of .got on Solaris

See bug for clarification.

Fixes #12452

Change-Id: I0aeb1b46c0c7d09c5c736e383ecf40240d2cf85f
Reviewed-on: https://go-review.googlesource.com/14380
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/14393
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-09-08 22:51:15 +00:00
Chris Broadfoot
878aef8bf9 Revert "[release-branch.go1.5] runtime: check that stack barrier unwind is in sync"
This reverts commit f265044a48.

Change-Id: I454f9da3a40d6724ab106aae904b8e77756aae99
Reviewed-on: https://go-review.googlesource.com/14383
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-09-08 22:38:42 +00:00
Austin Clements
f265044a48 [release-branch.go1.5] runtime: check that stack barrier unwind is in sync
Currently the stack barrier stub blindly unwinds the next stack
barrier from the G's stack barrier array without checking that it's
the right stack barrier. If through some bug the stack barrier array
position gets out of sync with where we actually are on the stack,
this could return to the wrong PC, which would lead to difficult to
debug crashes. To address this, this commit adds a check to the amd64
stack barrier stub that it's unwinding the correct stack barrier.

Updates #12238.

Change-Id: If824d95191d07e2512dc5dba0d9978cfd9f54e02
Reviewed-on: https://go-review.googlesource.com/13948
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14241
Reviewed-by: Austin Clements <austin@google.com>
2015-09-08 18:02:06 +00:00
Brad Fitzpatrick
c0dd201113 [release-branch.go1.5] net/http/httputil: permit nil request body in ReverseProxy
Accepting a request with a nil body was never explicitly supported but
happened to work in the past.

This doesn't happen in most cases because usually people pass
a Server's incoming Request to the ReverseProxy's ServeHTTP method,
and incoming server requests are guaranteed to have non-nil bodies.

Still, it's a regression, so fix.

Fixes #12344

Change-Id: Id9a5a47aea3f2875d195b66c9a5f8581c4ca2aed
Reviewed-on: https://go-review.googlesource.com/13935
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/14245
2015-09-08 18:01:50 +00:00
Russ Cox
a7e30ce931 [release-branch.go1.5] net: restore LookupPort for integer strings
This worked in Go 1.4 but was lost in the "pure Go" lookup
routines substituted late in the Go 1.5 cycle.

Fixes #12263.

Change-Id: I77ec9d97cd8e67ace99d6ac965e5bc16c151ba83
Reviewed-on: https://go-review.googlesource.com/13915
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/14243
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-08 18:01:47 +00:00
Vincent Vanackere
1d11801f40 [release-branch.go1.5] cmd/go: properly ignore import comments for vendored packages rooted at GOPATH
Fixes #12232.

Change-Id: Ide3fb7f5fc5ae377ae8683fbb94fd0dc01480549
Reviewed-on: https://go-review.googlesource.com/13924
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14228
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-08 18:01:43 +00:00
Ulrich Kunitz
0507802396 [release-branch.go1.5] cmd/compile: fix register allocation for == operator
The issue 12226 has been caused by the allocation of the same register
for the equality check of two byte values. The code in cgen.go freed the
register for the second operand before the allocation of the register
for the first operand.

Fixes #12226

Change-Id: Ie4dc33a488bd48a17f8ae9b497fd63c1ae390555
Reviewed-on: https://go-review.googlesource.com/13771
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14227
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-09-08 18:01:39 +00:00
Austin Clements
23ef1e1933 [release-branch.go1.5] runtime: don't install a stack barrier in cgocallback_gofunc's frame
Currently the runtime can install stack barriers in any frame.
However, the frame of cgocallback_gofunc is special: it's the one
function that switches from a regular G stack to the system stack on
return. Hence, the return PC slot in its frame on the G stack is
actually used to save getg().sched.pc (so tracebacks appear to unwind
to the last Go function running on that G), and not as an actual
return PC for cgocallback_gofunc.

Because of this, if we install a stack barrier in cgocallback_gofunc's
return PC slot, when cgocallback_gofunc does return, it will move the
stack barrier stub PC in to getg().sched.pc and switch back to the
system stack. The rest of the runtime doesn't know how to deal with a
stack barrier stub in sched.pc: nothing knows how to match it up with
the G's stack barrier array and, when the runtime removes stack
barriers, it doesn't know to undo the one in sched.pc. Hence, if the C
code later returns back in to Go code, it will attempt to return
through the stack barrier saved in sched.pc, which may no longer have
correct unwinding information.

Fix this by blacklisting cgocallback_gofunc's frame so the runtime
won't install a stack barrier in it's return PC slot.

Fixes #12238.

Change-Id: I46aa2155df2fd050dd50de3434b62987dc4947b8
Reviewed-on: https://go-review.googlesource.com/13944
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14229
Reviewed-by: Austin Clements <austin@google.com>
2015-09-08 06:04:48 +00:00
Austin Clements
f7d7403776 [release-branch.go1.5] runtime: add GODEBUG for stack barriers at every frame
Currently enabling the debugging mode where stack barriers are
installed at every frame requires recompiling the runtime. However,
this is potentially useful for field debugging and for runtime tests,
so make this mode a GODEBUG.

Updates #12238.

Change-Id: I6fb128f598b19568ae723a612e099c0ed96917f5
Reviewed-on: https://go-review.googlesource.com/13947
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14240
Reviewed-by: Austin Clements <austin@google.com>
2015-09-08 06:04:42 +00:00
Austin Clements
e4e59921f1 [release-branch.go1.5] cmd/compile: fix uninitialized memory in compare of interface value
A comparison of the form l == r where l is an interface and r is
concrete performs a type assertion on l to convert it to r's type.
However, the compiler fails to zero the temporary where the result of
the type assertion is written, so if the type is a pointer type and a
stack scan occurs while in the type assertion, it may see an invalid
pointer on the stack.

Fix this by zeroing the temporary. This is equivalent to the fix for
type switches from c4092ac.

Fixes #12253.

Change-Id: Iaf205d456b856c056b317b4e888ce892f0c555b9
Reviewed-on: https://go-review.googlesource.com/13872
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14242
Reviewed-by: Austin Clements <austin@google.com>
2015-09-08 06:04:05 +00:00
Alex Brainman
13d03fae63 [release-branch.go1.5] internal/syscall/windows/registry: remove debugging dreg
Change-Id: I1b9f6ad322a7f68fa160c4f09d7fb56815e505a7
Reviewed-on: https://go-review.googlesource.com/13828
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-on: https://go-review.googlesource.com/14244
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-09-08 05:41:43 +00:00
Didier Spezia
97ec0a816b [release-branch.go1.5] cmd/asm: fix potential infinite loop in parser
For ARM machines, the assembler supports list of registers
operands such as [R1,R2].

A list missing a ']' results in the parser issuing many errors
and consuming all the tokens. At EOF (i.e. end of the line),
it still loops.

Normally, a counter is maintained to make sure the parser
stops after 10 errors. However, multiple errors occuring on the
same line are simply ignored. Only the first one is reported.
At most one error per line is accounted.

Missing ']' in a register list therefore results in an
infinite loop.

Fixed the parser by explicitly checking for ']' to interrupt
this loops

In the operand tests, also fixed a wrong entry which I think was
not set on purpose (but still led to a successful result).

Fixes #11764

Change-Id: Ie87773388ee0d21b3a2a4cb941d4d911d0230ba4
Reviewed-on: https://go-review.googlesource.com/13920
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-on: https://go-review.googlesource.com/14225
2015-09-08 05:41:28 +00:00
Ian Lance Taylor
2dfb0eb6c2 [release-branch.go1.5] cmd/go: -a does apply to the standard library
This changed in https://golang.org/cl/10761.

Update #12203.

Change-Id: Ia37ebb7ecba689ad3cb2559213d675f21cf03a95
Reviewed-on: https://go-review.googlesource.com/13799
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14226
Reviewed-by: Minux Ma <minux@golang.org>
2015-09-08 01:52:06 +00:00
Shenghou Ma
d4f1309372 cmd/link/internal/ld: align PE .text section to 32-byte when external linking
Some symbols, for example, masks requires 16-byte alignment, and
they are placed in the text section. Before this change, the text
section is only aligned to 4-byte, and it's making masks unaligned.

Fixes #12415.

Change-Id: I7767778d1b4f7d3e74c2719a02848350782a4160
Reviewed-on: https://go-review.googlesource.com/14166
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 821e124c24)
Reviewed-on: https://go-review.googlesource.com/14279
2015-09-06 01:14:18 +00:00
Dave Cheney
c20b8e145a [release-branch.go1.5] build: Fix bootstrap.bash for official source tarballs
At the moment, bootstrap.bash assumes it is called from a git working
copy. Hence, it fails to complete when running in an unpacked official
source tarball where .git and .gitignore do not exist. This fix adds a
test for existence for .git and a -f switch for the removal of
.gitignore.

Fixes #12223

Change-Id: I7f305b83b38d5115504932bd38dadb7bdeb5d487
Reviewed-on: https://go-review.googlesource.com/13770
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14281
2015-09-04 02:10:56 +00:00
Shenghou Ma
5aa3ba8673 [release-branch.go1.5] net: add -lsendfile to cgo LDFLAGS for solaris
Fixes external linking of net/http tests (or anything that uses
sendfile).

Fixes #12390.

Change-Id: Iee08998cf66e7b0ce851db138a00ebae6dc2395e
Reviewed-on: https://go-review.googlesource.com/14072
Reviewed-by: Dave Cheney <dave@cheney.net>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-on: https://go-review.googlesource.com/14246
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
2015-09-03 08:53:27 +00:00
Andrew Gerrand
a1350a1f7b [release-branch.go1.5] doc: add Go Security Policy document
Bring in the text from the proposal (with minor edits):
https://github.com/golang/proposal/blob/master/design/11502-securitypolicy.md

Fixes #11502

Change-Id: I92a987be66a0df60c1fad6c6c79f89bd8e9c12a8
Reviewed-on: https://go-review.googlesource.com/13955
Reviewed-by: Jason Buberel <jbuberel@google.com>
Reviewed-on: https://go-review.googlesource.com/14224
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-03 03:17:16 +00:00
Andrew Gerrand
00dbc5a548 [release-branch.go1.5] doc: only show Share button when enabled
Change-Id: I571965bc38a8b1060642a942b898797327f0c19c
Reviewed-on: https://go-review.googlesource.com/14195
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-on: https://go-review.googlesource.com/14199
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-09-03 03:02:53 +00:00
Russ Cox
bb03defe93 [release-branch.go1.5] go1.5
This updates the VERSION file.
The release proper has not happened yet.

Change-Id: I3e33b5f95aede0da8ca1aef0d9c381942873c9a8
Reviewed-on: https://go-review.googlesource.com/13702
Reviewed-by: Rob Pike <r@golang.org>
2015-08-19 05:04:37 +00:00
Russ Cox
a30edb8071 [release-branch.go1.5] release: merge master branch into release-branch.go1.5.
Using merge instead of cherry-picks to simplify initial release.
Minor releases like Go 1.5.1 will have to use cherry-picks.

Fixes #12093.

Change-Id: If00393c58ace0da6f359b387cea9b779b123b920
2015-08-19 00:39:48 -04:00
Andrew Gerrand
0d20a61e68 [release-branch.go1.5] cmd/newlink: remove from release branch
Change-Id: Iad86bde6f2e0482745a4000ec4e192ade352983b
Reviewed-on: https://go-review.googlesource.com/13292
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-08-06 04:06:12 +00:00
Andrew Gerrand
e7f6a244a2 [release-branch.go1.5] go1.5rc1
Change-Id: Ibf98802b45cd22f20f8f3605bb695e9744b7a6b2
Reviewed-on: https://go-review.googlesource.com/13290
Reviewed-by: Russ Cox <rsc@golang.org>
2015-08-06 03:32:40 +00:00
4622 changed files with 159678 additions and 617470 deletions

View File

@@ -1,20 +0,0 @@
Please answer these questions before submitting your issue. Thanks!
### What version of Go are you using (`go version`)?
### What operating system and processor architecture are you using (`go env`)?
### What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
### What did you expect to see?
### What did you see instead?

View File

@@ -1,7 +0,0 @@
Please do not send pull requests to the golang/* repositories.
We do, however, take contributions gladly.
See https://golang.org/doc/contribute.html
Thanks!

47
.gitignore vendored
View File

@@ -18,28 +18,27 @@ _cgo_*
_obj
_test
_testmain.go
build.out
test.out
doc/articles/wiki/*.bin
misc/cgo/life/run.out
misc/cgo/stdio/run.out
misc/cgo/testso/main
src/cmd/**/y.output
src/cmd/cgo/zdefaultcc.go
src/cmd/go/zdefaultcc.go
src/cmd/internal/obj/zbootstrap.go
src/go/doc/headscan
src/runtime/zversion.go
src/unicode/maketables
src/*.*/
test/pass.out
test/run.out
test/times.out
test/garbage/*.out
goinstall.log
last-change
VERSION.cache
/VERSION.cache
/bin/
/build.out
/doc/articles/wiki/*.bin
/goinstall.log
/last-change
/misc/cgo/life/run.out
/misc/cgo/stdio/run.out
/misc/cgo/testso/main
/pkg/
/src/*.*/
/src/cmd/cgo/zdefaultcc.go
/src/cmd/go/zdefaultcc.go
/src/cmd/go/zosarch.go
/src/cmd/internal/obj/zbootstrap.go
/src/go/build/zcgo.go
/src/go/doc/headscan
/src/runtime/internal/sys/zversion.go
/src/unicode/maketables
/test.out
/test/garbage/*.out
/test/pass.out
/test/run.out
/test/times.out
bin/
pkg/

344
AUTHORS
View File

@@ -2,86 +2,55 @@
# This file is distinct from the CONTRIBUTORS files.
# See the latter for an explanation.
# Names should be added to this file as one of
# Organization's name
# Individual's name <submission email address>
# Individual's name <submission email address> <email2> <emailN>
# See CONTRIBUTORS for the meaning of multiple email addresses.
# Names should be added to this file as
# Name or Organization <email address>
# The email address is not required for organizations.
# Please keep the list sorted.
A Medium Corporation
Aamir Khan <syst3m.w0rm@gmail.com>
Aaron France <aaron.l.france@gmail.com>
Aaron Torres <tcboox@gmail.com>
Abe Haskins <abeisgreat@abeisgreat.com>
Abhinav Gupta <abhinav.g90@gmail.com>
Adrian Nos <nos.adrian@gmail.com>
Adrian O'Grady <elpollouk@gmail.com>
Adrien Bustany <adrien-xx-google@bustany.org>
Aécio Júnior <aeciodantasjunior@gmail.com>
Ahmed Waheed Moanes <oneofone@gmail.com>
Ahmy Yulrizka <yulrizka@gmail.com>
Aiden Scandella <ai@uber.com>
Ainar Garipov <gugl.zadolbal@gmail.com>
Akihiro Suda <suda.kyoto@gmail.com>
Akshat Kumar <seed@mail.nanosouffle.net>
Alan Shreve <alan@inconshreveable.com>
Albert Nigmatzianov <albertnigma@gmail.com>
Albert Strasheim <fullung@gmail.com>
Albert Yu <yukinying@gmail.com>
Alberto Bertogli <albertito@blitiri.com.ar>
Alberto Donizetti <alb.donizetti@gmail.com>
Alberto García Hierro <alberto@garciahierro.com> <alberto.garcia.hierro@gmail.com>
Aleksandar Dezelin <dezelin@gmail.com>
Alessandro Arzilli <alessandro.arzilli@gmail.com>
Alessandro Baffa <alessandro.baffa@gmail.com>
Alex A Skinner <alex@lx.lc>
Alex Brainman <alex.brainman@gmail.com>
Alex Browne <stephenalexbrowne@gmail.com>
Alex Carol <alex.carol.c@gmail.com>
Alex Jin <toalexjin@gmail.com>
Alex Plugaru <alex@plugaru.org> <alexandru.plugaru@gmail.com>
Alex Schroeder <alex@gnu.org>
Alex Sergeyev <abc@alexsergeyev.com>
Alexander Demakin <alexander.demakin@gmail.com>
Alexander Döring <email@alexd.ch>
Alexander Larsson <alexander.larsson@gmail.com>
Alexander Menzhinsky <amenzhinsky@gmail.com>
Alexander Morozov <lk4d4math@gmail.com>
Alexander Neumann <alexander@bumpern.de>
Alexander Orlov <alexander.orlov@loxal.net>
Alexander Reece <awreece@gmail.com>
Alexander Surma <surma@surmair.de>
Alexander Zhavnerchik <alex.vizor@gmail.com>
Alexander Zolotov <goldifit@gmail.com>
Alexandre Cesaro <alexandre.cesaro@gmail.com>
Alexandre Fiori <fiorix@gmail.com>
Alexandre Normand <alexandre.normand@gmail.com>
Alexei Sholik <alcosholik@gmail.com>
Alexey Borzenkov <snaury@gmail.com>
Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
Aliaksandr Valialkin <valyala@gmail.com>
Alif Rachmawadi <subosito@gmail.com>
Allan Simon <allan.simon@supinfo.com>
Alok Menghrajani <alok.menghrajani@gmail.com>
Amazon.com, Inc
Amir Mohammad Saied <amir@gluegadget.com>
Amrut Joshi <amrut.joshi@gmail.com>
Andre Nathan <andrenth@gmail.com>
Andreas Auernhammer <aead@mail.de>
Andreas Litt <andreas.litt@gmail.com>
Andrei Korzhevskii <a.korzhevskiy@gmail.com>
Andrei Vieru <euvieru@gmail.com>
Andrew Austin <andrewaclt@gmail.com>
Andrew Balholm <andybalholm@gmail.com>
Andrew Bonventre <andybons@chromium.org>
Andrew Bursavich <abursavich@gmail.com>
Andrew Ekstedt <andrew.ekstedt@gmail.com>
Andrew Etter <andrew.etter@gmail.com>
Andrew Harding <andrew@spacemonkey.com>
Andrew Lutomirski <andy@luto.us>
Andrew Pogrebnoy <absourd.noise@gmail.com>
Andrew Pritchard <awpritchard@gmail.com>
Andrew Radev <andrey.radev@gmail.com>
Andrew Skiba <skibaa@gmail.com>
@@ -91,43 +60,26 @@ Andrew Williams <williams.andrew@gmail.com>
Andrey Mirtchovski <mirtchovski@gmail.com>
Andrey Petrov <andrey.petrov@shazow.net>
Andriy Lytvynov <lytvynov.a.v@gmail.com>
Andy Balholm <andy@balholm.com>
Andy Davis <andy@bigandian.com>
Andy Finkenstadt <afinkenstadt@zynga.com>
Andy Maloney <asmaloney@gmail.com>
Anfernee Yongkun Gui <anfernee.gui@gmail.com>
Angelo Bulfone <mbulfone@gmail.com>
Anh Hai Trinh <anh.hai.trinh@gmail.com>
Anmol Sethi <anmol@aubble.com>
Anschel Schaffer-Cohen <anschelsc@gmail.com>
Anthony Canino <anthony.canino1@gmail.com>
Anthony Eufemio <anthony.eufemio@gmail.com>
Anthony Martin <ality@pbrane.org>
Anthony Starks <ajstarks@gmail.com>
Anthony Woods <awoods@raintank.io>
Antonio Bibiano <antbbn@gmail.com>
Apisak Darakananda <pongad@gmail.com>
Aram Hăvărneanu <aram@mgk.ro>
Areski Belaid <areski@gmail.com>
Arlo Breault <arlolra@gmail.com>
ARM Ltd.
Arnaud Ysmal <arnaud.ysmal@gmail.com>
Arne Hormann <arnehormann@gmail.com>
Arnout Engelen <arnout@bzzt.net>
Aron Nopanen <aron.nopanen@gmail.com>
Artyom Pervukhin <artyom.pervukhin@gmail.com>
Arvindh Rajesh Tamilmani <art@a-30.net>
Atin Malaviya <amalaviy@akamai.com>
Ato Araki <ato.araki@gmail.com>
Audrey Lim <audreylh@gmail.com>
Augusto Roman <aroman@gmail.com>
Aulus Egnatius Varialus <varialus@gmail.com>
awaw fumin <awawfumin@gmail.com>
Ayanamist Yang <ayanamist@gmail.com>
Aymerick Jéhanne <aymerick@jehanne.org>
Baiju Muthukadan <baiju.m.mail@gmail.com>
Ben Burkert <ben@benburkert.com>
Ben Lubar <ben.lubar@gmail.com>
Ben Olive <sionide21@gmail.com>
Benjamin Black <b@b3k.us>
Benny Siegert <bsiegert@gmail.com>
@@ -138,25 +90,18 @@ Bjorn Tillenius <bjorn@tillenius.me>
Bjorn Tipling <bjorn.tipling@gmail.com>
Blake Gentry <blakesgentry@gmail.com>
Blake Mizerany <blake.mizerany@gmail.com>
Blixt <me@blixt.nyc>
Bobby Powers <bobbypowers@gmail.com>
Bolt
Brady Catherman <brady@gmail.com>
Brady Sullivan <brady@bsull.com>
Brendan Daniel Tracey <tracey.brendan@gmail.com>
Brett Cannon <bcannon@gmail.com>
Brian Dellisanti <briandellisanti@gmail.com>
Brian G. Merrell <bgmerrell@gmail.com>
Brian Gitonga Marete <marete@toshnix.com> <bgmarete@gmail.com>
Brian Kennedy <btkennedy@gmail.com>
Brian Ketelsen <bketelsen@gmail.com>
Brian Smith <ohohvi@gmail.com>
Bryan Alexander <Kozical@msn.com>
Bryan Ford <brynosaurus@gmail.com>
Caine Tighe <arctanofyourface@gmail.com>
Caleb Spare <cespare@gmail.com>
Carl Chatfield <carlchatfield@gmail.com>
Carl Johnson <me@carlmjohnson.net>
Carlos Castillo <cookieo9@gmail.com>
Carlos Cirello <uldericofilho@gmail.com>
Case Nelson <case.nelson@gmail.com>
@@ -167,164 +112,107 @@ Charles L. Dorian <cldorian@gmail.com>
Charles Lee <zombie.fml@gmail.com>
Chris Dollin <ehog.hedge@gmail.com>
Chris Farmiloe <chrisfarms@gmail.com>
Chris Hines <chris.cs.guy@gmail.com>
Chris Howey <howeyc@gmail.com>
Chris Jones <chris@cjones.org>
Chris Kastorff <encryptio@gmail.com>
Chris Lennert <calennert@gmail.com>
Chris McGee <sirnewton_01@yahoo.ca> <newton688@gmail.com>
Chris Stockton <chrisstocktonaz@gmail.com>
Christian Couder <chriscool@tuxfamily.org>
Christian Himpel <chressie@googlemail.com>
Christine Hansmann <chhansmann@gmail.com>
Christoffer Buchholz <christoffer.buchholz@gmail.com>
Christoph Hack <christoph@tux21b.org>
Christopher Cahoon <chris.cahoon@gmail.com>
Christopher Guiney <chris@guiney.net>
Christopher Nelson <nadiasvertex@gmail.com>
Christopher Nielsen <m4dh4tt3r@gmail.com>
Christopher Redden <christopher.redden@gmail.com>
Christopher Wedgwood <cw@f00f.org>
CL Sung <clsung@gmail.com> <cl_sung@htc.com>
Clement Skau <clementskau@gmail.com>
CloudFlare Inc.
Colin Edwards <colin@recursivepenguin.com>
Colin Kennedy <moshen.colin@gmail.com>
Conrad Irwin <conrad.irwin@gmail.com>
Conrad Meyer <cemeyer@cs.washington.edu>
CoreOS, Inc.
Corey Thomasson <cthom.lists@gmail.com>
Cristian Staretu <unclejacksons@gmail.com>
Currant
Cyrill Schumacher <cyrill@schumacher.fm>
Damian Gryski <dgryski@gmail.com>
Dan Caddigan <goldcaddy77@gmail.com>
Dan Callahan <dan.callahan@gmail.com>
Dan Peterson <dpiddy@gmail.com>
Dan Sinclair <dan.sinclair@gmail.com>
Daniel Fleischman <danielfleischman@gmail.com>
Daniel Johansson <dajo2002@gmail.com>
Daniel Kerwin <d.kerwin@gini.net>
Daniel Krech <eikeon@eikeon.com>
Daniel Lidén <daniel.liden.87@gmail.com>
Daniel Martí <mvdan@mvdan.cc>
Daniel Morsing <daniel.morsing@gmail.com>
Daniel Ortiz Pereira da Silva <daniel.particular@gmail.com>
Daniel Skinner <daniel@dasa.cc>
Daniel Speichert <daniel@speichert.pl>
Daniel Theophanes <kardianos@gmail.com>
Darren Elwood <darren@textnode.com>
Datong Sun <dndx@idndx.com>
Dave Cheney <dave@cheney.net>
David Brophy <dave@brophy.uk>
David Bürgin <676c7473@gmail.com>
David Calavera <david.calavera@gmail.com>
David du Colombier <0intro@gmail.com>
David Forsythe <dforsythe@gmail.com>
David G. Andersen <dave.andersen@gmail.com>
David Howden <dhowden@gmail.com>
David Jakob Fritz <david.jakob.fritz@gmail.com>
David Leon Gil <coruus@gmail.com>
David R. Jenni <david.r.jenni@gmail.com>
David Sansome <me@davidsansome.com>
David Stainton <dstainton415@gmail.com>
David Thomas <davidthomas426@gmail.com>
David Titarenco <david.titarenco@gmail.com>
Davies Liu <davies.liu@gmail.com>
Dean Prichard <dean.prichard@gmail.com>
Deepak Jois <deepak.jois@gmail.com>
Denis Bernard <db047h@gmail.com>
Denis Brandolini <denis.brandolini@gmail.com>
Denys Honsiorovskyi <honsiorovskyi@gmail.com>
Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Parker <parkerderek86@gmail.com>
Derek Shockey <derek.shockey@gmail.com>
Develer SRL
Devon H. O'Dell <devon.odell@gmail.com>
Dhaivat Pandit <dhaivatpandit@gmail.com>
Dhiru Kholia <dhiru.kholia@gmail.com>
Didier Spezia <didier.06@gmail.com>
Dimitri Tcaciuc <dtcaciuc@gmail.com>
Dirk Gadsden <dirk@esherido.com>
Diwaker Gupta <diwakergupta@gmail.com>
Dmitri Popov <operator@cv.dp-net.com>
Dmitri Shuralyov <shurcooL@gmail.com>
Dmitriy Dudkin <dudkin.dmitriy@gmail.com>
Dmitriy Shelenin <deemok@googlemail.com> <deemok@gmail.com>
Dmitry Chestnykh <dchest@gmail.com>
Dmitry Savintsev <dsavints@gmail.com>
Dmitry Yakunin <nonamezeil@gmail.com>
Dominik Honnef <dominik.honnef@gmail.com>
Donald Huang <don.hcd@gmail.com>
Donovan Hide <donovanhide@gmail.com>
Dropbox, Inc.
Duncan Holm <mail@frou.org>
Dustin Herbison <djherbis@gmail.com>
Dustin Sallings <dsallings@gmail.com>
Dustin Shields-Cloues <dcloues@gmail.com>
Dvir Volk <dvir@everything.me> <dvirsky@gmail.com>
Eden Li <eden.li@gmail.com>
Edward Muller <edwardam@interlix.com>
Egon Elbre <egonelbre@gmail.com>
Ehren Kret <ehren.kret@gmail.com>
Eivind Uggedal <eivind@uggedal.com>
Elias Naur <elias.naur@gmail.com>
Elliot Morrison-Reed <elliotmr@gmail.com>
Emil Hessman <c.emil.hessman@gmail.com> <emil@hessman.se>
Emmanuel Odeke <emm.odeke@gmail.com> <odeke@ualberta.ca>
Empirical Interfaces Inc.
Eoghan Sherry <ejsherry@gmail.com>
Eric Clark <zerohp@gmail.com>
Eric Engestrom <eric@engestrom.ch>
Eric Lagergren <ericscottlagergren@gmail.com>
Eric Milliken <emilliken@gmail.com>
Eric Roshan-Eisner <eric.d.eisner@gmail.com>
Erik Aigner <aigner.erik@gmail.com>
Erik Dubbelboer <erik@dubbelboer.com>
Erik St. Martin <alakriti@gmail.com>
Erik Westrup <erik.westrup@gmail.com>
Ernest Chiang <ernest_chiang@htc.com>
Esko Luontola <esko.luontola@gmail.com>
Euan Kemp <euank@euank.com>
Evan Phoenix <evan@phx.io>
Evan Shaw <chickencha@gmail.com>
Ewan Chou <coocood@gmail.com>
Fabian Wickborn <fabian@wickborn.net>
Fabrizio Milo <mistobaan@gmail.com>
Faiyaz Ahmed <ahmedf@vmware.com>
Fan Hongjian <fan.howard@gmail.com>
Fastly, Inc.
Fatih Arslan <fatih@arslan.io>
Fazlul Shahriar <fshahriar@gmail.com>
Fedor Indutny <fedor@indutny.com>
Felix Geisendörfer <haimuiba@gmail.com>
Filippo Valsorda <hi@filippo.io>
Firmansyah Adiputra <frm.adiputra@gmail.com>
Florian Uekermann <florian@uekermann-online.de>
Florian Weimer <fw@deneb.enyo.de>
Florin Patan <florinpatan@gmail.com>
Ford Hurley <ford.hurley@gmail.com>
Francisco Claude <fclaude@recoded.cl>
Francisco Souza <franciscossouza@gmail.com>
Frederick Kelly Mayle III <frederickmayle@gmail.com>
Fredrik Enestad <fredrik.enestad@soundtrackyourbrand.com>
Frithjof Schulze <schulze@math.uni-hannover.de> <sfrithjof@gmail.com>
Frits van Bommel <fvbommel@gmail.com>
Gabriel Aszalos <gabriel.aszalos@gmail.com>
Gabriel Russell <gabriel.russell@gmail.com>
Gareth Paul Jones <gpj@foursquare.com>
Gary Burd <gary@beagledreams.com>
Gaurish Sharma <contact@gaurishsharma.com>
Gautham Thambidorai <gautham.dorai@gmail.com>
Geert-Johan Riemer <gjr19912@gmail.com>
Geoffroy Lorieux <lorieux.g@gmail.com>
Georg Reinke <guelfey@gmail.com>
George Shammas <george@shamm.as> <georgyo@gmail.com>
Gerasimos Dimitriadis <gedimitr@gmail.com>
Gideon Jan-Wessel Redelinghuys <gjredelinghuys@gmail.com>
Giles Lean <giles.lean@pobox.com>
Giulio Iotti <dullgiulio@gmail.com>
Gleb Stepanov <glebstepanov1992@gmail.com>
Google Inc.
Gordon Klaus <gordon.klaus@gmail.com>
Graham King <graham4king@gmail.com>
@@ -335,59 +223,36 @@ Guobiao Mei <meiguobiao@gmail.com>
Gustav Paul <gustav.paul@gmail.com>
Gustavo Niemeyer <gustavo@niemeyer.net>
Gwenael Treguier <gwenn.kahz@gmail.com>
Gyu-Ho Lee <gyuhox@gmail.com>
H. İbrahim Güngör <igungor@gmail.com>
Hajime Hoshi <hajimehoshi@gmail.com>
Hari haran <hariharan.uno@gmail.com>
Hariharan Srinath <srinathh@gmail.com>
Harley Laue <losinggeneration@gmail.com>
Harry Moreno <morenoh149@gmail.com>
Harshavardhana <hrshvardhana@gmail.com>
Håvard Haugen <havard.haugen@gmail.com>
Hector Chu <hectorchu@gmail.com>
Hector Martin Cantero <hector@marcansoft.com>
Henning Schmiedehausen <henning@schmiedehausen.org>
Henrik Edwards <henrik.edwards@gmail.com>
Henrik Hodne <henrik@hodne.io>
Herbert Georg Fischer <herbert.fischer@gmail.com>
Hironao OTSUBO <motemen@gmail.com>
Hiroshi Ioka <hirochachacha@gmail.com>
Hitoshi Mitake <mitake.hitoshi@gmail.com>
Holden Huang <ttyh061@gmail.com>
Hong Ruiqi <hongruiqi@gmail.com>
Hsin-Ho Yeh <yhh92u@gmail.com>
Hu Keping <hukeping@huawei.com>
Ian Gudger <ian@loosescre.ws>
IBM
Icarus Sparry <golang@icarus.freeuk.com>
Idora Shinatose <idora.shinatose@gmail.com>
Igneous Systems, Inc.
Igor Dolzhikov <bluesriverz@gmail.com>
INADA Naoki <songofacandy@gmail.com>
Ingo Krabbe <ikrabbe.ask@gmail.com>
Ingo Oeser <nightlyone@googlemail.com>
Intel Corporation
Irieda Noboru <irieda@gmail.com>
Isaac Wagner <ibw@isaacwagner.me>
Ivan Babrou <ivan@cloudflare.com>
Ivan Ukhov <ivan.ukhov@gmail.com>
Jacob Hoffman-Andrews <github@hoffman-andrews.com>
Jae Kwon <jae@tendermint.com>
Jakob Borg <jakob@nym.se>
Jakub Ryszard Czarnowicz <j.czarnowicz@gmail.com>
James Bardin <j.bardin@gmail.com>
James Clarke <jrtc27@jrtc27.com>
James David Chalfant <james.chalfant@gmail.com>
James Fysh <james.fysh@gmail.com>
James Gray <james@james4k.com>
James Meneghello <rawrz0r@gmail.com>
James P. Cooper <jamespcooper@gmail.com>
James Schofield <james@shoeboxapp.com>
James Sweet <james.sweet88@googlemail.com>
James Toy <nil@opensesame.st>
James Whitehead <jnwhiteh@gmail.com>
Jamie Beverly <jamie.r.beverly@gmail.com>
Jamil Djadala <djadala@gmail.com>
Jan H. Hosang <jan.hosang@gmail.com>
Jan Mercl <0xjnml@gmail.com>
Jan Mercl <befelemepeseveze@gmail.com>
@@ -395,133 +260,80 @@ Jan Newmarch <jan.newmarch@gmail.com>
Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
Jani Monoses <jani.monoses@ubuntu.com>
Jaroslavas Počepko <jp@webmaster.ms>
Jason Barnett <jason.w.barnett@gmail.com>
Jason Del Ponte <delpontej@gmail.com>
Jason Smale <jsmale@zendesk.com>
Jason Travis <infomaniac7@gmail.com>
Jay Weisskopf <jay@jayschwa.net>
Jean-Nicolas Moal <jn.moal@gmail.com>
Jeff Hodges <jeff@somethingsimilar.com>
Jeff R. Allen <jra@nella.org>
Jeff Sickel <jas@corpus-callosum.com>
Jeff Wendling <jeff@spacemonkey.com>
Jens Frederich <jfrederich@gmail.com>
Jeremy Jackins <jeremyjackins@gmail.com>
Jeroen Bobbeldijk <jerbob92@gmail.com>
Jess Frazelle <me@jessfraz.com>
Jesse Szwedko <jesse.szwedko@gmail.com>
Jihyun Yu <yjh0502@gmail.com>
Jim McGrath <jimmc2@gmail.com>
Jimmy Zelinskie <jimmyzelinskie@gmail.com>
Jingcheng Zhang <diogin@gmail.com>
Jingguo Yao <yaojingguo@gmail.com>
Jiong Du <londevil@gmail.com>
Jirka Daněk <dnk@mail.muni.cz>
Joakim Sernbrant <serbaut@gmail.com>
Joe Farrell <joe2farrell@gmail.com>
Joe Harrison <joehazzers@gmail.com>
Joe Henke <joed.henke@gmail.com>
Joe Poirier <jdpoirier@gmail.com>
Joe Shaw <joe@joeshaw.org>
Joe Sylve <joe.sylve@gmail.com>
Joe Tsai <joetsai@digital-static.net>
Joel Stemmer <stemmertech@gmail.com>
Johan Sageryd <j@1616.se>
John Asmuth <jasmuth@gmail.com>
John C Barstow <jbowtie@amathaine.com>
John Graham-Cumming <jgc@jgc.org> <jgrahamc@gmail.com>
John Howard Palevich <jack.palevich@gmail.com>
John Jeffery <jjeffery@sp.com.au>
John Jenkins <twodopeshaggy@gmail.com>
John Potocny <johnp@vividcortex.com>
John Schnake <schnake.john@gmail.com>
John Shahid <jvshahid@gmail.com>
John Tuley <john@tuley.org>
Jonathan Boulle <jonathanboulle@gmail.com>
Jonathan Gold <jgold.bg@gmail.com>
Jonathan Mark <jhmark@xenops.com>
Jonathan Rudenberg <jonathan@titanous.com>
Jonathan Wills <runningwild@gmail.com>
Jongmin Kim <atomaths@gmail.com>
Joonas Kuorilehto <joneskoo@derbian.fi>
Joop Kiefte <ikojba@gmail.com> <joop@kiefte.net>
Jordan Lewis <jordanthelewis@gmail.com>
Jose Luis Vázquez González <josvazg@gmail.com>
Joseph Holsten <joseph@josephholsten.com>
Josh Bleecher Snyder <josharian@gmail.com>
Josh Chorlton <jchorlton@gmail.com>
Josh Goebel <dreamer3@gmail.com>
Josh Holland <jrh@joshh.co.uk>
Joshua Chase <jcjoshuachase@gmail.com>
Jostein Stuhaug <js@solidsystem.no>
JT Olds <jtolds@xnet5.com>
Jukka-Pekka Kekkonen <karatepekka@gmail.com>
Julian Kornberger <jk+github@digineo.de>
Julian Phillips <julian@quantumfyre.co.uk>
Julien Schmidt <google@julienschmidt.com>
Justin Nuß <nuss.justin@gmail.com>
Justyn Temme <justyntemme@gmail.com>
Kai Backman <kaib@golang.org>
Kale Blankenship <kale@lemnisys.com>
Kamil Kisiel <kamil@kamilkisiel.net> <kamil.kisiel@gmail.com>
Kang Hu <hukangustc@gmail.com>
Kato Kazuyoshi <kato.kazuyoshi@gmail.com>
Katrina Owen <katrina.owen@gmail.com>
Kaviraj Kanagaraj <kavirajkanagaraj@gmail.com>
Keegan Carruthers-Smith <keegan.csmith@gmail.com>
Kei Son <hey.calmdown@gmail.com>
Keith Ball <inflatablewoman@gmail.com>
Keith Rarick <kr@xph.us>
Kelsey Hightower <kelsey.hightower@gmail.com>
Kelvin Foo Chuan Lyi <vmirage@gmail.com>
Ken Friedenbach <kenliz@cruzio.com>
Ken Rockot <ken@oz.gs>
Ken Sedgwick <ken@bonsai.com>
Kenji Kaneda <kenji.kaneda@gmail.com>
Kenneth Shaw <kenshaw@gmail.com>
Kenny Grant <kennygrant@gmail.com>
Kevin Ballard <kevin@sb.org>
Kevin Burke <kev@inburke.com>
Kevin Kirsche <kev.kirsche@gmail.com>
Kevin Vu <kevin.m.vu@gmail.com>
Klaus Post <klauspost@gmail.com>
Konstantin Shaposhnikov <k.shaposhnikov@gmail.com>
KPCompass, Inc.
Kristopher Watts <traetox@gmail.com>
Kun Li <likunarmstrong@gmail.com>
Kyle Consalus <consalus@gmail.com>
Kyle Isom <kyle@gokyle.net>
Kyle Lemons <kyle@kylelemons.net>
L Campbell <unpantsu@gmail.com>
Lai Jiangshan <eag0628@gmail.com>
Larz Conwell <larzconwell@gmail.com>
LE Manh Cuong <cuong.manhle.vn@gmail.com>
Lee Hinman <hinman@gmail.com>
Lee Packham <lpackham@gmail.com>
Lewin Bormann <lewin.bormann@gmail.com>
Liberty Fund Inc
Linaro Limited
Lloyd Dewolf <foolswisdom@gmail.com>
Lorenzo Stoakes <lstoakes@gmail.com>
Luan Santos <cfcluan@gmail.com>
Luca Greco <luca.greco@alcacoop.it>
Lucien Stuker <lucien.stuker@gmail.com>
Lucio De Re <lucio.dere@gmail.com>
Luigi Riefolo <luigi.riefolo@gmail.com>
Luit van Drongelen <luitvd@gmail.com>
Luka Zakrajšek <tr00.g33k@gmail.com>
Luke Curley <qpingu@gmail.com>
Maksym Trykur <maksym.trykur@gmail.com>
Mal Curtis <mal@mal.co.nz>
Manfred Touron <m@42.am>
Manu S Ajith <neo@codingarena.in>
Manuel Mendez <mmendez534@gmail.com>
Marc Weistroff <marc@weistroff.net>
Marcel Edmund Franke <marcel.edmund.franke@gmail.com>
Marco Hennings <marco.hennings@freiheit.com>
Marin Bašić <marin.basic02@gmail.com>
Mark Bucciarelli <mkbucc@gmail.com>
Mark Severson <miquella@gmail.com>
Mark Theunissen <mark.theunissen@gmail.com>
Marko Juhani Silokunnas <marko.silokunnas@gmail.com>
Marko Tiikkaja <marko@joh.to>
@@ -529,43 +341,27 @@ Markover Inc. DBA Poptip
Markus Duft <markus.duft@salomon.at>
Markus Sonderegger <marraison@gmail.com>
Markus Zimmermann <zimmski@gmail.com>
Martin Bertschler <mbertschler@gmail.com>
Martin Garton <garton@gmail.com>
Martin Hamrle <martin.hamrle@gmail.com>
Martin Möhrmann <martisch@uos.de>
Martin Neubauer <m.ne@gmx.net>
Martin Olsson <martin@minimum.se>
Marvin Stenger <marvin.stenger94@gmail.com>
Mateusz Czapliński <czapkofan@gmail.com>
Mathias Beke <git@denbeke.be>
Mathias Leppich <mleppich@muhqu.de>
Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
Mats Lidell <mats.lidell@cag.se>
Matt Aimonetti <mattaimonetti@gmail.com>
Matt Bostock <matt@mattbostock.com>
Matt Drollette <matt@drollette.com>
Matt Jibson <matt.jibson@gmail.com>
Matt Joiner <anacrolix@gmail.com>
Matt Layher <mdlayher@gmail.com>
Matt Reiferson <mreiferson@gmail.com>
Matt Robenolt <matt@ydekproductions.com>
Matt T. Proud <matt.proud@gmail.com>
Matt Williams <gh@mattyw.net>
Matthew Brennan <matty.brennan@gmail.com>
Matthew Cottingham <mattcottingham@gmail.com>
Matthew Denton <mdenton@skyportsystems.com>
Matthew Holt <Matthew.Holt+git@gmail.com>
Matthew Horsnell <matthew.horsnell@gmail.com>
Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
Matthieu Olivier <olivier.matthieu@gmail.com>
Max Riveiro <kavu13@gmail.com>
Maxim Khitrov <max@mxcrypt.com>
Maxwell Krohn <themax@gmail.com>
MediaMath, Inc
Meir Fischer <meirfischer@gmail.com>
Meng Zhuo <mengzhuo1203@gmail.com>
Meteor Development Group
Mhd Sulhan <m.shulhan@gmail.com>
Micah Stetson <micah.stetson@gmail.com>
Michael Chaten <mchaten@gmail.com>
Michael Elkins <michael.elkins@gmail.com>
@@ -575,106 +371,66 @@ Michael Hoisie <hoisie@gmail.com>
Michael Käufl <golang@c.michael-kaeufl.de>
Michael Lewis <mikelikespie@gmail.com>
Michael MacInnis <Michael.P.MacInnis@gmail.com>
Michael McConville <momcconville@gmail.com>
Michael Pearson <mipearson@gmail.com>
Michael Schaller <michael@5challer.de>
Michael Stapelberg <michael@stapelberg.de>
Michael Teichgräber <mteichgraeber@gmx.de>
Michael Vetter <g.bluehut@gmail.com>
Michal Bohuslávek <mbohuslavek@gmail.com>
Michał Derkacz <ziutek@lnet.pl>
Miek Gieben <miek@miek.nl>
Miguel Mendez <stxmendez@gmail.com>
Mihai Borobocea <MihaiBorobocea@gmail.com>
Mikael Tillenius <mikti42@gmail.com>
Mike Andrews <mra@xoba.com>
Mike Appleby <mike@app.leby.org>
Mike Houston <mike@kothar.net>
Mike Rosset <mike.rosset@gmail.com>
Mikhail Gusarov <dottedmag@dottedmag.net>
Mikhail Panchenko <m@mihasya.com>
Miki Tebeka <miki.tebeka@gmail.com>
Mikio Hara <mikioh.mikioh@gmail.com>
Mikkel Krautz <mikkel@krautz.dk>
Miquel Sabaté Solà <mikisabate@gmail.com>
Miroslav Genov <mgenov@gmail.com>
Mohit Agarwal <mohit@sdf.org>
Momchil Velikov <momchil.velikov@gmail.com>
Monty Taylor <mordred@inaugust.com>
Moov Corporation
Moriyoshi Koizumi <mozo@mozo.jp>
Morten Siebuhr <sbhr@sbhr.dk>
Môshe van der Sterre <moshevds@gmail.com>
Muhammed Uluyol <uluyol0@gmail.com>
Nan Deng <monnand@gmail.com>
Nathan John Youngman <nj@nathany.com>
Nathan Otterness <otternes@cs.unc.edu>
Nathan P Finch <nate.finch@gmail.com>
Nathan VanBenschoten <nvanbenschoten@gmail.com>
Nathan Youngman <git@nathany.com>
Neelesh Chandola <neelesh.c98@gmail.com>
Netflix, Inc.
Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
ngmoco, LLC
Niall Sheridan <nsheridan@gmail.com>
Nic Day <nic.day@me.com>
Nicholas Katsaros <nick@nickkatsaros.com>
Nicholas Presta <nick@nickpresta.ca> <nick1presta@gmail.com>
Nicholas Sullivan <nicholas.sullivan@gmail.com>
Nicholas Waples <nwaples@gmail.com>
Nick Craig-Wood <nick@craig-wood.com> <nickcw@gmail.com>
Nick Leli <nicholasleli@gmail.com>
Nick Patavalis <nick.patavalis@gmail.com>
Nick Petroni <npetroni@cs.umd.edu>
Nicolas Kaiser <nikai@nikai.net>
Nicolas Owens <mischief@offblast.org>
Nicolas S. Dade <nic.dade@gmail.com>
Niels Widger <niels.widger@gmail.com>
Nigel Kerr <nigel.kerr@gmail.com>
Nik Nyby <nnyby@columbia.edu>
Niko Dziemba <niko@dziemba.com>
Nikolay Turpitko <nikolay@turpitko.com>
Noah Campbell <noahcampbell@gmail.com>
Norberto Lopes <nlopes.ml@gmail.com>
Odin Ugedal <odin@ugedal.com>
Oleg Vakheta <helginet@gmail.com>
Oleku Konko <oleku.konko@gmail.com>
Oling Cat <olingcat@gmail.com>
Oliver Hookins <ohookins@gmail.com>
Olivier Antoine <olivier.antoine@gmail.com>
Olivier Duperray <duperray.olivier@gmail.com>
Olivier Poitrey <rs@dailymotion.com>
Olivier Saingre <osaingre@gmail.com>
Oracle
Orange
Özgür Kesim <oec-go@kesim.org>
Padraig Kitterick <padraigkitterick@gmail.com>
Palm Stone Games
Paolo Giarrusso <p.giarrusso@gmail.com>
Paolo Martini <mrtnpaolo@gmail.com>
Parker Moore <parkrmoore@gmail.com>
Pascal S. de Kloe <pascal@quies.net>
Patrick Crosby <patrick@stathat.com>
Patrick Gavlin <pgavlin@gmail.com>
Patrick Higgins <patrick.allen.higgins@gmail.com>
Patrick Lee <pattyshack101@gmail.com>
Patrick Mézard <patrick@mezard.eu>
Patrick Mylund Nielsen <patrick@patrickmn.com>
Patrick Smith <pat42smith@gmail.com>
Paul A Querna <paul.querna@gmail.com>
Paul Hammond <paul@paulhammond.org>
Paul Lalonde <paul.a.lalonde@gmail.com>
Paul Meyer <paul.meyer@microsoft.com>
Paul Rosania <paul.rosania@gmail.com>
Paul Sbarra <Sbarra.Paul@gmail.com>
Paul Smith <paulsmith@pobox.com> <paulsmith@gmail.com>
Paul van Brouwershaven <paul@vanbrouwershaven.com>
Paulo Casaretto <pcasaretto@gmail.com>
Pavel Paulau <pavel.paulau@gmail.com>
Pavel Zinovkin <pavel.zinovkin@gmail.com>
Pawel Knap <pawelknap88@gmail.com>
Percy Wegmann <ox.to.a.cart@gmail.com>
Perry Abbott <perry.j.abbott@gmail.com>
Petar Maymounkov <petarm@gmail.com>
Peter Armitage <peter.armitage@gmail.com>
Peter Froehlich <peter.hans.froehlich@gmail.com>
@@ -686,101 +442,57 @@ Péter Szilágyi <peterke@gmail.com>
Peter Waldschmidt <peter@waldschmidt.com>
Peter Waller <peter.waller@gmail.com>
Peter Williams <pwil3058@gmail.com>
Philip Børgesen <philip.borgesen@gmail.com>
Philip Hofer <phofer@umich.edu>
Philip K. Warren <pkwarren@gmail.com>
Pierre Durand <pierredurand@gmail.com>
Pierre Roullon <pierre.roullon@gmail.com>
Pieter Droogendijk <pieter@binky.org.uk>
Pietro Gagliardi <pietro10@mac.com>
Prashant Varanasi <prashant@prashantv.com>
Preetam Jinka <pj@preet.am>
Quan Tran <qeed.quan@gmail.com>
Quan Yong Zhai <qyzhai@gmail.com>
Quentin Perez <qperez@ocs.online.net>
Quoc-Viet Nguyen <afelion@gmail.com>
RackTop Systems Inc.
Radu Berinde <radu@cockroachlabs.com>
Rafal Jeczalik <rjeczalik@gmail.com>
Raif S. Naffah <go@naffah-raif.name>
Rajat Goel <rajat.goel2010@gmail.com>
Ralph Corderoy <ralph@inputplus.co.uk>
Raphael Geronimi <raphael.geronimi@gmail.com>
Red Hat, Inc.
Reinaldo de Souza Jr <juniorz@gmail.com>
Rémy Oudompheng <oudomphe@phare.normalesup.org>
Ricardo Padilha <ricardospadilha@gmail.com>
Richard Barnes <rlb@ipv.sx>
Richard Crowley <r@rcrowley.org>
Richard Eric Gavaletz <gavaletz@gmail.com>
Richard Gibson <richard.gibson@gmail.com>
Richard Miller <miller.research@gmail.com>
Richard Musiol <mail@richard-musiol.de>
Rick Arnold <rickarnoldjr@gmail.com>
Risto Jaakko Saarelma <rsaarelm@gmail.com>
Rob Norman <rob.norman@infinitycloud.com>
Robert Daniel Kortschak <dan.kortschak@adelaide.edu.au>
Robert Dinu <r@varp.se>
Robert Figueiredo <robfig@gmail.com>
Robert Hencke <robert.hencke@gmail.com>
Robert Obryk <robryk@gmail.com>
Robert Stepanek <robert.stepanek@gmail.com>
Robin Eklind <r.eklind.87@gmail.com>
Rodrigo Moraes de Oliveira <rodrigo.moraes@gmail.com>
Rodrigo Rafael Monti Kochenburger <divoxx@gmail.com>
Roger Pau Monné <royger@gmail.com>
Roger Peppe <rogpeppe@gmail.com>
Roland Shoemaker <rolandshoemaker@gmail.com>
Ron Hashimoto <mail@h2so5.net>
Ron Minnich <rminnich@gmail.com>
Ross Light <rlight2@gmail.com>
Rowan Worth <sqweek@gmail.com>
Russell Haering <russellhaering@gmail.com>
Ryan Bagwell <ryanbagwell@outlook.com>
Ryan Hitchman <hitchmanr@gmail.com>
Ryan Lower <rpjlower@gmail.com>
Ryan Seys <ryan@ryanseys.com>
Ryan Slade <ryanslade@gmail.com>
Ryuzo Yamamoto <ryuzo.yamamoto@gmail.com>
S.Çağlar Onur <caglar@10ur.org>
Salmān Aljammāz <s@0x65.net>
Sam Hug <samuel.b.hug@gmail.com>
Sam Whited <sam@samwhited.com>
Samuele Pedroni <pedronis@lucediurna.net>
Sanjay Menakuru <balasanjay@gmail.com>
Sasha Sobol <sasha@scaledinference.com>
Scott Barron <scott.barron@github.com>
Scott Bell <scott@sctsm.com>
Scott Ferguson <scottwferg@gmail.com>
Scott Lawrence <bytbox@gmail.com>
Sean Rees <sean@erifax.org>
Sebastien Binet <seb.binet@gmail.com>
Sebastien Binet <seb.binet@gmail.com>
Sébastien Paolacci <sebastien.paolacci@gmail.com>
Sergei Skorobogatov <skorobo@rambler.ru>
Sergey 'SnakE' Gromov <snake.scaly@gmail.com>
Sergio Luis O. B. Correia <sergio@correia.cc>
Seth Hoenig <seth.a.hoenig@gmail.com>
Seth Vargo <sethvargo@gmail.com>
Shahar Kohanim <skohanim@gmail.com>
Shane Hansen <shanemhansen@gmail.com>
Shaozhen Ding <dsz0111@gmail.com>
Shawn Smith <shawn.p.smith@gmail.com>
Shenghou Ma <minux.ma@gmail.com>
Shinji Tanaka <shinji.tanaka@gmail.com>
Shivakumar GN <shivakumar.gn@gmail.com>
Silvan Jegen <s.jegen@gmail.com>
Simon Jefford <simon.jefford@gmail.com>
Simon Rawet <simon@rawet.se>
Simon Thulbourn <simon+github@thulbourn.com>
Simon Whitehead <chemnova@gmail.com>
Sina Siadat <siadat@gmail.com>
Sokolov Yura <funny.falcon@gmail.com>
Song Gao <song@gao.io>
Sourcegraph Inc
Spencer Nelson <s@spenczar.com>
Spring Mc <heresy.mc@gmail.com>
Square, Inc.
Sridhar Venkatakrishnan <sridhar@laddoo.net>
StalkR <stalkr@stalkr.net>
Stan Schwertly <stan@schwertly.com>
Stefan Nilsson <snilsson@nada.kth.se> <trolleriprofessorn@gmail.com>
@@ -788,103 +500,57 @@ Stéphane Travostino <stephane.travostino@gmail.com>
Stephen McQuay <stephen@mcquay.me>
Stephen Weinberg <stephen@q5comm.com>
Steve McCoy <mccoyst@gmail.com>
Steve Phillips <elimisteve@gmail.com>
Steve Streeting <steve@stevestreeting.com>
Steven Elliot Harris <seharris@gmail.com>
Steven Hartland <steven.hartland@multiplay.co.uk>
Stripe, Inc.
Suyash <dextrous93@gmail.com>
Sven Almgren <sven@tras.se>
Syohei YOSHIDA <syohex@gmail.com>
Szabolcs Nagy <nsz@port70.net>
Tad Glines <tad.glines@gmail.com>
Taj Khattra <taj.khattra@gmail.com>
Takeshi YAMANASHI <9.nashi@gmail.com>
Takuya Ueda <uedatakuya@gmail.com>
Tal Shprecher <tshprecher@gmail.com>
Tamir Duberstein <tamird@gmail.com>
Tarmigan Casebolt <tarmigan@gmail.com>
Taru Karttunen <taruti@taruti.net>
Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Terrel Shumway <gopher@shumway.us>
Tetsuo Kiso <tetsuokiso9@gmail.com>
Thiago Fransosi Farina <thiago.farina@gmail.com>
Thomas Alan Copeland <talan.copeland@gmail.com>
Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Thomas Desrosiers <thomasdesr@gmail.com>
Thomas Kappler <tkappler@gmail.com>
Thorben Krueger <thorben.krueger@gmail.com>
Thordur Bjornsson <thorduri@secnorth.net>
Tilman Dilo <tilman.dilo@gmail.com>
Tim Cooijmans <timcooijmans@gmail.com>
Tim Ebringer <tim.ebringer@gmail.com>
Tim Henderson <tim.tadh@gmail.com>
Timo Savola <timo.savola@gmail.com>
Timo Truyts <alkaloid.btx@gmail.com>
Timothy Studd <tim@timstudd.com>
Tobias Columbus <tobias.columbus@gmail.com>
Todd Neal <todd@tneal.org>
Tom Heng <zhm20070928@gmail.com>
Tom Linford <tomlinford@gmail.com>
Tommy Schaefer <tommy.schaefer@teecom.com>
Tor Andersson <tor.andersson@gmail.com>
Tormod Erevik Lea <tormodlea@gmail.com>
Totoro W <tw19881113@gmail.com>
Travis Cline <travis.cline@gmail.com>
Trey Lawrence <lawrence.trey@gmail.com>
Trey Tacon <ttacon@gmail.com>
Tristan Colgate <tcolgate@gmail.com>
Tristan Ooohry <ooohry@gmail.com>
Tudor Golubenco <tudor.g@gmail.com>
Tuo Shan <sturbo89@gmail.com>
Tw <tw19881113@gmail.com>
Tyler Bunnell <tylerbunnell@gmail.com>
Tyler Treat <ttreat31@gmail.com>
Ugorji Nwoke <ugorji@gmail.com>
Ulf Holm Nielsen <doktor@dyregod.dk>
Ulrich Kunitz <uli.kunitz@gmail.com>
Upthere, Inc.
Uriel Mangado <uriel@berlinblue.org>
Vadim Grek <vadimprog@gmail.com>
Vadim Vygonets <unixdj@gmail.com>
Vendasta
Vincent Ambo <tazjin@googlemail.com>
Vincent Batts <vbatts@hashbangbash.com> <vbatts@gmail.com>
Vincent Vanackere <vincent.vanackere@gmail.com>
Vinu Rajashekhar <vinutheraj@gmail.com>
Vishvananda Ishaya <vishvananda@gmail.com>
Vitor De Mario <vitordemario@gmail.com>
Vladimir Mihailenco <vladimir.webdev@gmail.com>
Vladimir Nikishenko <vova616@gmail.com>
Vladimir Stefanovic <vladimir.stefanovic@imgtec.com>
Volker Dobler <dr.volker.dobler@gmail.com>
Weaveworks
Wei Guangjing <vcc.163@gmail.com>
Willem van der Schyff <willemvds@gmail.com>
William Josephson <wjosephson@gmail.com>
William Orr <will@worrbase.com> <ay1244@gmail.com>
Wisdom Omuya <deafgoat@gmail.com>
Xia Bin <snyh@snyh.org>
Xing Xing <mikespook@gmail.com>
Xudong Zhang <felixmelon@gmail.com>
Xuyang Kang <xuyangkang@gmail.com>
Yahoo Inc.
Yann Kerhervé <yann.kerherve@gmail.com>
Yao Zhang <lunaria21@gmail.com>
Yasuharu Goto <matope.ono@gmail.com>
Yasuhiro Matsumoto <mattn.jp@gmail.com>
Yesudeep Mangalapilly <yesudeep@google.com>
Yissakhar Z. Beck <yissakhar.beck@gmail.com>
Yo-An Lin <yoanlin93@gmail.com>
Yongjian Xu <i3dmaster@gmail.com>
Yorman Arias <cixtords@gmail.com>
Yoshiyuki Kanno <nekotaroh@gmail.com> <yoshiyuki.kanno@stoic.co.jp>
Yusuke Kagiwada <block.rxckin.beats@gmail.com>
Yuusei Kuwana <kuwana@kumama.org>
Yuval Pavel Zholkover <paulzhol@gmail.com>
Zac Bergquist <zbergquist99@gmail.com>
Zemanta d.o.o.
Zev Goldstein <zev.goldstein@gmail.com>
Ziad Hatahet <hatahet@gmail.com>
Zorion Arrizabalaga <zorionk@gmail.com>
Фахриддин Балтаев <faxriddinjon@gmail.com>
申习之 <bronze1man@gmail.com>

View File

@@ -7,11 +7,6 @@ It is the work of hundreds of contributors. We appreciate your help!
## Filing issues
General questions should go to the
[golang-nuts mailing list](https://groups.google.com/group/golang-nuts) or
[other forum](https://golang.org/wiki/Questions) instead of the issue tracker.
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
When filing an issue, make sure to answer these five questions:
1. What version of Go are you using (`go version`)?
@@ -20,7 +15,8 @@ When filing an issue, make sure to answer these five questions:
4. What did you expect to see?
5. What did you see instead?
For change proposals, see [Proposing Changes To Go](https://github.com/golang/proposal/).
General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
The gophers there will answer or ask you to file an issue if you've tripped over a bug.
Sensitive security-related issues should be reported to [security@golang.org](mailto:security@golang.org).
@@ -30,9 +26,7 @@ Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html
before sending patches.
**We do not accept GitHub pull requests**
(we use [an instance](https://go-review.googlesource.com/) of the
[Gerrit](https://www.gerritcodereview.com/) code review system instead).
Also, please do not post patches on the issue tracker.
(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review).
Unless otherwise noted, the Go source files are distributed under
the BSD-style license found in the LICENSE file.

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright (c) 2012 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -12,12 +12,14 @@ in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go.
There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines:
https://golang.org/doc/contribute.html
##### Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. Please ask questions on https://forum.golangbridge.org or https://groups.google.com/forum/#!forum/golang-nuts.
##### Please note that we do not use pull requests.
Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.

1
VERSION Normal file
View File

@@ -0,0 +1 @@
go1.5.4

View File

@@ -1,6 +1,6 @@
Files in this directory are data for Go's API checker ("go tool api", in src/cmd/api).
Each file is a list of API features, one per line.
Each file is a list of of API features, one per line.
go1.txt (and similarly named files) are frozen once a version has been
shipped. Each file adds new lines but does not remove any.

View File

@@ -1,107 +1,23 @@
pkg encoding/json, method (*RawMessage) MarshalJSON() ([]uint8, error)
pkg net, func ListenUnixgram(string, *UnixAddr) (*UDPConn, error)
pkg syscall (darwin-386), func Fchflags(string, int) error
pkg syscall (darwin-386-cgo), func Fchflags(string, int) error
pkg syscall (darwin-amd64), func Fchflags(string, int) error
pkg syscall (darwin-amd64-cgo), func Fchflags(string, int) error
pkg syscall (freebsd-386), func Fchflags(string, int) error
pkg syscall (freebsd-amd64), func Fchflags(string, int) error
pkg syscall (freebsd-arm), func Fchflags(string, int) error
pkg syscall (freebsd-arm-cgo), func Fchflags(string, int) error
pkg syscall (netbsd-arm), func Fchflags(string, int) error
pkg syscall (netbsd-arm-cgo), func Fchflags(string, int) error
pkg testing, func RegisterCover(Cover)
pkg text/template/parse, type DotNode bool
pkg text/template/parse, type Node interface { Copy, String, Type }
pkg os (linux-arm), const O_SYNC = 4096
pkg os (linux-arm-cgo), const O_SYNC = 4096
pkg syscall (darwin-386), const ImplementsGetwd = false
pkg syscall (darwin-386), func Fchflags(string, int) error
pkg syscall (darwin-386-cgo), const ImplementsGetwd = false
pkg syscall (darwin-386-cgo), func Fchflags(string, int) error
pkg syscall (darwin-amd64), const ImplementsGetwd = false
pkg syscall (darwin-amd64), func Fchflags(string, int) error
pkg syscall (darwin-amd64-cgo), const ImplementsGetwd = false
pkg syscall (darwin-amd64-cgo), func Fchflags(string, int) error
pkg syscall (freebsd-386), const AF_MAX = 38
pkg syscall (freebsd-386), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-386), const ELAST = 94
pkg syscall (freebsd-386), const O_CLOEXEC = 0
pkg syscall (freebsd-386), func Fchflags(string, int) error
pkg syscall (freebsd-386-cgo), const AF_MAX = 38
pkg syscall (freebsd-386-cgo), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-386-cgo), const ELAST = 94
pkg syscall (freebsd-386-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-amd64), const AF_MAX = 38
pkg syscall (freebsd-amd64), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-amd64), const ELAST = 94
pkg syscall (freebsd-amd64), const O_CLOEXEC = 0
pkg syscall (freebsd-amd64), func Fchflags(string, int) error
pkg syscall (freebsd-amd64-cgo), const AF_MAX = 38
pkg syscall (freebsd-amd64-cgo), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-amd64-cgo), const ELAST = 94
pkg syscall (freebsd-amd64-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-arm), const AF_MAX = 38
pkg syscall (freebsd-arm), const BIOCGRTIMEOUT = 1074545262
pkg syscall (freebsd-arm), const BIOCSRTIMEOUT = 2148287085
pkg syscall (freebsd-arm), const ELAST = 94
pkg syscall (freebsd-arm), const O_CLOEXEC = 0
pkg syscall (freebsd-arm), const SIOCAIFADDR = 2151967019
pkg syscall (freebsd-arm), const SIOCGIFSTATUS = 3274991931
pkg syscall (freebsd-arm), const SIOCSIFPHYADDR = 2151967046
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_GET = 537
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_LIMIT = 536
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_GET = 535
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_LIMIT = 534
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_GET = 515
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_LIMIT = 533
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SizeofBpfHdr = 24
pkg syscall (freebsd-arm), const SizeofIfData = 88
pkg syscall (freebsd-arm), const SizeofIfMsghdr = 104
pkg syscall (freebsd-arm), const SizeofSockaddrDatalink = 56
pkg syscall (freebsd-arm), const SizeofSockaddrUnix = 108
pkg syscall (freebsd-arm), const TIOCTIMESTAMP = 1074558041
pkg syscall (freebsd-arm), func Fchflags(string, int) error
pkg syscall (freebsd-arm), type BpfHdr struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type RawSockaddrDatalink struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type RawSockaddrUnix struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type Stat_t struct, Pad_cgo_0 [4]uint8
pkg syscall (freebsd-arm-cgo), const AF_MAX = 38
pkg syscall (freebsd-arm-cgo), const BIOCGRTIMEOUT = 1074545262
pkg syscall (freebsd-arm-cgo), const BIOCSRTIMEOUT = 2148287085
pkg syscall (freebsd-arm-cgo), const ELAST = 94
pkg syscall (freebsd-arm-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-arm-cgo), const SIOCAIFADDR = 2151967019
pkg syscall (freebsd-arm-cgo), const SIOCGIFSTATUS = 3274991931
pkg syscall (freebsd-arm-cgo), const SIOCSIFPHYADDR = 2151967046
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_GET = 537
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_LIMIT = 536
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_GET = 535
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_LIMIT = 534
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_GET = 515
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_LIMIT = 533
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SizeofBpfHdr = 24
pkg syscall (freebsd-arm-cgo), const SizeofIfData = 88
pkg syscall (freebsd-arm-cgo), const SizeofIfMsghdr = 104
pkg syscall (freebsd-arm-cgo), const SizeofSockaddrDatalink = 56
pkg syscall (freebsd-arm-cgo), const SizeofSockaddrUnix = 108
pkg syscall (freebsd-arm-cgo), const TIOCTIMESTAMP = 1074558041
pkg syscall (freebsd-arm-cgo), func Fchflags(string, int) error
pkg syscall (freebsd-arm-cgo), type BpfHdr struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type RawSockaddrDatalink struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type RawSockaddrUnix struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type Stat_t struct, Pad_cgo_0 [4]uint8
pkg syscall (linux-386), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (linux-386-cgo), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (linux-amd64), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (linux-amd64-cgo), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (linux-arm), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (linux-arm-cgo), type Cmsghdr struct, X__cmsg_data [0]uint8
pkg syscall (netbsd-arm), const SizeofIfData = 132
pkg syscall (netbsd-arm), func Fchflags(string, int) error
pkg syscall (netbsd-arm), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg syscall (netbsd-arm-cgo), const SizeofIfData = 132
pkg syscall (netbsd-arm-cgo), func Fchflags(string, int) error
pkg syscall (netbsd-arm-cgo), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg syscall (openbsd-386), const BIOCGRTIMEOUT = 1074283118
pkg syscall (openbsd-386), const BIOCSRTIMEOUT = 2148024941
pkg syscall (openbsd-386), const RTF_FMASK = 63496
@@ -330,15 +246,86 @@ pkg syscall (openbsd-amd64-cgo), type Statfs_t struct, F_spare [3]uint32
pkg syscall (openbsd-amd64-cgo), type Statfs_t struct, Pad_cgo_1 [4]uint8
pkg syscall (openbsd-amd64-cgo), type Timespec struct, Pad_cgo_0 [4]uint8
pkg syscall (openbsd-amd64-cgo), type Timespec struct, Sec int32
pkg testing, func RegisterCover(Cover)
pkg testing, func MainStart(func(string, string) (bool, error), []InternalTest, []InternalBenchmark, []InternalExample) *M
pkg text/template/parse, type DotNode bool
pkg text/template/parse, type Node interface { Copy, String, Type }
pkg unicode, const Version = "6.2.0"
pkg syscall (freebsd-386), const AF_MAX = 38
pkg syscall (freebsd-386), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-386), const ELAST = 94
pkg syscall (freebsd-386), const O_CLOEXEC = 0
pkg syscall (freebsd-386-cgo), const AF_MAX = 38
pkg syscall (freebsd-386-cgo), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-386-cgo), const ELAST = 94
pkg syscall (freebsd-386-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-amd64), const AF_MAX = 38
pkg syscall (freebsd-amd64), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-amd64), const ELAST = 94
pkg syscall (freebsd-amd64), const O_CLOEXEC = 0
pkg syscall (freebsd-amd64-cgo), const AF_MAX = 38
pkg syscall (freebsd-amd64-cgo), const DLT_MATCHING_MAX = 242
pkg syscall (freebsd-amd64-cgo), const ELAST = 94
pkg syscall (freebsd-amd64-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-arm), const AF_MAX = 38
pkg syscall (freebsd-arm), const BIOCGRTIMEOUT = 1074545262
pkg syscall (freebsd-arm), const BIOCSRTIMEOUT = 2148287085
pkg syscall (freebsd-arm), const ELAST = 94
pkg syscall (freebsd-arm), const O_CLOEXEC = 0
pkg syscall (freebsd-arm), const SIOCAIFADDR = 2151967019
pkg syscall (freebsd-arm), const SIOCGIFSTATUS = 3274991931
pkg syscall (freebsd-arm), const SIOCSIFPHYADDR = 2151967046
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_GET = 537
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_LIMIT = 536
pkg syscall (freebsd-arm), const SYS_CAP_FCNTLS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_GET = 535
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_LIMIT = 534
pkg syscall (freebsd-arm), const SYS_CAP_IOCTLS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_GET = 515
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_GET ideal-int
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_LIMIT = 533
pkg syscall (freebsd-arm), const SYS_CAP_RIGHTS_LIMIT ideal-int
pkg syscall (freebsd-arm), const SizeofBpfHdr = 24
pkg syscall (freebsd-arm), const SizeofIfData = 88
pkg syscall (freebsd-arm), const SizeofIfMsghdr = 104
pkg syscall (freebsd-arm), const SizeofSockaddrDatalink = 56
pkg syscall (freebsd-arm), const SizeofSockaddrUnix = 108
pkg syscall (freebsd-arm), const TIOCTIMESTAMP = 1074558041
pkg syscall (freebsd-arm), type BpfHdr struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type RawSockaddrDatalink struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type RawSockaddrUnix struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm), type Stat_t struct, Pad_cgo_0 [4]uint8
pkg syscall (freebsd-arm-cgo), const AF_MAX = 38
pkg syscall (freebsd-arm-cgo), const BIOCGRTIMEOUT = 1074545262
pkg syscall (freebsd-arm-cgo), const BIOCSRTIMEOUT = 2148287085
pkg syscall (freebsd-arm-cgo), const ELAST = 94
pkg syscall (freebsd-arm-cgo), const O_CLOEXEC = 0
pkg syscall (freebsd-arm-cgo), const SIOCAIFADDR = 2151967019
pkg syscall (freebsd-arm-cgo), const SIOCGIFSTATUS = 3274991931
pkg syscall (freebsd-arm-cgo), const SIOCSIFPHYADDR = 2151967046
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_GET = 537
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_LIMIT = 536
pkg syscall (freebsd-arm-cgo), const SYS_CAP_FCNTLS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_GET = 535
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_LIMIT = 534
pkg syscall (freebsd-arm-cgo), const SYS_CAP_IOCTLS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_GET = 515
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_GET ideal-int
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_LIMIT = 533
pkg syscall (freebsd-arm-cgo), const SYS_CAP_RIGHTS_LIMIT ideal-int
pkg syscall (freebsd-arm-cgo), const SizeofBpfHdr = 24
pkg syscall (freebsd-arm-cgo), const SizeofIfData = 88
pkg syscall (freebsd-arm-cgo), const SizeofIfMsghdr = 104
pkg syscall (freebsd-arm-cgo), const SizeofSockaddrDatalink = 56
pkg syscall (freebsd-arm-cgo), const SizeofSockaddrUnix = 108
pkg syscall (freebsd-arm-cgo), const TIOCTIMESTAMP = 1074558041
pkg syscall (freebsd-arm-cgo), type BpfHdr struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type RawSockaddrDatalink struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type RawSockaddrUnix struct, Pad_cgo_0 [2]uint8
pkg syscall (freebsd-arm-cgo), type Stat_t struct, Pad_cgo_0 [4]uint8
pkg syscall (netbsd-arm), const SizeofIfData = 132
pkg syscall (netbsd-arm), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg syscall (netbsd-arm-cgo), const SizeofIfData = 132
pkg syscall (netbsd-arm-cgo), type IfMsghdr struct, Pad_cgo_1 [4]uint8
pkg unicode, const Version = "6.3.0"
pkg unicode, const Version = "7.0.0"
pkg unicode, const Version = "8.0.0"
pkg syscall (openbsd-386), const SYS_KILL = 37
pkg syscall (openbsd-386-cgo), const SYS_KILL = 37
pkg syscall (openbsd-amd64), const SYS_KILL = 37
pkg syscall (openbsd-amd64-cgo), const SYS_KILL = 37

View File

@@ -1983,13 +1983,13 @@ pkg log/syslog (openbsd-amd64-cgo), const LOG_SYSLOG = 40
pkg log/syslog (openbsd-amd64-cgo), const LOG_USER = 8
pkg log/syslog (openbsd-amd64-cgo), const LOG_UUCP = 64
pkg log/syslog (openbsd-amd64-cgo), const LOG_WARNING = 4
pkg math, const E = 2.71828 // 271828182845904523536028747135266249775724709369995957496696763/100000000000000000000000000000000000000000000000000000000000000
pkg math, const Ln10 = 2.30259 // 23025850929940456840179914546843642076011014886287729760333279/10000000000000000000000000000000000000000000000000000000000000
pkg math, const Ln2 = 0.693147 // 693147180559945309417232121458176568075500134360255254120680009/1000000000000000000000000000000000000000000000000000000000000000
pkg math, const Log10E = 0.434294 // 10000000000000000000000000000000000000000000000000000000000000/23025850929940456840179914546843642076011014886287729760333279
pkg math, const Log2E = 1.4427 // 1000000000000000000000000000000000000000000000000000000000000000/693147180559945309417232121458176568075500134360255254120680009
pkg math, const MaxFloat32 = 3.40282e+38 // 340282346638528859811704183484516925440
pkg math, const MaxFloat64 = 1.79769e+308 // 179769313486231570814527423731704356798100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const E = 271828182845904523536028747135266249775724709369995957496696763/100000000000000000000000000000000000000000000000000000000000000
pkg math, const Ln10 = 23025850929940456840179914546843642076011014886287729760333279/10000000000000000000000000000000000000000000000000000000000000
pkg math, const Ln2 = 693147180559945309417232121458176568075500134360255254120680009/1000000000000000000000000000000000000000000000000000000000000000
pkg math, const Log10E = 10000000000000000000000000000000000000000000000000000000000000/23025850929940456840179914546843642076011014886287729760333279
pkg math, const Log2E = 1000000000000000000000000000000000000000000000000000000000000000/693147180559945309417232121458176568075500134360255254120680009
pkg math, const MaxFloat32 = 340282346638528859811704183484516925440
pkg math, const MaxFloat64 = 179769313486231570814527423731704356798100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const MaxInt16 = 32767
pkg math, const MaxInt32 = 2147483647
pkg math, const MaxInt64 = 9223372036854775807
@@ -2002,14 +2002,14 @@ pkg math, const MinInt16 = -32768
pkg math, const MinInt32 = -2147483648
pkg math, const MinInt64 = -9223372036854775808
pkg math, const MinInt8 = -128
pkg math, const Phi = 1.61803 // 80901699437494742410229341718281905886015458990288143106772431/50000000000000000000000000000000000000000000000000000000000000
pkg math, const Pi = 3.14159 // 314159265358979323846264338327950288419716939937510582097494459/100000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat32 = 1.4013e-45 // 17516230804060213386546619791123951641/12500000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat64 = 4.94066e-324 // 4940656458412465441765687928682213723651/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const Sqrt2 = 1.41421 // 70710678118654752440084436210484903928483593768847403658833987/50000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtE = 1.64872 // 164872127070012814684865078781416357165377610071014801157507931/100000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtPhi = 1.27202 // 63600982475703448212621123086874574585780402092004812430832019/50000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtPi = 1.77245 // 177245385090551602729816748334114518279754945612238712821380779/100000000000000000000000000000000000000000000000000000000000000
pkg math, const Phi = 80901699437494742410229341718281905886015458990288143106772431/50000000000000000000000000000000000000000000000000000000000000
pkg math, const Pi = 314159265358979323846264338327950288419716939937510582097494459/100000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat32 = 17516230804060213386546619791123951641/12500000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const SmallestNonzeroFloat64 = 4940656458412465441765687928682213723651/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pkg math, const Sqrt2 = 70710678118654752440084436210484903928483593768847403658833987/50000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtE = 164872127070012814684865078781416357165377610071014801157507931/100000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtPhi = 63600982475703448212621123086874574585780402092004812430832019/50000000000000000000000000000000000000000000000000000000000000
pkg math, const SqrtPi = 177245385090551602729816748334114518279754945612238712821380779/100000000000000000000000000000000000000000000000000000000000000
pkg math/big, const MaxBase = 36
pkg math/big, method (*Int) MarshalJSON() ([]uint8, error)
pkg math/big, method (*Int) SetUint64(uint64) *Int

View File

@@ -1,275 +0,0 @@
pkg archive/zip, method (*ReadCloser) RegisterDecompressor(uint16, Decompressor)
pkg archive/zip, method (*Reader) RegisterDecompressor(uint16, Decompressor)
pkg archive/zip, method (*Writer) RegisterCompressor(uint16, Compressor)
pkg bufio, method (*Scanner) Buffer([]uint8, int)
pkg bufio, var ErrFinalToken error
pkg crypto/tls, const TLS_RSA_WITH_AES_128_GCM_SHA256 = 156
pkg crypto/tls, const TLS_RSA_WITH_AES_128_GCM_SHA256 uint16
pkg crypto/tls, const TLS_RSA_WITH_AES_256_GCM_SHA384 = 157
pkg crypto/tls, const TLS_RSA_WITH_AES_256_GCM_SHA384 uint16
pkg crypto/tls, method (RecordHeaderError) Error() string
pkg crypto/tls, type RecordHeaderError struct
pkg crypto/tls, type RecordHeaderError struct, Msg string
pkg crypto/tls, type RecordHeaderError struct, RecordHeader [5]uint8
pkg crypto/x509, method (InsecureAlgorithmError) Error() string
pkg crypto/x509, method (SignatureAlgorithm) String() string
pkg crypto/x509, type InsecureAlgorithmError int
pkg database/sql, method (*DB) SetConnMaxLifetime(time.Duration)
pkg debug/dwarf, const ClassUnknown = 0
pkg debug/dwarf, const ClassUnknown Class
pkg debug/elf, const COMPRESS_HIOS = 1879048191
pkg debug/elf, const COMPRESS_HIOS CompressionType
pkg debug/elf, const COMPRESS_HIPROC = 2147483647
pkg debug/elf, const COMPRESS_HIPROC CompressionType
pkg debug/elf, const COMPRESS_LOOS = 1610612736
pkg debug/elf, const COMPRESS_LOOS CompressionType
pkg debug/elf, const COMPRESS_LOPROC = 1879048192
pkg debug/elf, const COMPRESS_LOPROC CompressionType
pkg debug/elf, const COMPRESS_ZLIB = 1
pkg debug/elf, const COMPRESS_ZLIB CompressionType
pkg debug/elf, const R_MIPS_16 = 1
pkg debug/elf, const R_MIPS_16 R_MIPS
pkg debug/elf, const R_MIPS_26 = 4
pkg debug/elf, const R_MIPS_26 R_MIPS
pkg debug/elf, const R_MIPS_32 = 2
pkg debug/elf, const R_MIPS_32 R_MIPS
pkg debug/elf, const R_MIPS_64 = 18
pkg debug/elf, const R_MIPS_64 R_MIPS
pkg debug/elf, const R_MIPS_ADD_IMMEDIATE = 34
pkg debug/elf, const R_MIPS_ADD_IMMEDIATE R_MIPS
pkg debug/elf, const R_MIPS_CALL16 = 11
pkg debug/elf, const R_MIPS_CALL16 R_MIPS
pkg debug/elf, const R_MIPS_CALL_HI16 = 30
pkg debug/elf, const R_MIPS_CALL_HI16 R_MIPS
pkg debug/elf, const R_MIPS_CALL_LO16 = 31
pkg debug/elf, const R_MIPS_CALL_LO16 R_MIPS
pkg debug/elf, const R_MIPS_DELETE = 27
pkg debug/elf, const R_MIPS_DELETE R_MIPS
pkg debug/elf, const R_MIPS_GOT16 = 9
pkg debug/elf, const R_MIPS_GOT16 R_MIPS
pkg debug/elf, const R_MIPS_GOT_DISP = 19
pkg debug/elf, const R_MIPS_GOT_DISP R_MIPS
pkg debug/elf, const R_MIPS_GOT_HI16 = 22
pkg debug/elf, const R_MIPS_GOT_HI16 R_MIPS
pkg debug/elf, const R_MIPS_GOT_LO16 = 23
pkg debug/elf, const R_MIPS_GOT_LO16 R_MIPS
pkg debug/elf, const R_MIPS_GOT_OFST = 21
pkg debug/elf, const R_MIPS_GOT_OFST R_MIPS
pkg debug/elf, const R_MIPS_GOT_PAGE = 20
pkg debug/elf, const R_MIPS_GOT_PAGE R_MIPS
pkg debug/elf, const R_MIPS_GPREL16 = 7
pkg debug/elf, const R_MIPS_GPREL16 R_MIPS
pkg debug/elf, const R_MIPS_GPREL32 = 12
pkg debug/elf, const R_MIPS_GPREL32 R_MIPS
pkg debug/elf, const R_MIPS_HI16 = 5
pkg debug/elf, const R_MIPS_HI16 R_MIPS
pkg debug/elf, const R_MIPS_HIGHER = 28
pkg debug/elf, const R_MIPS_HIGHER R_MIPS
pkg debug/elf, const R_MIPS_HIGHEST = 29
pkg debug/elf, const R_MIPS_HIGHEST R_MIPS
pkg debug/elf, const R_MIPS_INSERT_A = 25
pkg debug/elf, const R_MIPS_INSERT_A R_MIPS
pkg debug/elf, const R_MIPS_INSERT_B = 26
pkg debug/elf, const R_MIPS_INSERT_B R_MIPS
pkg debug/elf, const R_MIPS_JALR = 37
pkg debug/elf, const R_MIPS_JALR R_MIPS
pkg debug/elf, const R_MIPS_LITERAL = 8
pkg debug/elf, const R_MIPS_LITERAL R_MIPS
pkg debug/elf, const R_MIPS_LO16 = 6
pkg debug/elf, const R_MIPS_LO16 R_MIPS
pkg debug/elf, const R_MIPS_NONE = 0
pkg debug/elf, const R_MIPS_NONE R_MIPS
pkg debug/elf, const R_MIPS_PC16 = 10
pkg debug/elf, const R_MIPS_PC16 R_MIPS
pkg debug/elf, const R_MIPS_PJUMP = 35
pkg debug/elf, const R_MIPS_PJUMP R_MIPS
pkg debug/elf, const R_MIPS_REL16 = 33
pkg debug/elf, const R_MIPS_REL16 R_MIPS
pkg debug/elf, const R_MIPS_REL32 = 3
pkg debug/elf, const R_MIPS_REL32 R_MIPS
pkg debug/elf, const R_MIPS_RELGOT = 36
pkg debug/elf, const R_MIPS_RELGOT R_MIPS
pkg debug/elf, const R_MIPS_SCN_DISP = 32
pkg debug/elf, const R_MIPS_SCN_DISP R_MIPS
pkg debug/elf, const R_MIPS_SHIFT5 = 16
pkg debug/elf, const R_MIPS_SHIFT5 R_MIPS
pkg debug/elf, const R_MIPS_SHIFT6 = 17
pkg debug/elf, const R_MIPS_SHIFT6 R_MIPS
pkg debug/elf, const R_MIPS_SUB = 24
pkg debug/elf, const R_MIPS_SUB R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPMOD32 = 38
pkg debug/elf, const R_MIPS_TLS_DTPMOD32 R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPMOD64 = 40
pkg debug/elf, const R_MIPS_TLS_DTPMOD64 R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPREL32 = 39
pkg debug/elf, const R_MIPS_TLS_DTPREL32 R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPREL64 = 41
pkg debug/elf, const R_MIPS_TLS_DTPREL64 R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPREL_HI16 = 44
pkg debug/elf, const R_MIPS_TLS_DTPREL_HI16 R_MIPS
pkg debug/elf, const R_MIPS_TLS_DTPREL_LO16 = 45
pkg debug/elf, const R_MIPS_TLS_DTPREL_LO16 R_MIPS
pkg debug/elf, const R_MIPS_TLS_GD = 42
pkg debug/elf, const R_MIPS_TLS_GD R_MIPS
pkg debug/elf, const R_MIPS_TLS_GOTTPREL = 46
pkg debug/elf, const R_MIPS_TLS_GOTTPREL R_MIPS
pkg debug/elf, const R_MIPS_TLS_LDM = 43
pkg debug/elf, const R_MIPS_TLS_LDM R_MIPS
pkg debug/elf, const R_MIPS_TLS_TPREL32 = 47
pkg debug/elf, const R_MIPS_TLS_TPREL32 R_MIPS
pkg debug/elf, const R_MIPS_TLS_TPREL64 = 48
pkg debug/elf, const R_MIPS_TLS_TPREL64 R_MIPS
pkg debug/elf, const R_MIPS_TLS_TPREL_HI16 = 49
pkg debug/elf, const R_MIPS_TLS_TPREL_HI16 R_MIPS
pkg debug/elf, const R_MIPS_TLS_TPREL_LO16 = 50
pkg debug/elf, const R_MIPS_TLS_TPREL_LO16 R_MIPS
pkg debug/elf, const SHF_COMPRESSED = 2048
pkg debug/elf, const SHF_COMPRESSED SectionFlag
pkg debug/elf, method (CompressionType) GoString() string
pkg debug/elf, method (CompressionType) String() string
pkg debug/elf, method (R_MIPS) GoString() string
pkg debug/elf, method (R_MIPS) String() string
pkg debug/elf, type Chdr32 struct
pkg debug/elf, type Chdr32 struct, Addralign uint32
pkg debug/elf, type Chdr32 struct, Size uint32
pkg debug/elf, type Chdr32 struct, Type uint32
pkg debug/elf, type Chdr64 struct
pkg debug/elf, type Chdr64 struct, Addralign uint64
pkg debug/elf, type Chdr64 struct, Size uint64
pkg debug/elf, type Chdr64 struct, Type uint32
pkg debug/elf, type CompressionType int
pkg debug/elf, type R_MIPS int
pkg debug/elf, type SectionHeader struct, FileSize uint64
pkg encoding/asn1, const ClassApplication = 1
pkg encoding/asn1, const ClassApplication ideal-int
pkg encoding/asn1, const ClassContextSpecific = 2
pkg encoding/asn1, const ClassContextSpecific ideal-int
pkg encoding/asn1, const ClassPrivate = 3
pkg encoding/asn1, const ClassPrivate ideal-int
pkg encoding/asn1, const ClassUniversal = 0
pkg encoding/asn1, const ClassUniversal ideal-int
pkg encoding/asn1, const TagBitString = 3
pkg encoding/asn1, const TagBitString ideal-int
pkg encoding/asn1, const TagBoolean = 1
pkg encoding/asn1, const TagBoolean ideal-int
pkg encoding/asn1, const TagEnum = 10
pkg encoding/asn1, const TagEnum ideal-int
pkg encoding/asn1, const TagGeneralString = 27
pkg encoding/asn1, const TagGeneralString ideal-int
pkg encoding/asn1, const TagGeneralizedTime = 24
pkg encoding/asn1, const TagGeneralizedTime ideal-int
pkg encoding/asn1, const TagIA5String = 22
pkg encoding/asn1, const TagIA5String ideal-int
pkg encoding/asn1, const TagInteger = 2
pkg encoding/asn1, const TagInteger ideal-int
pkg encoding/asn1, const TagOID = 6
pkg encoding/asn1, const TagOID ideal-int
pkg encoding/asn1, const TagOctetString = 4
pkg encoding/asn1, const TagOctetString ideal-int
pkg encoding/asn1, const TagPrintableString = 19
pkg encoding/asn1, const TagPrintableString ideal-int
pkg encoding/asn1, const TagSequence = 16
pkg encoding/asn1, const TagSequence ideal-int
pkg encoding/asn1, const TagSet = 17
pkg encoding/asn1, const TagSet ideal-int
pkg encoding/asn1, const TagT61String = 20
pkg encoding/asn1, const TagT61String ideal-int
pkg encoding/asn1, const TagUTCTime = 23
pkg encoding/asn1, const TagUTCTime ideal-int
pkg encoding/asn1, const TagUTF8String = 12
pkg encoding/asn1, const TagUTF8String ideal-int
pkg go/build, const IgnoreVendor = 8
pkg go/build, const IgnoreVendor ImportMode
pkg go/build, type Package struct, InvalidGoFiles []string
pkg go/constant, func ToComplex(Value) Value
pkg go/constant, func ToFloat(Value) Value
pkg go/constant, func ToInt(Value) Value
pkg go/constant, type Value interface, ExactString() string
pkg go/types, method (*Package) SetName(string)
pkg go/types, type ImportMode int
pkg go/types, type ImporterFrom interface { Import, ImportFrom }
pkg go/types, type ImporterFrom interface, Import(string) (*Package, error)
pkg go/types, type ImporterFrom interface, ImportFrom(string, string, ImportMode) (*Package, error)
pkg html/template, func IsTrue(interface{}) (bool, bool)
pkg html/template, method (*Template) DefinedTemplates() string
pkg image, func NewNYCbCrA(Rectangle, YCbCrSubsampleRatio) *NYCbCrA
pkg image, method (*NYCbCrA) AOffset(int, int) int
pkg image, method (*NYCbCrA) At(int, int) color.Color
pkg image, method (*NYCbCrA) Bounds() Rectangle
pkg image, method (*NYCbCrA) COffset(int, int) int
pkg image, method (*NYCbCrA) ColorModel() color.Model
pkg image, method (*NYCbCrA) NYCbCrAAt(int, int) color.NYCbCrA
pkg image, method (*NYCbCrA) Opaque() bool
pkg image, method (*NYCbCrA) SubImage(Rectangle) Image
pkg image, method (*NYCbCrA) YCbCrAt(int, int) color.YCbCr
pkg image, method (*NYCbCrA) YOffset(int, int) int
pkg image, type NYCbCrA struct
pkg image, type NYCbCrA struct, A []uint8
pkg image, type NYCbCrA struct, AStride int
pkg image, type NYCbCrA struct, embedded YCbCr
pkg image/color, method (NYCbCrA) RGBA() (uint32, uint32, uint32, uint32)
pkg image/color, type NYCbCrA struct
pkg image/color, type NYCbCrA struct, A uint8
pkg image/color, type NYCbCrA struct, embedded YCbCr
pkg image/color, var NYCbCrAModel Model
pkg math/big, method (*Float) MarshalText() ([]uint8, error)
pkg math/big, method (*Float) UnmarshalText([]uint8) error
pkg math/big, method (*Int) Append([]uint8, int) []uint8
pkg math/big, method (*Int) Text(int) string
pkg math/rand, func Read([]uint8) (int, error)
pkg math/rand, method (*Rand) Read([]uint8) (int, error)
pkg net, type DNSError struct, IsTemporary bool
pkg net, type Dialer struct, Cancel <-chan struct
pkg net/http, const MethodConnect = "CONNECT"
pkg net/http, const MethodConnect ideal-string
pkg net/http, const MethodDelete = "DELETE"
pkg net/http, const MethodDelete ideal-string
pkg net/http, const MethodGet = "GET"
pkg net/http, const MethodGet ideal-string
pkg net/http, const MethodHead = "HEAD"
pkg net/http, const MethodHead ideal-string
pkg net/http, const MethodOptions = "OPTIONS"
pkg net/http, const MethodOptions ideal-string
pkg net/http, const MethodPatch = "PATCH"
pkg net/http, const MethodPatch ideal-string
pkg net/http, const MethodPost = "POST"
pkg net/http, const MethodPost ideal-string
pkg net/http, const MethodPut = "PUT"
pkg net/http, const MethodPut ideal-string
pkg net/http, const MethodTrace = "TRACE"
pkg net/http, const MethodTrace ideal-string
pkg net/http, const StatusNetworkAuthenticationRequired = 511
pkg net/http, const StatusNetworkAuthenticationRequired ideal-int
pkg net/http, const StatusPreconditionRequired = 428
pkg net/http, const StatusPreconditionRequired ideal-int
pkg net/http, const StatusRequestHeaderFieldsTooLarge = 431
pkg net/http, const StatusRequestHeaderFieldsTooLarge ideal-int
pkg net/http, const StatusTooManyRequests = 429
pkg net/http, const StatusTooManyRequests ideal-int
pkg net/http, const StatusUnavailableForLegalReasons = 451
pkg net/http, const StatusUnavailableForLegalReasons ideal-int
pkg net/http, type Transport struct, ExpectContinueTimeout time.Duration
pkg net/http, type Transport struct, TLSNextProto map[string]func(string, *tls.Conn) RoundTripper
pkg net/http, var ErrSkipAltProtocol error
pkg net/http/httptest, method (*ResponseRecorder) WriteString(string) (int, error)
pkg net/http/httputil, type BufferPool interface { Get, Put }
pkg net/http/httputil, type BufferPool interface, Get() []uint8
pkg net/http/httputil, type BufferPool interface, Put([]uint8)
pkg net/http/httputil, type ReverseProxy struct, BufferPool BufferPool
pkg net/url, method (*Error) Temporary() bool
pkg net/url, method (*Error) Timeout() bool
pkg net/url, method (InvalidHostError) Error() string
pkg net/url, type InvalidHostError string
pkg os/exec, type ExitError struct, Stderr []uint8
pkg regexp, method (*Regexp) Copy() *Regexp
pkg runtime/debug, func SetTraceback(string)
pkg strconv, func AppendQuoteRuneToGraphic([]uint8, int32) []uint8
pkg strconv, func AppendQuoteToGraphic([]uint8, string) []uint8
pkg strconv, func IsGraphic(int32) bool
pkg strconv, func QuoteRuneToGraphic(int32) string
pkg strconv, func QuoteToGraphic(string) string
pkg text/template, func IsTrue(interface{}) (bool, bool)
pkg text/template, method (ExecError) Error() string
pkg text/template, type ExecError struct
pkg text/template, type ExecError struct, Err error
pkg text/template, type ExecError struct, Name string

View File

@@ -1,285 +0,0 @@
pkg bytes, func ContainsAny([]uint8, string) bool
pkg bytes, func ContainsRune([]uint8, int32) bool
pkg bytes, method (*Reader) Reset([]uint8)
pkg compress/flate, const HuffmanOnly = -2
pkg compress/flate, const HuffmanOnly ideal-int
pkg context, func Background() Context
pkg context, func TODO() Context
pkg context, func WithCancel(Context) (Context, CancelFunc)
pkg context, func WithDeadline(Context, time.Time) (Context, CancelFunc)
pkg context, func WithTimeout(Context, time.Duration) (Context, CancelFunc)
pkg context, func WithValue(Context, interface{}, interface{}) Context
pkg context, type CancelFunc func()
pkg context, type Context interface { Deadline, Done, Err, Value }
pkg context, type Context interface, Deadline() (time.Time, bool)
pkg context, type Context interface, Done() <-chan struct
pkg context, type Context interface, Err() error
pkg context, type Context interface, Value(interface{}) interface{}
pkg context, var Canceled error
pkg context, var DeadlineExceeded error
pkg crypto/tls, const RenegotiateFreelyAsClient = 2
pkg crypto/tls, const RenegotiateFreelyAsClient RenegotiationSupport
pkg crypto/tls, const RenegotiateNever = 0
pkg crypto/tls, const RenegotiateNever RenegotiationSupport
pkg crypto/tls, const RenegotiateOnceAsClient = 1
pkg crypto/tls, const RenegotiateOnceAsClient RenegotiationSupport
pkg crypto/tls, type Config struct, DynamicRecordSizingDisabled bool
pkg crypto/tls, type Config struct, Renegotiation RenegotiationSupport
pkg crypto/tls, type RenegotiationSupport int
pkg crypto/x509, func SystemCertPool() (*CertPool, error)
pkg crypto/x509, type SystemRootsError struct, Err error
pkg debug/dwarf, method (*Data) Ranges(*Entry) ([][2]uint64, error)
pkg debug/dwarf, method (*Reader) SeekPC(uint64) (*Entry, error)
pkg debug/elf, const R_390_12 = 2
pkg debug/elf, const R_390_12 R_390
pkg debug/elf, const R_390_16 = 3
pkg debug/elf, const R_390_16 R_390
pkg debug/elf, const R_390_20 = 57
pkg debug/elf, const R_390_20 R_390
pkg debug/elf, const R_390_32 = 4
pkg debug/elf, const R_390_32 R_390
pkg debug/elf, const R_390_64 = 22
pkg debug/elf, const R_390_64 R_390
pkg debug/elf, const R_390_8 = 1
pkg debug/elf, const R_390_8 R_390
pkg debug/elf, const R_390_COPY = 9
pkg debug/elf, const R_390_COPY R_390
pkg debug/elf, const R_390_GLOB_DAT = 10
pkg debug/elf, const R_390_GLOB_DAT R_390
pkg debug/elf, const R_390_GOT12 = 6
pkg debug/elf, const R_390_GOT12 R_390
pkg debug/elf, const R_390_GOT16 = 15
pkg debug/elf, const R_390_GOT16 R_390
pkg debug/elf, const R_390_GOT20 = 58
pkg debug/elf, const R_390_GOT20 R_390
pkg debug/elf, const R_390_GOT32 = 7
pkg debug/elf, const R_390_GOT32 R_390
pkg debug/elf, const R_390_GOT64 = 24
pkg debug/elf, const R_390_GOT64 R_390
pkg debug/elf, const R_390_GOTENT = 26
pkg debug/elf, const R_390_GOTENT R_390
pkg debug/elf, const R_390_GOTOFF = 13
pkg debug/elf, const R_390_GOTOFF R_390
pkg debug/elf, const R_390_GOTOFF16 = 27
pkg debug/elf, const R_390_GOTOFF16 R_390
pkg debug/elf, const R_390_GOTOFF64 = 28
pkg debug/elf, const R_390_GOTOFF64 R_390
pkg debug/elf, const R_390_GOTPC = 14
pkg debug/elf, const R_390_GOTPC R_390
pkg debug/elf, const R_390_GOTPCDBL = 21
pkg debug/elf, const R_390_GOTPCDBL R_390
pkg debug/elf, const R_390_GOTPLT12 = 29
pkg debug/elf, const R_390_GOTPLT12 R_390
pkg debug/elf, const R_390_GOTPLT16 = 30
pkg debug/elf, const R_390_GOTPLT16 R_390
pkg debug/elf, const R_390_GOTPLT20 = 59
pkg debug/elf, const R_390_GOTPLT20 R_390
pkg debug/elf, const R_390_GOTPLT32 = 31
pkg debug/elf, const R_390_GOTPLT32 R_390
pkg debug/elf, const R_390_GOTPLT64 = 32
pkg debug/elf, const R_390_GOTPLT64 R_390
pkg debug/elf, const R_390_GOTPLTENT = 33
pkg debug/elf, const R_390_GOTPLTENT R_390
pkg debug/elf, const R_390_GOTPLTOFF16 = 34
pkg debug/elf, const R_390_GOTPLTOFF16 R_390
pkg debug/elf, const R_390_GOTPLTOFF32 = 35
pkg debug/elf, const R_390_GOTPLTOFF32 R_390
pkg debug/elf, const R_390_GOTPLTOFF64 = 36
pkg debug/elf, const R_390_GOTPLTOFF64 R_390
pkg debug/elf, const R_390_JMP_SLOT = 11
pkg debug/elf, const R_390_JMP_SLOT R_390
pkg debug/elf, const R_390_NONE = 0
pkg debug/elf, const R_390_NONE R_390
pkg debug/elf, const R_390_PC16 = 16
pkg debug/elf, const R_390_PC16 R_390
pkg debug/elf, const R_390_PC16DBL = 17
pkg debug/elf, const R_390_PC16DBL R_390
pkg debug/elf, const R_390_PC32 = 5
pkg debug/elf, const R_390_PC32 R_390
pkg debug/elf, const R_390_PC32DBL = 19
pkg debug/elf, const R_390_PC32DBL R_390
pkg debug/elf, const R_390_PC64 = 23
pkg debug/elf, const R_390_PC64 R_390
pkg debug/elf, const R_390_PLT16DBL = 18
pkg debug/elf, const R_390_PLT16DBL R_390
pkg debug/elf, const R_390_PLT32 = 8
pkg debug/elf, const R_390_PLT32 R_390
pkg debug/elf, const R_390_PLT32DBL = 20
pkg debug/elf, const R_390_PLT32DBL R_390
pkg debug/elf, const R_390_PLT64 = 25
pkg debug/elf, const R_390_PLT64 R_390
pkg debug/elf, const R_390_RELATIVE = 12
pkg debug/elf, const R_390_RELATIVE R_390
pkg debug/elf, const R_390_TLS_DTPMOD = 54
pkg debug/elf, const R_390_TLS_DTPMOD R_390
pkg debug/elf, const R_390_TLS_DTPOFF = 55
pkg debug/elf, const R_390_TLS_DTPOFF R_390
pkg debug/elf, const R_390_TLS_GD32 = 40
pkg debug/elf, const R_390_TLS_GD32 R_390
pkg debug/elf, const R_390_TLS_GD64 = 41
pkg debug/elf, const R_390_TLS_GD64 R_390
pkg debug/elf, const R_390_TLS_GDCALL = 38
pkg debug/elf, const R_390_TLS_GDCALL R_390
pkg debug/elf, const R_390_TLS_GOTIE12 = 42
pkg debug/elf, const R_390_TLS_GOTIE12 R_390
pkg debug/elf, const R_390_TLS_GOTIE20 = 60
pkg debug/elf, const R_390_TLS_GOTIE20 R_390
pkg debug/elf, const R_390_TLS_GOTIE32 = 43
pkg debug/elf, const R_390_TLS_GOTIE32 R_390
pkg debug/elf, const R_390_TLS_GOTIE64 = 44
pkg debug/elf, const R_390_TLS_GOTIE64 R_390
pkg debug/elf, const R_390_TLS_IE32 = 47
pkg debug/elf, const R_390_TLS_IE32 R_390
pkg debug/elf, const R_390_TLS_IE64 = 48
pkg debug/elf, const R_390_TLS_IE64 R_390
pkg debug/elf, const R_390_TLS_IEENT = 49
pkg debug/elf, const R_390_TLS_IEENT R_390
pkg debug/elf, const R_390_TLS_LDCALL = 39
pkg debug/elf, const R_390_TLS_LDCALL R_390
pkg debug/elf, const R_390_TLS_LDM32 = 45
pkg debug/elf, const R_390_TLS_LDM32 R_390
pkg debug/elf, const R_390_TLS_LDM64 = 46
pkg debug/elf, const R_390_TLS_LDM64 R_390
pkg debug/elf, const R_390_TLS_LDO32 = 52
pkg debug/elf, const R_390_TLS_LDO32 R_390
pkg debug/elf, const R_390_TLS_LDO64 = 53
pkg debug/elf, const R_390_TLS_LDO64 R_390
pkg debug/elf, const R_390_TLS_LE32 = 50
pkg debug/elf, const R_390_TLS_LE32 R_390
pkg debug/elf, const R_390_TLS_LE64 = 51
pkg debug/elf, const R_390_TLS_LE64 R_390
pkg debug/elf, const R_390_TLS_LOAD = 37
pkg debug/elf, const R_390_TLS_LOAD R_390
pkg debug/elf, const R_390_TLS_TPOFF = 56
pkg debug/elf, const R_390_TLS_TPOFF R_390
pkg debug/elf, method (R_390) GoString() string
pkg debug/elf, method (R_390) String() string
pkg debug/elf, type R_390 int
pkg encoding/json, method (*Encoder) SetEscapeHTML(bool)
pkg encoding/json, method (*Encoder) SetIndent(string, string)
pkg go/build, type Package struct, BinaryOnly bool
pkg go/build, type Package struct, CgoFFLAGS []string
pkg go/build, type Package struct, FFiles []string
pkg go/doc, type Example struct, Unordered bool
pkg io, const SeekCurrent = 1
pkg io, const SeekCurrent ideal-int
pkg io, const SeekEnd = 2
pkg io, const SeekEnd ideal-int
pkg io, const SeekStart = 0
pkg io, const SeekStart ideal-int
pkg math/big, method (*Float) GobDecode([]uint8) error
pkg math/big, method (*Float) GobEncode() ([]uint8, error)
pkg net, method (*Dialer) DialContext(context.Context, string, string) (Conn, error)
pkg net/http, const StatusAlreadyReported = 208
pkg net/http, const StatusAlreadyReported ideal-int
pkg net/http, const StatusFailedDependency = 424
pkg net/http, const StatusFailedDependency ideal-int
pkg net/http, const StatusIMUsed = 226
pkg net/http, const StatusIMUsed ideal-int
pkg net/http, const StatusInsufficientStorage = 507
pkg net/http, const StatusInsufficientStorage ideal-int
pkg net/http, const StatusLocked = 423
pkg net/http, const StatusLocked ideal-int
pkg net/http, const StatusLoopDetected = 508
pkg net/http, const StatusLoopDetected ideal-int
pkg net/http, const StatusMultiStatus = 207
pkg net/http, const StatusMultiStatus ideal-int
pkg net/http, const StatusNotExtended = 510
pkg net/http, const StatusNotExtended ideal-int
pkg net/http, const StatusPermanentRedirect = 308
pkg net/http, const StatusPermanentRedirect ideal-int
pkg net/http, const StatusProcessing = 102
pkg net/http, const StatusProcessing ideal-int
pkg net/http, const StatusUnprocessableEntity = 422
pkg net/http, const StatusUnprocessableEntity ideal-int
pkg net/http, const StatusUpgradeRequired = 426
pkg net/http, const StatusUpgradeRequired ideal-int
pkg net/http, const StatusVariantAlsoNegotiates = 506
pkg net/http, const StatusVariantAlsoNegotiates ideal-int
pkg net/http, method (*Request) Context() context.Context
pkg net/http, method (*Request) WithContext(context.Context) *Request
pkg net/http, type Request struct, Response *Response
pkg net/http, type Response struct, Uncompressed bool
pkg net/http, type Transport struct, DialContext func(context.Context, string, string) (net.Conn, error)
pkg net/http, type Transport struct, IdleConnTimeout time.Duration
pkg net/http, type Transport struct, MaxIdleConns int
pkg net/http, type Transport struct, MaxResponseHeaderBytes int64
pkg net/http, var ErrUseLastResponse error
pkg net/http, var LocalAddrContextKey *contextKey
pkg net/http, var ServerContextKey *contextKey
pkg net/http/cgi, type Handler struct, Stderr io.Writer
pkg net/http/httptest, func NewRequest(string, string, io.Reader) *http.Request
pkg net/http/httptest, method (*ResponseRecorder) Result() *http.Response
pkg net/http/httptrace, func ContextClientTrace(context.Context) *ClientTrace
pkg net/http/httptrace, func WithClientTrace(context.Context, *ClientTrace) context.Context
pkg net/http/httptrace, type ClientTrace struct
pkg net/http/httptrace, type ClientTrace struct, ConnectDone func(string, string, error)
pkg net/http/httptrace, type ClientTrace struct, ConnectStart func(string, string)
pkg net/http/httptrace, type ClientTrace struct, DNSDone func(DNSDoneInfo)
pkg net/http/httptrace, type ClientTrace struct, DNSStart func(DNSStartInfo)
pkg net/http/httptrace, type ClientTrace struct, GetConn func(string)
pkg net/http/httptrace, type ClientTrace struct, Got100Continue func()
pkg net/http/httptrace, type ClientTrace struct, GotConn func(GotConnInfo)
pkg net/http/httptrace, type ClientTrace struct, GotFirstResponseByte func()
pkg net/http/httptrace, type ClientTrace struct, PutIdleConn func(error)
pkg net/http/httptrace, type ClientTrace struct, Wait100Continue func()
pkg net/http/httptrace, type ClientTrace struct, WroteHeaders func()
pkg net/http/httptrace, type ClientTrace struct, WroteRequest func(WroteRequestInfo)
pkg net/http/httptrace, type DNSDoneInfo struct
pkg net/http/httptrace, type DNSDoneInfo struct, Addrs []net.IPAddr
pkg net/http/httptrace, type DNSDoneInfo struct, Coalesced bool
pkg net/http/httptrace, type DNSDoneInfo struct, Err error
pkg net/http/httptrace, type DNSStartInfo struct
pkg net/http/httptrace, type DNSStartInfo struct, Host string
pkg net/http/httptrace, type GotConnInfo struct
pkg net/http/httptrace, type GotConnInfo struct, Conn net.Conn
pkg net/http/httptrace, type GotConnInfo struct, IdleTime time.Duration
pkg net/http/httptrace, type GotConnInfo struct, Reused bool
pkg net/http/httptrace, type GotConnInfo struct, WasIdle bool
pkg net/http/httptrace, type WroteRequestInfo struct
pkg net/http/httptrace, type WroteRequestInfo struct, Err error
pkg net/url, type URL struct, ForceQuery bool
pkg os/exec, func CommandContext(context.Context, string, ...string) *Cmd
pkg os/user, func LookupGroup(string) (*Group, error)
pkg os/user, func LookupGroupId(string) (*Group, error)
pkg os/user, method (*User) GroupIds() ([]string, error)
pkg os/user, method (UnknownGroupError) Error() string
pkg os/user, method (UnknownGroupIdError) Error() string
pkg os/user, type Group struct
pkg os/user, type Group struct, Gid string
pkg os/user, type Group struct, Name string
pkg os/user, type UnknownGroupError string
pkg os/user, type UnknownGroupIdError string
pkg reflect, func StructOf([]StructField) Type
pkg reflect, method (StructTag) Lookup(string) (string, bool)
pkg runtime, func CallersFrames([]uintptr) *Frames
pkg runtime, func KeepAlive(interface{})
pkg runtime, func SetCgoTraceback(int, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer)
pkg runtime, method (*Frames) Next() (Frame, bool)
pkg runtime, type Frame struct
pkg runtime, type Frame struct, Entry uintptr
pkg runtime, type Frame struct, File string
pkg runtime, type Frame struct, Func *Func
pkg runtime, type Frame struct, Function string
pkg runtime, type Frame struct, Line int
pkg runtime, type Frame struct, PC uintptr
pkg runtime, type Frames struct
pkg strings, method (*Reader) Reset(string)
pkg syscall (linux-386), type SysProcAttr struct, Unshareflags uintptr
pkg syscall (linux-386-cgo), type SysProcAttr struct, Unshareflags uintptr
pkg syscall (linux-amd64), type SysProcAttr struct, Unshareflags uintptr
pkg syscall (linux-amd64-cgo), type SysProcAttr struct, Unshareflags uintptr
pkg syscall (linux-arm), type SysProcAttr struct, Unshareflags uintptr
pkg syscall (linux-arm-cgo), type SysProcAttr struct, Unshareflags uintptr
pkg testing, method (*B) Run(string, func(*B)) bool
pkg testing, method (*T) Run(string, func(*T)) bool
pkg testing, type InternalExample struct, Unordered bool
pkg unicode, const Version = "9.0.0"
pkg unicode, var Adlam *RangeTable
pkg unicode, var Bhaiksuki *RangeTable
pkg unicode, var Marchen *RangeTable
pkg unicode, var Newa *RangeTable
pkg unicode, var Osage *RangeTable
pkg unicode, var Prepended_Concatenation_Mark *RangeTable
pkg unicode, var Sentence_Terminal *RangeTable
pkg unicode, var Tangut *RangeTable

View File

@@ -1,261 +0,0 @@
pkg compress/gzip, const HuffmanOnly = -2
pkg compress/gzip, const HuffmanOnly ideal-int
pkg compress/zlib, const HuffmanOnly = -2
pkg compress/zlib, const HuffmanOnly ideal-int
pkg crypto/tls, const ECDSAWithP256AndSHA256 = 1027
pkg crypto/tls, const ECDSAWithP256AndSHA256 SignatureScheme
pkg crypto/tls, const ECDSAWithP384AndSHA384 = 1283
pkg crypto/tls, const ECDSAWithP384AndSHA384 SignatureScheme
pkg crypto/tls, const ECDSAWithP521AndSHA512 = 1539
pkg crypto/tls, const ECDSAWithP521AndSHA512 SignatureScheme
pkg crypto/tls, const PKCS1WithSHA1 = 513
pkg crypto/tls, const PKCS1WithSHA1 SignatureScheme
pkg crypto/tls, const PKCS1WithSHA256 = 1025
pkg crypto/tls, const PKCS1WithSHA256 SignatureScheme
pkg crypto/tls, const PKCS1WithSHA384 = 1281
pkg crypto/tls, const PKCS1WithSHA384 SignatureScheme
pkg crypto/tls, const PKCS1WithSHA512 = 1537
pkg crypto/tls, const PKCS1WithSHA512 SignatureScheme
pkg crypto/tls, const PSSWithSHA256 = 2052
pkg crypto/tls, const PSSWithSHA256 SignatureScheme
pkg crypto/tls, const PSSWithSHA384 = 2053
pkg crypto/tls, const PSSWithSHA384 SignatureScheme
pkg crypto/tls, const PSSWithSHA512 = 2054
pkg crypto/tls, const PSSWithSHA512 SignatureScheme
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 49187
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 uint16
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 = 52393
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 uint16
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 49191
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 uint16
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 = 52392
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 uint16
pkg crypto/tls, const TLS_RSA_WITH_AES_128_CBC_SHA256 = 60
pkg crypto/tls, const TLS_RSA_WITH_AES_128_CBC_SHA256 uint16
pkg crypto/tls, const X25519 = 29
pkg crypto/tls, const X25519 CurveID
pkg crypto/tls, method (*Config) Clone() *Config
pkg crypto/tls, method (*Conn) CloseWrite() error
pkg crypto/tls, type CertificateRequestInfo struct
pkg crypto/tls, type CertificateRequestInfo struct, AcceptableCAs [][]uint8
pkg crypto/tls, type CertificateRequestInfo struct, SignatureSchemes []SignatureScheme
pkg crypto/tls, type ClientHelloInfo struct, Conn net.Conn
pkg crypto/tls, type ClientHelloInfo struct, SignatureSchemes []SignatureScheme
pkg crypto/tls, type ClientHelloInfo struct, SupportedProtos []string
pkg crypto/tls, type ClientHelloInfo struct, SupportedVersions []uint16
pkg crypto/tls, type Config struct, GetClientCertificate func(*CertificateRequestInfo) (*Certificate, error)
pkg crypto/tls, type Config struct, GetConfigForClient func(*ClientHelloInfo) (*Config, error)
pkg crypto/tls, type Config struct, KeyLogWriter io.Writer
pkg crypto/tls, type Config struct, VerifyPeerCertificate func([][]uint8, [][]*x509.Certificate) error
pkg crypto/tls, type SignatureScheme uint16
pkg crypto/x509, const NameMismatch = 5
pkg crypto/x509, const NameMismatch InvalidReason
pkg crypto/x509, const SHA256WithRSAPSS = 13
pkg crypto/x509, const SHA256WithRSAPSS SignatureAlgorithm
pkg crypto/x509, const SHA384WithRSAPSS = 14
pkg crypto/x509, const SHA384WithRSAPSS SignatureAlgorithm
pkg crypto/x509, const SHA512WithRSAPSS = 15
pkg crypto/x509, const SHA512WithRSAPSS SignatureAlgorithm
pkg crypto/x509, type UnknownAuthorityError struct, Cert *Certificate
pkg database/sql, const LevelDefault = 0
pkg database/sql, const LevelDefault IsolationLevel
pkg database/sql, const LevelLinearizable = 7
pkg database/sql, const LevelLinearizable IsolationLevel
pkg database/sql, const LevelReadCommitted = 2
pkg database/sql, const LevelReadCommitted IsolationLevel
pkg database/sql, const LevelReadUncommitted = 1
pkg database/sql, const LevelReadUncommitted IsolationLevel
pkg database/sql, const LevelRepeatableRead = 4
pkg database/sql, const LevelRepeatableRead IsolationLevel
pkg database/sql, const LevelSerializable = 6
pkg database/sql, const LevelSerializable IsolationLevel
pkg database/sql, const LevelSnapshot = 5
pkg database/sql, const LevelSnapshot IsolationLevel
pkg database/sql, const LevelWriteCommitted = 3
pkg database/sql, const LevelWriteCommitted IsolationLevel
pkg database/sql/driver, type ConnBeginTx interface { BeginTx }
pkg database/sql/driver, type ConnBeginTx interface, BeginTx(context.Context, TxOptions) (Tx, error)
pkg database/sql/driver, type ConnPrepareContext interface { PrepareContext }
pkg database/sql/driver, type ConnPrepareContext interface, PrepareContext(context.Context, string) (Stmt, error)
pkg database/sql/driver, type ExecerContext interface { ExecContext }
pkg database/sql/driver, type ExecerContext interface, ExecContext(context.Context, string, []NamedValue) (Result, error)
pkg database/sql/driver, type IsolationLevel int
pkg database/sql/driver, type NamedValue struct
pkg database/sql/driver, type NamedValue struct, Name string
pkg database/sql/driver, type NamedValue struct, Ordinal int
pkg database/sql/driver, type NamedValue struct, Value Value
pkg database/sql/driver, type Pinger interface { Ping }
pkg database/sql/driver, type Pinger interface, Ping(context.Context) error
pkg database/sql/driver, type QueryerContext interface { QueryContext }
pkg database/sql/driver, type QueryerContext interface, QueryContext(context.Context, string, []NamedValue) (Rows, error)
pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface { Close, ColumnTypeDatabaseTypeName, Columns, Next }
pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, Close() error
pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, Columns() []string
pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, ColumnTypeDatabaseTypeName(int) string
pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, Next([]Value) error
pkg database/sql/driver, type RowsColumnTypeLength interface { Close, ColumnTypeLength, Columns, Next }
pkg database/sql/driver, type RowsColumnTypeLength interface, Close() error
pkg database/sql/driver, type RowsColumnTypeLength interface, Columns() []string
pkg database/sql/driver, type RowsColumnTypeLength interface, ColumnTypeLength(int) (int64, bool)
pkg database/sql/driver, type RowsColumnTypeLength interface, Next([]Value) error
pkg database/sql/driver, type RowsColumnTypeNullable interface { Close, ColumnTypeNullable, Columns, Next }
pkg database/sql/driver, type RowsColumnTypeNullable interface, Close() error
pkg database/sql/driver, type RowsColumnTypeNullable interface, Columns() []string
pkg database/sql/driver, type RowsColumnTypeNullable interface, ColumnTypeNullable(int) (bool, bool)
pkg database/sql/driver, type RowsColumnTypeNullable interface, Next([]Value) error
pkg database/sql/driver, type RowsColumnTypePrecisionScale interface { Close, ColumnTypePrecisionScale, Columns, Next }
pkg database/sql/driver, type RowsColumnTypePrecisionScale interface, Close() error
pkg database/sql/driver, type RowsColumnTypePrecisionScale interface, Columns() []string
pkg database/sql/driver, type RowsColumnTypePrecisionScale interface, ColumnTypePrecisionScale(int) (int64, int64, bool)
pkg database/sql/driver, type RowsColumnTypePrecisionScale interface, Next([]Value) error
pkg database/sql/driver, type RowsColumnTypeScanType interface { Close, ColumnTypeScanType, Columns, Next }
pkg database/sql/driver, type RowsColumnTypeScanType interface, Close() error
pkg database/sql/driver, type RowsColumnTypeScanType interface, Columns() []string
pkg database/sql/driver, type RowsColumnTypeScanType interface, ColumnTypeScanType(int) reflect.Type
pkg database/sql/driver, type RowsColumnTypeScanType interface, Next([]Value) error
pkg database/sql/driver, type RowsNextResultSet interface { Close, Columns, HasNextResultSet, Next, NextResultSet }
pkg database/sql/driver, type RowsNextResultSet interface, Close() error
pkg database/sql/driver, type RowsNextResultSet interface, Columns() []string
pkg database/sql/driver, type RowsNextResultSet interface, HasNextResultSet() bool
pkg database/sql/driver, type RowsNextResultSet interface, NextResultSet() error
pkg database/sql/driver, type RowsNextResultSet interface, Next([]Value) error
pkg database/sql/driver, type StmtExecContext interface { ExecContext }
pkg database/sql/driver, type StmtExecContext interface, ExecContext(context.Context, []NamedValue) (Result, error)
pkg database/sql/driver, type StmtQueryContext interface { QueryContext }
pkg database/sql/driver, type StmtQueryContext interface, QueryContext(context.Context, []NamedValue) (Rows, error)
pkg database/sql/driver, type TxOptions struct
pkg database/sql/driver, type TxOptions struct, Isolation IsolationLevel
pkg database/sql/driver, type TxOptions struct, ReadOnly bool
pkg database/sql, func Named(string, interface{}) NamedArg
pkg database/sql, method (*ColumnType) DatabaseTypeName() string
pkg database/sql, method (*ColumnType) DecimalSize() (int64, int64, bool)
pkg database/sql, method (*ColumnType) Length() (int64, bool)
pkg database/sql, method (*ColumnType) Name() string
pkg database/sql, method (*ColumnType) Nullable() (bool, bool)
pkg database/sql, method (*ColumnType) ScanType() reflect.Type
pkg database/sql, method (*DB) BeginTx(context.Context, *TxOptions) (*Tx, error)
pkg database/sql, method (*DB) ExecContext(context.Context, string, ...interface{}) (Result, error)
pkg database/sql, method (*DB) PingContext(context.Context) error
pkg database/sql, method (*DB) PrepareContext(context.Context, string) (*Stmt, error)
pkg database/sql, method (*DB) QueryContext(context.Context, string, ...interface{}) (*Rows, error)
pkg database/sql, method (*DB) QueryRowContext(context.Context, string, ...interface{}) *Row
pkg database/sql, method (*Rows) ColumnTypes() ([]*ColumnType, error)
pkg database/sql, method (*Rows) NextResultSet() bool
pkg database/sql, method (*Stmt) ExecContext(context.Context, ...interface{}) (Result, error)
pkg database/sql, method (*Stmt) QueryContext(context.Context, ...interface{}) (*Rows, error)
pkg database/sql, method (*Stmt) QueryRowContext(context.Context, ...interface{}) *Row
pkg database/sql, method (*Tx) ExecContext(context.Context, string, ...interface{}) (Result, error)
pkg database/sql, method (*Tx) PrepareContext(context.Context, string) (*Stmt, error)
pkg database/sql, method (*Tx) QueryContext(context.Context, string, ...interface{}) (*Rows, error)
pkg database/sql, method (*Tx) QueryRowContext(context.Context, string, ...interface{}) *Row
pkg database/sql, method (*Tx) StmtContext(context.Context, *Stmt) *Stmt
pkg database/sql, type ColumnType struct
pkg database/sql, type IsolationLevel int
pkg database/sql, type NamedArg struct
pkg database/sql, type NamedArg struct, Name string
pkg database/sql, type NamedArg struct, Value interface{}
pkg database/sql, type TxOptions struct
pkg database/sql, type TxOptions struct, Isolation IsolationLevel
pkg database/sql, type TxOptions struct, ReadOnly bool
pkg debug/pe, method (*COFFSymbol) FullName(StringTable) (string, error)
pkg debug/pe, method (StringTable) String(uint32) (string, error)
pkg debug/pe, type File struct, COFFSymbols []COFFSymbol
pkg debug/pe, type File struct, StringTable StringTable
pkg debug/pe, type Reloc struct
pkg debug/pe, type Reloc struct, SymbolTableIndex uint32
pkg debug/pe, type Reloc struct, Type uint16
pkg debug/pe, type Reloc struct, VirtualAddress uint32
pkg debug/pe, type Section struct, Relocs []Reloc
pkg debug/pe, type StringTable []uint8
pkg encoding/base64, method (Encoding) Strict() *Encoding
pkg encoding/json, method (RawMessage) MarshalJSON() ([]uint8, error)
pkg encoding/json, type UnmarshalTypeError struct, Field string
pkg encoding/json, type UnmarshalTypeError struct, Struct string
pkg expvar, func Handler() http.Handler
pkg expvar, method (*Float) Value() float64
pkg expvar, method (Func) Value() interface{}
pkg expvar, method (*Int) Value() int64
pkg expvar, method (*String) Value() string
pkg go/doc, func IsPredeclared(string) bool
pkg go/types, func Default(Type) Type
pkg go/types, func IdenticalIgnoreTags(Type, Type) bool
pkg math/big, method (*Float) Scan(fmt.ScanState, int32) error
pkg math/big, method (*Int) Sqrt(*Int) *Int
pkg math/rand, func Uint64() uint64
pkg math/rand, method (*Rand) Uint64() uint64
pkg math/rand, type Source64 interface, Int63() int64
pkg math/rand, type Source64 interface { Int63, Seed, Uint64 }
pkg math/rand, type Source64 interface, Seed(int64)
pkg math/rand, type Source64 interface, Uint64() uint64
pkg net/http, const TrailerPrefix ideal-string
pkg net/http, const TrailerPrefix = "Trailer:"
pkg net/http/httptrace, type ClientTrace struct, TLSHandshakeDone func(tls.ConnectionState, error)
pkg net/http/httptrace, type ClientTrace struct, TLSHandshakeStart func()
pkg net/http/httputil, type ReverseProxy struct, ModifyResponse func(*http.Response) error
pkg net/http, method (*Server) Close() error
pkg net/http, method (*Server) Shutdown(context.Context) error
pkg net/http, type Pusher interface { Push }
pkg net/http, type Pusher interface, Push(string, *PushOptions) error
pkg net/http, type PushOptions struct
pkg net/http, type PushOptions struct, Header Header
pkg net/http, type PushOptions struct, Method string
pkg net/http, type Request struct, GetBody func() (io.ReadCloser, error)
pkg net/http, type Server struct, IdleTimeout time.Duration
pkg net/http, type Server struct, ReadHeaderTimeout time.Duration
pkg net/http, type Transport struct, ProxyConnectHeader Header
pkg net/http, var ErrAbortHandler error
pkg net/http, var ErrServerClosed error
pkg net/http, var NoBody noBody
pkg net/mail, func ParseDate(string) (time.Time, error)
pkg net, method (*Buffers) Read([]uint8) (int, error)
pkg net, method (*Buffers) WriteTo(io.Writer) (int64, error)
pkg net, method (*Resolver) LookupAddr(context.Context, string) ([]string, error)
pkg net, method (*Resolver) LookupCNAME(context.Context, string) (string, error)
pkg net, method (*Resolver) LookupHost(context.Context, string) ([]string, error)
pkg net, method (*Resolver) LookupIPAddr(context.Context, string) ([]IPAddr, error)
pkg net, method (*Resolver) LookupMX(context.Context, string) ([]*MX, error)
pkg net, method (*Resolver) LookupNS(context.Context, string) ([]*NS, error)
pkg net, method (*Resolver) LookupPort(context.Context, string, string) (int, error)
pkg net, method (*Resolver) LookupSRV(context.Context, string, string, string) (string, []*SRV, error)
pkg net, method (*Resolver) LookupTXT(context.Context, string) ([]string, error)
pkg net, method (*UnixListener) SetUnlinkOnClose(bool)
pkg net, type Buffers [][]uint8
pkg net, type Dialer struct, Resolver *Resolver
pkg net, type Resolver struct
pkg net, type Resolver struct, PreferGo bool
pkg net/url, func PathEscape(string) string
pkg net/url, func PathUnescape(string) (string, error)
pkg net/url, method (*URL) Hostname() string
pkg net/url, method (*URL) MarshalBinary() ([]uint8, error)
pkg net/url, method (*URL) Port() string
pkg net/url, method (*URL) UnmarshalBinary([]uint8) error
pkg net, var DefaultResolver *Resolver
pkg os, func Executable() (string, error)
pkg os, var ErrClosed error
pkg plugin, func Open(string) (*Plugin, error)
pkg plugin, method (*Plugin) Lookup(string) (Symbol, error)
pkg plugin, type Plugin struct
pkg plugin, type Symbol interface {}
pkg reflect, func Swapper(interface{}) func(int, int)
pkg runtime, func MutexProfile([]BlockProfileRecord) (int, bool)
pkg runtime, func SetMutexProfileFraction(int) int
pkg runtime, type MemStats struct, NumForcedGC uint32
pkg sort, func Slice(interface{}, func(int, int) bool)
pkg sort, func SliceIsSorted(interface{}, func(int, int) bool) bool
pkg sort, func SliceStable(interface{}, func(int, int) bool)
pkg syscall (linux-arm-cgo), func TimevalToNsec(Timeval) int64
pkg syscall (linux-arm), func TimevalToNsec(Timeval) int64
pkg syscall (openbsd-386), const SYS_KILL = 122
pkg syscall (openbsd-386-cgo), const SYS_KILL = 122
pkg syscall (openbsd-amd64), const SYS_KILL = 122
pkg syscall (openbsd-amd64-cgo), const SYS_KILL = 122
pkg syscall (windows-386), const ERROR_DIR_NOT_EMPTY = 145
pkg syscall (windows-386), const ERROR_DIR_NOT_EMPTY Errno
pkg syscall (windows-amd64), const ERROR_DIR_NOT_EMPTY = 145
pkg syscall (windows-amd64), const ERROR_DIR_NOT_EMPTY Errno
pkg testing, func CoverMode() string
pkg testing, func MainStart(testDeps, []InternalTest, []InternalBenchmark, []InternalExample) *M
pkg testing, method (*B) Name() string
pkg testing, method (*T) Name() string
pkg testing, type TB interface, Name() string
pkg time, func Until(Time) Duration

View File

@@ -97,14 +97,13 @@ a tool like the go command to look at an unfamiliar import path and
deduce where to obtain the source code.</p>
<p>Second, the place to store sources in the local file system is derived
in a known way from the import path, specifically
<code>$GOPATH/src/&lt;import-path&gt;</code>.
If unset, <code>$GOPATH</code> defaults to a subdirectory
named <code>go</code> in the user's home directory.
in a known way from the import path. Specifically, the first choice
is <code>$GOPATH/src/&lt;import-path&gt;</code>. If <code>$GOPATH</code> is
unset, the go command will fall back to storing source code alongside the
standard Go packages, in <code>$GOROOT/src/&lt;import-path&gt;</code>.
If <code>$GOPATH</code> is set to a list of paths, the go command tries
<code>&lt;dir&gt;/src/&lt;import-path&gt;</code> for each of the directories in
that list.
</p>
that list.</p>
<p>Each of those trees contains, by convention, a top-level directory named
"<code>bin</code>", for holding compiled executables, and a top-level directory
@@ -138,26 +137,41 @@ to the use of a specific tool chain.</p>
<h2>Getting started with the go command</h2>
<p>Finally, a quick tour of how to use the go command.
As mentioned above, the default <code>$GOPATH</code> on Unix is <code>$HOME/go</code>.
We'll store our programs there.
To use a different location, you can set <code>$GOPATH</code>;
see <a href="/doc/code.html">How to Write Go Code</a> for details.
<p>Finally, a quick tour of how to use the go command, to supplement
the information in <a href="/doc/code.html">How to Write Go Code</a>,
which you might want to read first. Assuming you want
to keep your source code separate from the Go distribution source
tree, the first step is to set <code>$GOPATH</code>, the one piece of global
configuration that the go command needs. The <code>$GOPATH</code> can be a
list of directories, but by far the most common usage should be to set it to a
single directory. In particular, you do not need a separate entry in
<code>$GOPATH</code> for each of your projects. One <code>$GOPATH</code> can
support many projects.</p>
<p>We first add some source code. Suppose we want to use
<p>Heres an example. Lets say we decide to keep our Go code in the directory
<code>$HOME/mygo</code>. We need to create that directory and set
<code>$GOPATH</code> accordingly.</p>
<pre>
$ mkdir $HOME/mygo
$ export GOPATH=$HOME/mygo
$
</pre>
<p>Into this directory, we now add some source code. Suppose we want to use
the indexing library from the codesearch project along with a left-leaning
red-black tree. We can install both with the "<code>go get</code>"
subcommand:</p>
<pre>
$ go get github.com/google/codesearch/index
$ go get code.google.com/p/codesearch/index
$ go get github.com/petar/GoLLRB/llrb
$
</pre>
<p>Both of these projects are now downloaded and installed into <code>$HOME/go</code>,
which contains the two directories
<code>src/github.com/google/codesearch/index/</code> and
<p>Both of these projects are now downloaded and installed into our
<code>$GOPATH</code> directory. The one tree now contains the two directories
<code>src/code.google.com/p/codesearch/index/</code> and
<code>src/github.com/petar/GoLLRB/llrb/</code>, along with the compiled
packages (in <code>pkg/</code>) for those libraries and their dependencies.</p>
@@ -170,14 +184,13 @@ the pattern "<code>./...</code>" means start in the current directory
("<code>...</code>"):</p>
<pre>
$ cd $HOME/go/src
$ go list ./...
github.com/google/codesearch/cmd/cgrep
github.com/google/codesearch/cmd/cindex
github.com/google/codesearch/cmd/csearch
github.com/google/codesearch/index
github.com/google/codesearch/regexp
github.com/google/codesearch/sparse
code.google.com/p/codesearch/cmd/cgrep
code.google.com/p/codesearch/cmd/cindex
code.google.com/p/codesearch/cmd/csearch
code.google.com/p/codesearch/index
code.google.com/p/codesearch/regexp
code.google.com/p/codesearch/sparse
github.com/petar/GoLLRB/example
github.com/petar/GoLLRB/llrb
$
@@ -187,12 +200,12 @@ $
<pre>
$ go test ./...
? github.com/google/codesearch/cmd/cgrep [no test files]
? github.com/google/codesearch/cmd/cindex [no test files]
? github.com/google/codesearch/cmd/csearch [no test files]
ok github.com/google/codesearch/index 0.203s
ok github.com/google/codesearch/regexp 0.017s
? github.com/google/codesearch/sparse [no test files]
? code.google.com/p/codesearch/cmd/cgrep [no test files]
? code.google.com/p/codesearch/cmd/cindex [no test files]
? code.google.com/p/codesearch/cmd/csearch [no test files]
ok code.google.com/p/codesearch/index 0.239s
ok code.google.com/p/codesearch/regexp 0.021s
? code.google.com/p/codesearch/sparse [no test files]
? github.com/petar/GoLLRB/example [no test files]
ok github.com/petar/GoLLRB/llrb 0.231s
$
@@ -202,18 +215,18 @@ $
current directory:</p>
<pre>
$ cd github.com/google/codesearch/regexp
$ cd $GOPATH/src/code.google.com/p/codesearch/regexp
$ go list
github.com/google/codesearch/regexp
code.google.com/p/codesearch/regexp
$ go test -v
=== RUN TestNstateEnc
--- PASS: TestNstateEnc (0.00s)
=== RUN TestMatch
--- PASS: TestMatch (0.00s)
=== RUN TestGrep
--- PASS: TestGrep (0.00s)
=== RUN TestNstateEnc
--- PASS: TestNstateEnc (0.00 seconds)
=== RUN TestMatch
--- PASS: TestMatch (0.01 seconds)
=== RUN TestGrep
--- PASS: TestGrep (0.00 seconds)
PASS
ok github.com/google/codesearch/regexp 0.018s
ok code.google.com/p/codesearch/regexp 0.021s
$ go install
$
</pre>
@@ -231,6 +244,9 @@ pick such a long name, but that ability would require additional configuration
and complexity in the tool. Typing an extra directory name or two is a small
price to pay for the increased simplicity and power.</p>
<p>As the example shows, its fine to work with packages from many different
projects at once within a single <code>$GOPATH</code> root directory.</p>
<h2>Limitations</h2>
<p>As mentioned above, the go command is not a general-purpose build
@@ -239,7 +255,8 @@ In particular, it does not have any facility for generating Go
source files <em>during</em> a build, although it does provide
<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
<code>generate</code></a>,
which can automate the creation of Go files <em>before</em> the build.
which can automate the creation of Go files <em>before</em>
the build, such as by running <code>yacc</code>.
For more advanced build setups, you may need to write a
makefile (or a configuration file for the build tool of your choice)
to run whatever tool creates the Go files and then check those generated source files

View File

@@ -12,7 +12,7 @@ The document is not comprehensive.
<p>
The assembler is based on the input style of the Plan 9 assemblers, which is documented in detail
<a href="https://9p.io/sys/doc/asm.html">elsewhere</a>.
<a href="http://plan9.bell-labs.com/sys/doc/asm.html">elsewhere</a>.
If you plan to write assembly language, you should read that document although much of it is Plan 9-specific.
The current document provides a summary of the syntax and the differences with
what is explained in that document, and
@@ -23,7 +23,7 @@ describes the peculiarities that apply when writing assembly code to interact wi
The most important thing to know about Go's assembler is that it is not a direct representation of the underlying machine.
Some of the details map precisely to the machine, but some do not.
This is because the compiler suite (see
<a href="https://9p.io/sys/doc/compiler.html">this description</a>)
<a href="http://plan9.bell-labs.com/sys/doc/compiler.html">this description</a>)
needs no assembler pass in the usual pipeline.
Instead, the compiler operates on a kind of semi-abstract instruction set,
and instruction selection occurs partly after code generation.
@@ -176,7 +176,7 @@ This form is used to name global functions and data.
Adding <code>&lt;&gt;</code> to the name, as in <span style="white-space: nowrap"><code>foo&lt;&gt;(SB)</code></span>, makes the name
visible only in the current source file, like a top-level <code>static</code> declaration in a C file.
Adding an offset to the name refers to that offset from the symbol's address, so
<code>foo+4(SB)</code> is four bytes past the start of <code>foo</code>.
<code>a+4(SB)</code> is four bytes past the start of <code>foo</code>.
</p>
<p>
@@ -510,13 +510,6 @@ the stack pointer may change during any function call:
even pointers to stack data must not be kept in local variables.
</p>
<p>
Assembly functions should always be given Go prototypes,
both to provide pointer information for the arguments and results
and to let <code>go</code> <code>vet</code> check that
the offsets being used to access them are correct.
</p>
<h2 id="architectures">Architecture-specific details</h2>
<p>
@@ -621,15 +614,6 @@ These modes accept only 1, 2, 4, and 8 as scale factors.
</ul>
<p>
When using the compiler and assembler's
<code>-dynlink</code> or <code>-shared</code> modes,
any load or store of a fixed memory location such as a global variable
must be assumed to overwrite <code>CX</code>.
Therefore, to be safe for use with these modes,
assembly sources should typically avoid CX except between memory references.
</p>
<h3 id="amd64">64-bit Intel 386 (a.k.a. amd64)</h3>
<p>
@@ -780,102 +764,6 @@ mode as on the x86, but the only scale allowed is <code>1</code>.
</ul>
<h3 id="s390x">IBM z/Architecture, a.k.a. s390x</h3>
<p>
The registers <code>R10</code> and <code>R11</code> are reserved.
The assembler uses them to hold temporary values when assembling some instructions.
</p>
<p>
<code>R13</code> points to the <code>g</code> (goroutine) structure.
This register must be referred to as <code>g</code>; the name <code>R13</code> is not recognized.
</p>
<p>
<code>R15</code> points to the stack frame and should typically only be accessed using the
virtual registers <code>SP</code> and <code>FP</code>.
</p>
<p>
Load- and store-multiple instructions operate on a range of registers.
The range of registers is specified by a start register and an end register.
For example, <code>LMG</code> <code>(R9),</code> <code>R5,</code> <code>R7</code> would load
<code>R5</code>, <code>R6</code> and <code>R7</code> with the 64-bit values at
<code>0(R9)</code>, <code>8(R9)</code> and <code>16(R9)</code> respectively.
</p>
<p>
Storage-and-storage instructions such as <code>MVC</code> and <code>XC</code> are written
with the length as the first argument.
For example, <code>XC</code> <code>$8,</code> <code>(R9),</code> <code>(R9)</code> would clear
eight bytes at the address specified in <code>R9</code>.
</p>
<p>
If a vector instruction takes a length or an index as an argument then it will be the
first argument.
For example, <code>VLEIF</code> <code>$1,</code> <code>$16,</code> <code>V2</code> will load
the value sixteen into index one of <code>V2</code>.
Care should be taken when using vector instructions to ensure that they are available at
runtime.
To use vector instructions a machine must have both the vector facility (bit 129 in the
facility list) and kernel support.
Without kernel support a vector instruction will have no effect (it will be equivalent
to a <code>NOP</code> instruction).
</p>
<p>
Addressing modes:
</p>
<ul>
<li>
<code>(R5)(R6*1)</code>: The location at <code>R5</code> plus <code>R6</code>.
It is a scaled mode as on the x86, but the only scale allowed is <code>1</code>.
</li>
</ul>
<h3 id="mips">MIPS, MIPS64</h3>
<p>
General purpose registers are named <code>R0</code> through <code>R31</code>,
floating point registers are <code>F0</code> through <code>F31</code>.
</p>
<p>
<code>R30</code> is reserved to point to <code>g</code>.
<code>R23</code> is used as a temporary register.
</p>
<p>
In a <code>TEXT</code> directive, the frame size <code>$-4</code> for MIPS or
<code>$-8</code> for MIPS64 instructs the linker not to save <code>LR</code>.
</p>
<p>
<code>SP</code> refers to the virtual stack pointer.
For the hardware register, use <code>R29</code>.
</p>
<p>
Addressing modes:
</p>
<ul>
<li>
<code>16(R1)</code>: The location at <code>R1</code> plus 16.
</li>
<li>
<code>(R1)</code>: Alias for <code>0(R1)</code>.
</li>
</ul>
<h3 id="unsupported_opcodes">Unsupported opcodes</h3>
<p>

View File

@@ -89,7 +89,7 @@ gofmt</a> command with more general options.</td>
</tr>
<tr>
<td><a href="/cmd/vet/">vet</a></td>
<td><a href="//godoc.org/golang.org/x/tools/cmd/vet/">vet</a></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Vet examines Go source code and reports suspicious constructs, such as Printf
calls whose arguments do not align with the format string.</td>

View File

@@ -24,31 +24,21 @@ A similar explanation is available as a
<h2 id="Organization">Code organization</h2>
<h3 id="Overview">Overview</h3>
<ul>
<li>Go programmers typically keep all their Go code in a single <i>workspace</i>.</li>
<li>A workspace contains many version control <i>repositories</i>
(managed by Git, for example).</li>
<li>Each repository contains one or more <i>packages</i>.</li>
<li>Each package consists of one or more Go source files in a single directory.</li>
<li>The path to a package's directory determines its <i>import path</i>.</li>
</ul>
<p>
Note that this differs from other programming environments in which every
project has a separate workspace and workspaces are closely tied to version
control repositories.
</p>
<h3 id="Workspaces">Workspaces</h3>
<p>
The <code>go</code> tool is designed to work with open source code maintained
in public repositories. Although you don't need to publish your code, the model
for how the environment is set up works the same whether you do or not.
</p>
<p>
Go code must be kept inside a <i>workspace</i>.
A workspace is a directory hierarchy with three directories at its root:
</p>
<ul>
<li><code>src</code> contains Go source files,
<li><code>src</code> contains Go source files organized into packages (one package per directory),
<li><code>pkg</code> contains package objects, and
<li><code>bin</code> contains executable commands.
</ul>
@@ -87,25 +77,16 @@ src/
stringutil/
reverse.go # package source
reverse_test.go # test source
<a href="https://golang.org/x/image/">golang.org/x/image/</a>
.git/ # Git repository metadata
bmp/
reader.go # package source
writer.go # package source
... (many more repositories and packages omitted) ...
</pre>
<p>
The tree above shows a workspace containing two repositories
(<code>example</code> and <code>image</code>).
The <code>example</code> repository contains two commands (<code>hello</code>
and <code>outyet</code>) and one library (<code>stringutil</code>).
The <code>image</code> repository contains the <code>bmp</code> package
and <a href="https://godoc.org/golang.org/x/image">several others</a>.
This workspace contains one repository (<code>example</code>)
comprising two commands (<code>hello</code> and <code>outyet</code>)
and one library (<code>stringutil</code>).
</p>
<p>
A typical workspace contains many source repositories containing many
A typical workspace would contain many source repositories containing many
packages and commands. Most Go programmers keep <i>all</i> their Go source code
and dependencies in a single workspace.
</p>
@@ -120,65 +101,42 @@ We will discuss the distinction <a href="#PackageNames">later</a>.
<p>
The <code>GOPATH</code> environment variable specifies the location of your
workspace. It defaults to a directory named <code>go</code> inside your home directory,
so <code>$HOME/go</code> on Unix,
<code>$home/go</code> on Plan 9,
and <code>%USERPROFILE%\go</code> (usually <code>C:\Users\YourName\go</code>) on Windows.
If you would like to work in a different location, you will need to set
<code>GOPATH</code> to the path to that directory.
(Another common setup is to set <code>GOPATH=$HOME</code>.)
Note that <code>GOPATH</code> must <b>not</b> be the
same path as your Go installation.
workspace. It is likely the only environment variable you'll need to set
when developing Go code.
</p>
<p>
The command <code>go</code> <code>env</code> <code>GOPATH</code>
prints the effective current <code>GOPATH</code>;
it prints the default location if the environment variable is unset.
To get started, create a workspace directory and set <code>GOPATH</code>
accordingly. Your workspace can be located wherever you like, but we'll use
<code>$HOME/work</code> in this document. Note that this must <b>not</b> be the
same path as your Go installation.
(Another common setup is to set <code>GOPATH=$HOME</code>.)
</p>
<pre>
$ <b>mkdir $HOME/work</b>
$ <b>export GOPATH=$HOME/work</b>
</pre>
<p>
For convenience, add the workspace's <code>bin</code> subdirectory
to your <code>PATH</code>:
</p>
<pre>
$ <b>export PATH=$PATH:$(go env GOPATH)/bin</b>
$ <b>export PATH=$PATH:$GOPATH/bin</b>
</pre>
<p>
The scripts in the rest of this document use <code>$GOPATH</code>
instead of <code>$(go env GOPATH)</code> for brevity.
To make the scripts run as written
if you have not set GOPATH,
you can substitute $HOME/go in those commands
or else run:
To learn more about setting up the <code>GOPATH</code> environment variable,
please see
<a href="/cmd/go/#hdr-GOPATH_environment_variable"><code>go help gopath</code></a>
</p>
<pre>
$ <b>export GOPATH=$(go env GOPATH)</b>
</pre>
<h3 id="PackagePaths">Package paths</h3>
<p>
To learn more about the <code>GOPATH</code> environment variable, see
<a href="/cmd/go/#hdr-GOPATH_environment_variable"><code>'go help gopath'</code></a>.
</p>
<p>
To use a custom workspace location,
<a href="https://golang.org/wiki/SettingGOPATH">set the <code>GOPATH</code> environment variable</a>.
</p>
<h3 id="ImportPaths">Import paths</h3>
<p>
An <i>import path</i> is a string that uniquely identifies a package.
A package's import path corresponds to its location inside a workspace
or in a remote repository (explained below).
</p>
<p>
The packages from the standard library are given short import paths such as
The packages from the standard library are given short paths such as
<code>"fmt"</code> and <code>"net/http"</code>.
For your own packages, you must choose a base path that is unlikely to
collide with future additions to the standard library or other external

View File

@@ -1,4 +1,4 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -91,7 +91,7 @@
The full address syntax is summarized in this table
(an excerpt of Table II from
<a href="https://9p.io/sys/doc/sam/sam.html">The text editor <code>sam</code></a>):
<a href="http://plan9.bell-labs.com/sys/doc/sam/sam.html">The text editor <code>sam</code></a>):
<br/><br/>
<table>

View File

@@ -1,4 +1,4 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,5 +1,5 @@
<!--
Copyright 2011 The Go Authors. All rights reserved.
Copyright 2011 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->

View File

@@ -20,8 +20,8 @@ ul ul {
<p>
Online communities include people from many different backgrounds.
The Go contributors are committed to providing a friendly, safe and welcoming
environment for all, regardless of age, disability, gender, nationality,
ethnicity, religion, sexuality, or similar personal characteristic.
environment for all, regardless of age, disability, gender, nationality, race,
religion, sexuality, or similar personal characteristic.
</p>
<p>
@@ -67,6 +67,7 @@ official forums operated by the Go project (“Go spaces”):
<li>The <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a> and
<a href="https://groups.google.com/group/golang-dev">golang-dev</a> mailing lists.
<li>The #go-nuts IRC channel on Freenode.
<li>The <a href="https://reddit.com/r/golang">/r/golang subreddit</a>.
</ul>
<p>
@@ -158,7 +159,7 @@ values”.
If you conduct yourself in a way that is explicitly forbidden by the CoC,
you will be warned and asked to stop.
If you do not stop, you will be removed from our community spaces temporarily.
Repeated, willful breaches of the CoC will result in a permanent ban.
Repeated, wilful breaches of the CoC will result in a permanent ban.
</p>
<p>

View File

@@ -34,8 +34,6 @@ We encourage all Go users to subscribe to
<p>A <a href="/doc/devel/release.html">summary</a> of the changes between Go releases. Notes for the major releases:</p>
<ul>
<li><a href="/doc/go1.7">Go 1.7</a> <small>(August 2016)</small></li>
<li><a href="/doc/go1.6">Go 1.6</a> <small>(February 2016)</small></li>
<li><a href="/doc/go1.5">Go 1.5</a> <small>(August 2015)</small></li>
<li><a href="/doc/go1.4">Go 1.4</a> <small>(December 2014)</small></li>
<li><a href="/doc/go1.3">Go 1.3</a> <small>(June 2014)</small></li>
@@ -69,6 +67,9 @@ href="https://groups.google.com/group/golang-nuts">golang-nuts</a>.</p>
<h3 id="golang-checkins"><a href="https://groups.google.com/group/golang-checkins">Checkins Mailing List</a></h3>
<p>A mailing list that receives a message summarizing each checkin to the Go repository.</p>
<h3 id="golang-bugs"><a href="https://groups.google.com/group/golang-bugs">Bugs Mailing List</a></h3>
<p>A mailing list that receives each update to the Go <a href="//golang.org/issue">issue tracker</a>.</p>
<h3 id="build_status"><a href="//build.golang.org/">Build Status</a></h3>
<p>View the status of Go builds across the supported operating
systems and architectures.</p>

View File

@@ -16,10 +16,6 @@ have <a href="code.html">written and tested your code</a>.
see <a href="gccgo_contribute.html">Contributing to gccgo</a>.)
</p>
<p>
Sensitive security-related issues should be reported to <a href="mailto:security@golang.org">security@golang.org</a>.
</p>
<h2 id="Design">Discuss your design</h2>
<p>
@@ -82,10 +78,10 @@ no matter who makes the change.
A custom git command called <code>git-codereview</code>,
discussed below, helps manage the code review process through a Google-hosted
<a href="https://go-review.googlesource.com/">instance</a> of the code review
system called <a href="https://www.gerritcodereview.com/">Gerrit</a>.
system called <a href="https://code.google.com/p/gerrit/">Gerrit</a>.
</p>
<h3 id="auth">Set up authentication for code review</h3>
<h3>Set up authentication for code review</h3>
<p>
Gerrit uses Google Accounts for authentication. If you don't have
@@ -124,7 +120,7 @@ Your secret authentication token is now in a <code>.gitcookie</code> file
and Git is configured to use this file.
</p>
<h3 id="gerrit">Register with Gerrit</h3>
<h3>Register with Gerrit</h3>
<p>
Now that you have your authentication token,
@@ -136,7 +132,7 @@ to Google Accounts. Sign in using the same Google Account you used above.
That is all that is required.
</p>
<h3 id="cla">Contributor License Agreement</h3>
<h3>Contributor License Agreement</h3>
<p>Gerrit serves as the gatekeeper and uses your e-mail address as the key.
To send your first change to the Go project from a given address,
@@ -171,14 +167,7 @@ you can create one by clicking "New Contributor Agreement" and following the ste
This rigmarole only needs to be done for your first submission for each email address.
</p>
<p>
If the copyright holder for the code you are submitting changes—for example,
if you start contributing code on behalf of a new company—please send email
to let us know, so that we can make sure an appropriate agreement is completed
and update the <code>AUTHORS</code> file.
</p>
<h3 id="git-codereview">Install the git-codereview command</h3>
<h3>Install the git-codereview command</h3>
<p>
Now install the <code>git-codereview</code> command by running,
@@ -202,13 +191,9 @@ prints help text, not an error.
</p>
<p>
<b>Note to Git aficionados:</b>
The <code>git-codereview</code> command is not required to
Note to Git aficionados: The <code>git-codereview</code> command is not required to
upload and manage Gerrit code reviews. For those who prefer plain Git, the text
below gives the Git equivalent of each git-codereview command.
</p>
<p>If you do use plain
below gives the Git equivalent of each git-codereview command. If you do use plain
Git, note that you still need the commit hooks that the git-codereview command
configures; those hooks add a Gerrit <code>Change-Id</code> line to the commit
message and check that all Go source files have been formatted with gofmt. Even
@@ -216,13 +201,7 @@ if you intend to use plain Git for daily work, install the hooks in a new Git
checkout by running <code>git-codereview</code> <code>hooks</code>.
</p>
<p>
The workflow described below assumes a single change per branch.
It is also possible to prepare a sequence of (usually related) changes in a single branch.
See the <a href="https://golang.org/x/review/git-codereview">git-codereview documentation</a> for details.
</p>
<h3 id="git-config">Set up git aliases</h3>
<h3>Set up git aliases</h3>
<p>
The <code>git-codereview</code> command can be run directly from the shell
@@ -264,7 +243,7 @@ To install them, copy this text into your Git configuration file
sync = codereview sync
</pre>
<h3 id="help">Understanding the git-codereview command</h3>
<h3>Understanding the git-codereview command</h3>
<p>After installing the <code>git-codereview</code> command, you can run</p>
@@ -277,7 +256,7 @@ to learn more about its commands.
You can also read the <a href="https://godoc.org/golang.org/x/review/git-codereview">command documentation</a>.
</p>
<h3 id="master">Switch to the master branch</h3>
<h3>Switch to the master branch</h3>
<p>
Most Go installations use a release branch, but new changes should
@@ -297,7 +276,7 @@ $ git sync
<code>git</code> <code>pull</code> <code>-r</code>.)
</p>
<h3 id="change">Make a change</h3>
<h3>Make a change</h3>
<p>
The entire checked-out tree is writable.
@@ -353,13 +332,10 @@ with a thorough description of your change.
The first line of the change description is conventionally a one-line
summary of the change, prefixed by the primary affected package,
and is used as the subject for code review mail.
It should complete the sentence "This change modifies Go to _____."
The rest of the description elaborates and should provide context for the
The rest of the
description elaborates and should provide context for the
change and explain what it does.
Write in complete sentences with correct punctuation, just like
for your comments in Go.
If there is a helpful reference, mention it here.
If you've fixed an issue, reference it by number with a # before it.
</p>
<p>
@@ -367,7 +343,7 @@ After editing, the template might now read:
</p>
<pre>
math: improve Sin, Cos and Tan precision for very large arguments
math: improved Sin, Cos and Tan precision for very large arguments
The existing implementation has poor numerical properties for
large arguments, so use the McGillicutty algorithm to improve
@@ -429,7 +405,7 @@ Do not edit or delete it.
runs <code>git</code> <code>commit</code> <code>--amend</code>.)
</p>
<h3 id="mail">Mail the change for review</h3>
<h3>Mail the change for review</h3>
<p>
Once the change is ready, mail it out for review:
@@ -479,7 +455,7 @@ remote: New Changes:
remote: https://go-review.googlesource.com/99999 math: improved Sin, Cos and Tan precision for very large arguments
</pre>
<h3 id="review">Reviewing code</h3>
<h3>Reviewing code</h3>
<p>
Running <code>git</code> <code>mail</code> will send an email to you and the
@@ -491,7 +467,7 @@ You must reply through the web interface.
(Unlike with the old Rietveld review system, replying by mail has no effect.)
</p>
<h3 id="revise">Revise and upload</h3>
<h3>Revise and upload</h3>
<p>
You must respond to review comments through the web interface.
@@ -518,7 +494,7 @@ You can see a list of your pending changes by running <code>git</code>
<code>change</code> <code><i>&lt;branch&gt;</i></code>.
</p>
<h3 id="sync">Synchronize your client</h3>
<h3>Synchronize your client</h3>
<p>
While you were working, others might have submitted changes to the repository.
@@ -601,7 +577,7 @@ might turn up:
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
if arg &lt; 1e9 {
=======
if arg &lt; 1e10 {
if arg &lh; 1e10 {
&gt;&gt;&gt;&gt;&gt;&gt;&gt; mcgillicutty
largeReduce(arg)
</pre>
@@ -636,7 +612,7 @@ Then run <code>git</code> <code>rebase</code> <code>--continue</code> to
restore the change commit.
</p>
<h3 id="download">Reviewing code by others</h3>
<h3>Reviewing code by others</h3>
<p>
You can import a change proposed by someone else into your local Git repository.
@@ -653,7 +629,7 @@ $ git fetch https://go.googlesource.com/review refs/changes/21/1221/1 &amp;&amp;
To revert, change back to the branch you were working in.
</p>
<h3 id="submit">Submit the change after the review</h3>
<h3>Submit the change after the review</h3>
<p>
After the code has been <code>LGTM</code>'ed, an approver may
@@ -672,7 +648,7 @@ the commit hashes in the repository will be changed by
the submit operation.
</p>
<h3 id="more">More information</h3>
<h3>More information</h3>
<p>
In addition to the information here, the Go community maintains a <a href="https://golang.org/wiki/CodeReview">CodeReview</a> wiki page.
@@ -698,7 +674,7 @@ These files will be periodically updated based on the commit logs.
<p>Code that you contribute should use the standard copyright header:</p>
<pre>
// Copyright 2016 The Go Authors. All rights reserved.
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
</pre>

View File

@@ -124,7 +124,7 @@ href="/src/runtime/runtime-gdb.py">src/runtime/runtime-gdb.py</a> in
the Go source distribution. It depends on some special magic types
(<code>hash&lt;T,U&gt;</code>) and variables (<code>runtime.m</code> and
<code>runtime.g</code>) that the linker
(<a href="/src/cmd/link/internal/ld/dwarf.go">src/cmd/link/internal/ld/dwarf.go</a>) ensures are described in
(<a href="/src/cmd/ld/dwarf.c">src/cmd/ld/dwarf.c</a>) ensures are described in
the DWARF code.
</p>

View File

@@ -12,101 +12,6 @@ git pull
git checkout <i>release-branch</i>
</pre>
<h2 id="policy">Release Policy</h2>
<p>
Each major Go release obsoletes and ends support for the previous one.
For example, if Go 1.5 has been released, then it is the current release
and Go 1.4 and earlier are no longer supported.
We fix critical problems in the current release as needed by issuing minor revisions
(for example, Go 1.5.1, Go 1.5.2, and so on).
</p>
<p>
As a special case, we issue minor revisions for critical security problems
in both the current release and the previous release.
For example, if Go 1.5 is the current release then we will issue minor revisions
to fix critical security problems in both Go 1.4 and Go 1.5 as they arise.
See the <a href="/security">security policy</a> for more details.
</p>
<h2 id="go1.7">go1.7 (released 2016/08/15)</h2>
<p>
Go 1.7 is a major release of Go.
Read the <a href="/doc/go1.7">Go 1.7 Release Notes</a> for more information.
</p>
<h3 id="go1.7.minor">Minor revisions</h3>
<p>
go1.7.1 (released 2016/09/07) includes fixes to the compiler, runtime,
documentation, and the <code>compress/flate</code>, <code>hash/crc32</code>,
<code>io</code>, <code>net</code>, <code>net/http</code>,
<code>path/filepath</code>, <code>reflect</code>, and <code>syscall</code>
packages.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.7.1">Go
1.7.1 milestone</a> on our issue tracker for details.
</p>
<p>
go1.7.2 should not be used. It was tagged but not fully released.
The release was deferred due to a last minute bug report.
Use go1.7.3 instead, and refer to the summary of changes below.
</p>
<p>
go1.7.3 (released 2016/10/19) includes fixes to the compiler, runtime,
and the <code>crypto/cipher</code>, <code>crypto/tls</code>,
<code>net/http</code>, and <code>strings</code> packages.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.7.3">Go
1.7.3 milestone</a> on our issue tracker for details.
</p>
<p>
go1.7.4 (released 2016/12/01) includes two security fixes.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.7.4">Go
1.7.4 milestone</a> on our issue tracker for details.
</p>
<h2 id="go1.6">go1.6 (released 2016/02/17)</h2>
<p>
Go 1.6 is a major release of Go.
Read the <a href="/doc/go1.6">Go 1.6 Release Notes</a> for more information.
</p>
<h3 id="go1.6.minor">Minor revisions</h3>
<p>
go1.6.1 (released 2016/04/12) includes two security fixes.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.6.1">Go
1.6.1 milestone</a> on our issue tracker for details.
</p>
<p>
go1.6.2 (released 2016/04/20) includes fixes to the compiler, runtime, tools,
documentation, and the <code>mime/multipart</code>, <code>net/http</code>, and
<code>sort</code> packages.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.6.2">Go
1.6.2 milestone</a> on our issue tracker for details.
</p>
<p>
go1.6.3 (released 2016/07/17) includes security fixes to the
<code>net/http/cgi</code> package and <code>net/http</code> package when used in
a CGI environment.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.6.3">Go
1.6.3 milestone</a> on our issue tracker for details.
</p>
<p>
go1.6.4 (released 2016/12/01) includes two security fixes.
It contains the same fixes as Go 1.7.4 and was released at the same time.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.7.4">Go
1.7.4 milestone</a> on our issue tracker for details.
</p>
<h2 id="go1.5">go1.5 (released 2015/08/19)</h2>
<p>
@@ -135,14 +40,8 @@ See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.5.2">Go
<p>
go1.5.3 (released 2016/01/13) includes a security fix to the <code>math/big</code> package
affecting the <code>crypto/tls</code> package.
See the <a href="https://golang.org/s/go153announce">release announcement</a> for details.
</p>
<p>
go1.5.4 (released 2016/04/12) includes two security fixes.
It contains the same fixes as Go 1.6.1 and was released at the same time.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.6.1">Go
1.6.1 milestone</a> on our issue tracker for details.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.5.3">Go 1.5.3 milestone on our issue tracker</a>
and the <a href="https://golang.org/s/go153announce">release announcement</a> for details.
</p>
<h2 id="go1.4">go1.4 (released 2014/12/10)</h2>
@@ -180,17 +79,17 @@ Read the <a href="/doc/go1.3">Go 1.3 Release Notes</a> for more information.
<p>
go1.3.1 (released 2014/08/13) includes bug fixes to the compiler and the <code>runtime</code>, <code>net</code>, and <code>crypto/rsa</code> packages.
See the <a href="https://github.com/golang/go/commits/go1.3.1">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.3&r=073fc578434bf3e1e22749b559d273c8da728ebb">change history</a> for details.
</p>
<p>
go1.3.2 (released 2014/09/25) includes bug fixes to cgo and the crypto/tls packages.
See the <a href="https://github.com/golang/go/commits/go1.3.2">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.3&r=go1.3.2">change history</a> for details.
</p>
<p>
go1.3.3 (released 2014/09/30) includes further bug fixes to cgo, the runtime package, and the nacl port.
See the <a href="https://github.com/golang/go/commits/go1.3.3">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.3&r=go1.3.3">change history</a> for details.
</p>
<h2 id="go1.2">go1.2 (released 2013/12/01)</h2>
@@ -204,12 +103,12 @@ Read the <a href="/doc/go1.2">Go 1.2 Release Notes</a> for more information.
<p>
go1.2.1 (released 2014/03/02) includes bug fixes to the <code>runtime</code>, <code>net</code>, and <code>database/sql</code> packages.
See the <a href="https://github.com/golang/go/commits/go1.2.1">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.2&r=7ada9e760ce34e78aee5b476c9621556d0fa5d31">change history</a> for details.
</p>
<p>
go1.2.2 (released 2014/05/05) includes a
<a href="https://github.com/golang/go/commits/go1.2.2">security fix</a>
<a href="//code.google.com/p/go/source/detail?r=bda3619e7a2c&repo=tools">security fix</a>
that affects the tour binary included in the binary distributions (thanks to Guillaume T).
</p>
@@ -224,17 +123,17 @@ Read the <a href="/doc/go1.1">Go 1.1 Release Notes</a> for more information.
<p>
go1.1.1 (released 2013/06/13) includes several compiler and runtime bug fixes.
See the <a href="https://github.com/golang/go/commits/go1.1.1">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.1&r=43c4a41d24382a56a90e924800c681e435d9e399">change history</a> for details.
</p>
<p>
go1.1.2 (released 2013/08/13) includes fixes to the <code>gc</code> compiler
and <code>cgo</code>, and the <code>bufio</code>, <code>runtime</code>,
<code>syscall</code>, and <code>time</code> packages.
See the <a href="https://github.com/golang/go/commits/go1.1.2">change history</a> for details.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.1&r=a6a9792f94acd4ff686b2bc57383d163608b91cf">change history</a> for details.
If you use package syscall's <code>Getrlimit</code> and <code>Setrlimit</code>
functions under Linux on the ARM or 386 architectures, please note change
<a href="//golang.org/cl/11803043">11803043</a>
<a href="//golang.org/change/55ac276af5a7">55ac276af5a7</a>
that fixes <a href="//golang.org/issue/5949">issue 5949</a>.
</p>
@@ -261,7 +160,7 @@ The go1 release corresponds to
<p>
go1.0.1 (released 2012/04/25) was issued to
<a href="//golang.org/cl/6061043">fix</a> an
<a href="//golang.org/change/a890477d3dfb">fix</a> an
<a href="//golang.org/issue/3545">escape analysis bug</a>
that can lead to memory corruption.
It also includes several minor code and documentation fixes.
@@ -280,7 +179,7 @@ go1.0.3 (released 2012/09/21) includes minor code and documentation fixes.
</p>
<p>
See the <a href="https://github.com/golang/go/commits/release-branch.go1">go1 release branch history</a> for the complete list of changes.
See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1">go1 release branch history</a> for the complete list of changes.
</p>
<h2 id="pre.go1">Older releases</h2>

View File

@@ -519,7 +519,7 @@ Other changes:
fix FreeBSD signal handling around thread creation (thanks Devon H. O'Dell),
goroutine profile, stack dumps,
implement runtime.osyield on FreeBSD 386, amd64 (thanks Devon H. O'Dell),
permit default behavior of SIGTSTP, SIGTTIN, SIGTTOU,
permit default behaviour of SIGTSTP, SIGTTIN, SIGTTOU,
release unused memory to the OS (thanks Sébastien Paolacci),
remove an obsolete file (thanks Mikio Hara).
* spec: make all comparison results untyped bool,
@@ -2450,7 +2450,7 @@ The http package's URL parsing and query escaping code (such as ParseURL and
URLEscape) has been moved to the new url package, with several simplifications
to the names. Client code can be updated automatically with gofix.
* asn1: support unmarshaling structs with int32 members (thanks Dave Cheney).
* asn1: support unmarshalling structs with int32 members (thanks Dave Cheney).
* build: allow builds without cgo or hg,
support versioning without hg (thanks Gustavo Niemeyer).
* builtin: add documentation for builtins.
@@ -3030,7 +3030,7 @@ Other changes:
* 5g: alignment fixes.
* 6l, 8l: fix Mach-O binaries with many dynamic libraries.
* 8l: emit resources (.rsrc) in Windows PE. (thanks Wei Guangjing).
* asn1: fix marshaling of empty optional RawValues (thanks Mikkel Krautz).
* asn1: fix marshalling of empty optional RawValues (thanks Mikkel Krautz).
* big: make Int and Rat implement fmt.Scanner (thanks Evan Shaw),
~8x faster number scanning,
remove some unnecessary conversions.
@@ -4157,7 +4157,7 @@ Other changes in this release:
* suffixarray: use binary search for both ends of Lookup (thanks Eric Eisner).
* syscall: add missing network interface constants (thanks Mikio Hara).
* template: treat map keys as zero, not non-existent (thanks Roger Peppe).
* time: allow canceling of After events (thanks Roger Peppe),
* time: allow cancelling of After events (thanks Roger Peppe),
support Solaris zoneinfo directory.
* token/position: added SetLinesForContent.
* unicode: update to unicode 6.0.0.
@@ -4238,7 +4238,7 @@ example: http://golang.org/pkg/xml/
<pre>
The json, gob, and template packages have changed, and code that uses them
may need to be updated after this release. They will no longer read or write
unexported struct fields. When marshaling a struct with json or gob the
unexported struct fields. When marshalling a struct with json or gob the
unexported fields will be silently ignored. Attempting to unmarshal json or
gob data into an unexported field will generate an error. Accessing an
unexported field from a template will cause the Execute function to return
@@ -5682,7 +5682,7 @@ Other changes:
pidigits ~10% performance win by using adds instead of shifts.
* time: remove incorrect time.ISO8601 and add time.RFC3339 (thanks Micah Stetson).
* utf16: add DecodeRune, EncodeRune.
* xml: add support for XML marshaling embedded structs (thanks Raif S. Naffah),
* xml: add support for XML marshalling embedded structs (thanks Raif S. Naffah),
new "innerxml" tag to collect inner XML.
</pre>
@@ -5696,7 +5696,7 @@ This release contains many changes:
* cmath: new complex math library (thanks Charles L. Dorian).
* docs: update to match current coding style (thanks Christopher Wedgwood).
* exp/eval: fix example and add target to Makefile (thanks Evan Shaw).
* fmt: change behavior of format verb %b to match %x when negative (thanks Andrei Vieru).
* fmt: change behaviour of format verb %b to match %x when negative (thanks Andrei Vieru).
* gc: compile s == "" as len(s) == 0,
distinguish fatal compiler bug from error+exit,
fix alignment on non-amd64,
@@ -5925,10 +5925,10 @@ Other changes and fixes:
* 8a/8l: Added CMOVcc instructions (thanks Evan Shaw)
* 8l: pe executable building code changed to include import table for kernel32.dll functions (thanks Alex Brainman)
* 5g/6g/8g: bug fixes
* asn1: bug fixes and additions (incl marshaling)
* asn1: bug fixes and additions (incl marshalling)
* build: fix build for Native Client, Linux/ARM
* dashboard: show benchmarks, add garbage collector benchmarks
* encoding/pem: add marshaling support
* encoding/pem: add marshalling support
* exp/draw: fast paths for a nil mask
* godoc: support for directories outside $GOROOT
* http: sort header keys when writing Response or Request to wire (thanks Petar Maymounkov)

View File

@@ -40,13 +40,7 @@ The first section covers basic syntax and data structures; the second discusses
methods and interfaces; and the third introduces Go's concurrency primitives.
Each section concludes with a few exercises so you can practice what you've
learned. You can <a href="//tour.golang.org/">take the tour online</a> or
install it locally with:
</p>
<p>
<pre>
$ go get golang.org/x/tour/gotour
</pre>
This will place the <code>gotour</code> binary in your workspace's <code>bin</code> directory.
<a href="//code.google.com/p/go-tour/">install it locally</a>.
</p>
<h3 id="code"><a href="code.html">How to write Go code</a></h3>

View File

@@ -239,21 +239,21 @@ starts with the name being declared.
</p>
<pre>
// Compile parses a regular expression and returns, if successful,
// a Regexp that can be used to match against text.
func Compile(str string) (*Regexp, error) {
// Compile parses a regular expression and returns, if successful, a Regexp
// object that can be used to match against text.
func Compile(str string) (regexp *Regexp, err error) {
</pre>
<p>
If every doc comment begins with the name of the item it describes,
the output of <code>godoc</code> can usefully be run through <code>grep</code>.
If the name always begins the comment, the output of <code>godoc</code>
can usefully be run through <code>grep</code>.
Imagine you couldn't remember the name "Compile" but were looking for
the parsing function for regular expressions, so you ran
the command,
</p>
<pre>
$ godoc regexp | grep -i parse
$ godoc regexp | grep parse
</pre>
<p>
@@ -2014,7 +2014,7 @@ then make the receiver for the method a value of that type.
type ByteSlice []byte
func (slice ByteSlice) Append(data []byte) []byte {
// Body exactly the same as the Append function defined above.
// Body exactly the same as above
}
</pre>
<p>
@@ -2238,12 +2238,13 @@ if str, ok := value.(string); ok {
<h3 id="generality">Generality</h3>
<p>
If a type exists only to implement an interface and will
never have exported methods beyond that interface, there is
no need to export the type itself.
Exporting just the interface makes it clear the value has no
interesting behavior beyond what is described in the
interface.
If a type exists only to implement an interface
and has no exported methods beyond that interface,
there is no need to export the type itself.
Exporting just the interface makes it clear that
it's the behavior that matters, not the implementation,
and that other implementations with different properties
can mirror the behavior of the original type.
It also avoids the need to repeat the documentation
on every instance of a common method.
</p>
@@ -2409,7 +2410,7 @@ The <code>http</code> package contains this code:
// Handler object that calls f.
type HandlerFunc func(ResponseWriter, *Request)
// ServeHTTP calls f(w, req).
// ServeHTTP calls f(c, req).
func (f HandlerFunc) ServeHTTP(w ResponseWriter, req *Request) {
f(w, req)
}
@@ -2447,7 +2448,7 @@ the handler installed at that page has value <code>ArgServer</code>
and type <code>HandlerFunc</code>.
The HTTP server will invoke the method <code>ServeHTTP</code>
of that type, with <code>ArgServer</code> as the receiver, which will in turn call
<code>ArgServer</code> (via the invocation <code>f(w, req)</code>
<code>ArgServer</code> (via the invocation <code>f(c, req)</code>
inside <code>HandlerFunc.ServeHTTP</code>).
The arguments will then be displayed.
</p>
@@ -3664,3 +3665,4 @@ var _ image.Color = Black
var _ image.Image = Black
</pre>
-->

View File

@@ -12,7 +12,7 @@ information on building gccgo for yourself,
see <a href="/doc/gccgo_install.html">Setting up and using gccgo</a>.
For more of the gritty details on the process of doing development
with the gccgo frontend,
see <a href="https://go.googlesource.com/gofrontend/+/master/HACKING">the
see <a href="https://code.google.com/p/gofrontend/source/browse/HACKING">the
file HACKING</a> in the gofrontend repository.
</p>

View File

@@ -547,7 +547,7 @@ This acts as a custom replacement for <code>go tool</code>.
The <code>test</code> subcommand now has a <code>-count</code>
flag to specify how many times to run each test and benchmark.
The <a href="/pkg/testing/"><code>testing</code></a> package
does the work here, through the <code>-test.count</code> flag.
does the work here, through by the <code>-test.count</code> flag.
</li>
<li>

View File

@@ -1,923 +0,0 @@
<!--{
"Title": "Go 1.6 Release Notes",
"Path": "/doc/go1.6",
"Template": true
}-->
<!--
Edit .,s;^PKG:([a-z][A-Za-z0-9_/]+);<a href="/pkg/\1/"><code>\1</code></a>;g
Edit .,s;^([a-z][A-Za-z0-9_/]+)\.([A-Z][A-Za-z0-9_]+\.)?([A-Z][A-Za-z0-9_]+)([ .',]|$);<a href="/pkg/\1/#\2\3"><code>\3</code></a>\4;g
-->
<style>
ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">Introduction to Go 1.6</h2>
<p>
The latest Go release, version 1.6, arrives six months after 1.5.
Most of its changes are in the implementation of the language, runtime, and libraries.
There are no changes to the language specification.
As always, the release maintains the Go 1 <a href="/doc/go1compat.html">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>
<p>
The release adds new ports to <a href="#ports">Linux on 64-bit MIPS and Android on 32-bit x86</a>;
defined and enforced <a href="#cgo">rules for sharing Go pointers with C</a>;
transparent, automatic <a href="#http2">support for HTTP/2</a>;
and a new mechanism for <a href="#template">template reuse</a>.
</p>
<h2 id="language">Changes to the language</h2>
<p>
There are no language changes in this release.
</p>
<h2 id="ports">Ports</h2>
<p>
Go 1.6 adds experimental ports to
Linux on 64-bit MIPS (<code>linux/mips64</code> and <code>linux/mips64le</code>).
These ports support <code>cgo</code> but only with internal linking.
</p>
<p>
Go 1.6 also adds an experimental port to Android on 32-bit x86 (<code>android/386</code>).
</p>
<p>
On FreeBSD, Go 1.6 defaults to using <code>clang</code>, not <code>gcc</code>, as the external C compiler.
</p>
<p>
On Linux on little-endian 64-bit PowerPC (<code>linux/ppc64le</code>),
Go 1.6 now supports <code>cgo</code> with external linking and
is roughly feature complete.
</p>
<p>
On NaCl, Go 1.5 required SDK version pepper-41.
Go 1.6 adds support for later SDK versions.
</p>
<p>
On 32-bit x86 systems using the <code>-dynlink</code> or <code>-shared</code> compilation modes,
the register CX is now overwritten by certain memory references and should
be avoided in hand-written assembly.
See the <a href="/doc/asm#x86">assembly documentation</a> for details.
</p>
<h2 id="tools">Tools</h2>
<h3 id="cgo">Cgo</h3>
<p>
There is one major change to <a href="/cmd/cgo/"><code>cgo</code></a>, along with one minor change.
</p>
<p>
The major change is the definition of rules for sharing Go pointers with C code,
to ensure that such C code can coexist with Go's garbage collector.
Briefly, Go and C may share memory allocated by Go
when a pointer to that memory is passed to C as part of a <code>cgo</code> call,
provided that the memory itself contains no pointers to Go-allocated memory,
and provided that C does not retain the pointer after the call returns.
These rules are checked by the runtime during program execution:
if the runtime detects a violation, it prints a diagnosis and crashes the program.
The checks can be disabled by setting the environment variable
<code>GODEBUG=cgocheck=0</code>, but note that the vast majority of
code identified by the checks is subtly incompatible with garbage collection
in one way or another.
Disabling the checks will typically only lead to more mysterious failure modes.
Fixing the code in question should be strongly preferred
over turning off the checks.
See the <a href="/cmd/cgo/#hdr-Passing_pointers"><code>cgo</code> documentation</a> for more details.
</p>
<p>
The minor change is
the addition of explicit <code>C.complexfloat</code> and <code>C.complexdouble</code> types,
separate from Go's <code>complex64</code> and <code>complex128</code>.
Matching the other numeric types, C's complex types and Go's complex type are
no longer interchangeable.
</p>
<h3 id="compiler">Compiler Toolchain</h3>
<p>
The compiler toolchain is mostly unchanged.
Internally, the most significant change is that the parser is now hand-written
instead of generated from <a href="/cmd/yacc/">yacc</a>.
</p>
<p>
The compiler, linker, and <code>go</code> command have a new flag <code>-msan</code>,
analogous to <code>-race</code> and only available on linux/amd64,
that enables interoperation with the <a href="http://clang.llvm.org/docs/MemorySanitizer.html">Clang MemorySanitizer</a>.
Such interoperation is useful mainly for testing a program containing suspect C or C++ code.
</p>
<p>
The linker has a new option <code>-libgcc</code> to set the expected location
of the C compiler support library when linking <a href="/cmd/cgo/"><code>cgo</code></a> code.
The option is only consulted when using <code>-linkmode=internal</code>,
and it may be set to <code>none</code> to disable the use of a support library.
</p>
<p>
The implementation of <a href="/doc/go1.5#link">build modes started in Go 1.5</a> has been expanded to more systems.
This release adds support for the <code>c-shared</code> mode on <code>android/386</code>, <code>android/amd64</code>,
<code>android/arm64</code>, <code>linux/386</code>, and <code>linux/arm64</code>;
for the <code>shared</code> mode on <code>linux/386</code>, <code>linux/arm</code>, <code>linux/amd64</code>, and <code>linux/ppc64le</code>;
and for the new <code>pie</code> mode (generating position-independent executables) on
<code>android/386</code>, <code>android/amd64</code>, <code>android/arm</code>, <code>android/arm64</code>, <code>linux/386</code>,
<code>linux/amd64</code>, <code>linux/arm</code>, <code>linux/arm64</code>, and <code>linux/ppc64le</code>.
See the <a href="https://golang.org/s/execmodes">design document</a> for details.
</p>
<p>
As a reminder, the linker's <code>-X</code> flag changed in Go 1.5.
In Go 1.4 and earlier, it took two arguments, as in
</p>
<pre>
-X importpath.name value
</pre>
<p>
Go 1.5 added an alternative syntax using a single argument
that is itself a <code>name=value</code> pair:
</p>
<pre>
-X importpath.name=value
</pre>
<p>
In Go 1.5 the old syntax was still accepted, after printing a warning
suggesting use of the new syntax instead.
Go 1.6 continues to accept the old syntax and print the warning.
Go 1.7 will remove support for the old syntax.
</p>
<h3 id="gccgo">Gccgo</h3>
<p>
The release schedules for the GCC and Go projects do not coincide.
GCC release 5 contains the Go 1.4 version of gccgo.
The next release, GCC 6, will have the Go 1.6.1 version of gccgo.
</p>
<h3 id="go_command">Go command</h3>
<p>
The <a href="/cmd/go"><code>go</code></a> command's basic operation
is unchanged, but there are a number of changes worth noting.
</p>
<p>
Go 1.5 introduced experimental support for vendoring,
enabled by setting the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>1</code>.
Go 1.6 keeps the vendoring support, no longer considered experimental,
and enables it by default.
It can be disabled explicitly by setting
the <code>GO15VENDOREXPERIMENT</code> environment variable to <code>0</code>.
Go 1.7 will remove support for the environment variable.
</p>
<p>
The most likely problem caused by enabling vendoring by default happens
in source trees containing an existing directory named <code>vendor</code> that
does not expect to be interpreted according to new vendoring semantics.
In this case, the simplest fix is to rename the directory to anything other
than <code>vendor</code> and update any affected import paths.
</p>
<p>
For details about vendoring,
see the documentation for the <a href="/cmd/go/#hdr-Vendor_Directories"><code>go</code> command</a>
and the <a href="https://golang.org/s/go15vendor">design document</a>.
</p>
<p>
There is a new build flag, <code>-msan</code>,
that compiles Go with support for the LLVM memory sanitizer.
This is intended mainly for use when linking against C or C++ code
that is being checked with the memory sanitizer.
</p>
<h3 id="doc_command">Go doc command</h3>
<p>
Go 1.5 introduced the
<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go doc</code></a> command,
which allows references to packages using only the package name, as in
<code>go</code> <code>doc</code> <code>http</code>.
In the event of ambiguity, the Go 1.5 behavior was to use the package
with the lexicographically earliest import path.
In Go 1.6, ambiguity is resolved by preferring import paths with
fewer elements, breaking ties using lexicographic comparison.
An important effect of this change is that original copies of packages
are now preferred over vendored copies.
Successful searches also tend to run faster.
</p>
<h3 id="vet_command">Go vet command</h3>
<p>
The <a href="/cmd/vet"><code>go vet</code></a> command now diagnoses
passing function or method values as arguments to <code>Printf</code>,
such as when passing <code>f</code> where <code>f()</code> was intended.
</p>
<h2 id="performance">Performance</h2>
<p>
As always, the changes are so general and varied that precise statements
about performance are difficult to make.
Some programs may run faster, some slower.
On average the programs in the Go 1 benchmark suite run a few percent faster in Go 1.6
than they did in Go 1.5.
The garbage collector's pauses are even lower than in Go 1.5,
especially for programs using
a large amount of memory.
</p>
<p>
There have been significant optimizations bringing more than 10% improvements
to implementations of the
<a href="/pkg/compress/bzip2/"><code>compress/bzip2</code></a>,
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>,
<a href="/pkg/crypto/aes/"><code>crypto/aes</code></a>,
<a href="/pkg/crypto/elliptic/"><code>crypto/elliptic</code></a>,
<a href="/pkg/crypto/ecdsa/"><code>crypto/ecdsa</code></a>, and
<a href="/pkg/sort/"><code>sort</code></a> packages.
</p>
<h2 id="library">Core library</h2>
<h3 id="http2">HTTP/2</h3>
<p>
Go 1.6 adds transparent support in the
<a href="/pkg/net/http/"><code>net/http</code></a> package
for the new <a href="https://http2.github.io/">HTTP/2 protocol</a>.
Go clients and servers will automatically use HTTP/2 as appropriate when using HTTPS.
There is no exported API specific to details of the HTTP/2 protocol handling,
just as there is no exported API specific to HTTP/1.1.
</p>
<p>
Programs that must disable HTTP/2 can do so by setting
<a href="/pkg/net/http/#Transport"><code>Transport.TLSNextProto</code></a> (for clients)
or
<a href="/pkg/net/http/#Server"><code>Server.TLSNextProto</code></a> (for servers)
to a non-nil, empty map.
</p>
<p>
Programs that must adjust HTTP/2 protocol-specific details can import and use
<a href="https://golang.org/x/net/http2"><code>golang.org/x/net/http2</code></a>,
in particular its
<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureServer">ConfigureServer</a>
and
<a href="https://godoc.org/golang.org/x/net/http2/#ConfigureTransport">ConfigureTransport</a>
functions.
</p>
<h3 id="runtime">Runtime</h3>
<p>
The runtime has added lightweight, best-effort detection of concurrent misuse of maps.
As always, if one goroutine is writing to a map, no other goroutine should be
reading or writing the map concurrently.
If the runtime detects this condition, it prints a diagnosis and crashes the program.
The best way to find out more about the problem is to run the program
under the
<a href="https://blog.golang.org/race-detector">race detector</a>,
which will more reliably identify the race
and give more detail.
</p>
<p>
For program-ending panics, the runtime now by default
prints only the stack of the running goroutine,
not all existing goroutines.
Usually only the current goroutine is relevant to a panic,
so omitting the others significantly reduces irrelevant output
in a crash message.
To see the stacks from all goroutines in crash messages, set the environment variable
<code>GOTRACEBACK</code> to <code>all</code>
or call
<a href="/pkg/runtime/debug/#SetTraceback"><code>debug.SetTraceback</code></a>
before the crash, and rerun the program.
See the <a href="/pkg/runtime/#hdr-Environment_Variables">runtime documentation</a> for details.
</p>
<p>
<em>Updating</em>:
Uncaught panics intended to dump the state of the entire program,
such as when a timeout is detected or when explicitly handling a received signal,
should now call <code>debug.SetTraceback("all")</code> before panicking.
Searching for uses of
<a href="/pkg/os/signal/#Notify"><code>signal.Notify</code></a> may help identify such code.
</p>
<p>
On Windows, Go programs in Go 1.5 and earlier forced
the global Windows timer resolution to 1ms at startup
by calling <code>timeBeginPeriod(1)</code>.
Go no longer needs this for good scheduler performance,
and changing the global timer resolution caused problems on some systems,
so the call has been removed.
</p>
<p>
When using <code>-buildmode=c-archive</code> or
<code>-buildmode=c-shared</code> to build an archive or a shared
library, the handling of signals has changed.
In Go 1.5 the archive or shared library would install a signal handler
for most signals.
In Go 1.6 it will only install a signal handler for the
synchronous signals needed to handle run-time panics in Go code:
SIGBUS, SIGFPE, SIGSEGV.
See the <a href="/pkg/os/signal">os/signal</a> package for more
details.
</p>
<h3 id="reflect">Reflect</h3>
<p>
The
<a href="/pkg/reflect/"><code>reflect</code></a> package has
<a href="https://golang.org/issue/12367">resolved a long-standing incompatibility</a>
between the gc and gccgo toolchains
regarding embedded unexported struct types containing exported fields.
Code that walks data structures using reflection, especially to implement
serialization in the spirit
of the
<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages,
may need to be updated.
</p>
<p>
The problem arises when using reflection to walk through
an embedded unexported struct-typed field
into an exported field of that struct.
In this case, <code>reflect</code> had incorrectly reported
the embedded field as exported, by returning an empty <code>Field.PkgPath</code>.
Now it correctly reports the field as unexported
but ignores that fact when evaluating access to exported fields
contained within the struct.
</p>
<p>
<em>Updating</em>:
Typically, code that previously walked over structs and used
</p>
<pre>
f.PkgPath != ""
</pre>
<p>
to exclude inaccessible fields
should now use
</p>
<pre>
f.PkgPath != "" &amp;&amp; !f.Anonymous
</pre>
<p>
For example, see the changes to the implementations of
<a href="https://go-review.googlesource.com/#/c/14011/2/src/encoding/json/encode.go"><code>encoding/json</code></a> and
<a href="https://go-review.googlesource.com/#/c/14012/2/src/encoding/xml/typeinfo.go"><code>encoding/xml</code></a>.
</p>
<h3 id="sort">Sorting</h3>
<p>
In the
<a href="/pkg/sort/"><code>sort</code></a>
package,
the implementation of
<a href="/pkg/sort/#Sort"><code>Sort</code></a>
has been rewritten to make about 10% fewer calls to the
<a href="/pkg/sort/#Interface"><code>Interface</code></a>'s
<code>Less</code> and <code>Swap</code>
methods, with a corresponding overall time savings.
The new algorithm does choose a different ordering than before
for values that compare equal (those pairs for which <code>Less(i,</code> <code>j)</code> and <code>Less(j,</code> <code>i)</code> are false).
</p>
<p>
<em>Updating</em>:
The definition of <code>Sort</code> makes no guarantee about the final order of equal values,
but the new behavior may still break programs that expect a specific order.
Such programs should either refine their <code>Less</code> implementations
to report the desired order
or should switch to
<a href="/pkg/sort/#Stable"><code>Stable</code></a>,
which preserves the original input order
of equal values.
</p>
<h3 id="template">Templates</h3>
<p>
In the
<a href="/pkg/text/template/">text/template</a> package,
there are two significant new features to make writing templates easier.
</p>
<p>
First, it is now possible to <a href="/pkg/text/template/#hdr-Text_and_spaces">trim spaces around template actions</a>,
which can make template definitions more readable.
A minus sign at the beginning of an action says to trim space before the action,
and a minus sign at the end of an action says to trim space after the action.
For example, the template
</p>
<pre>
{{"{{"}}23 -}}
&lt;
{{"{{"}}- 45}}
</pre>
<p>
formats as <code>23&lt;45</code>.
</p>
<p>
Second, the new <a href="/pkg/text/template/#hdr-Actions"><code>{{"{{"}}block}}</code> action</a>,
combined with allowing redefinition of named templates,
provides a simple way to define pieces of a template that
can be replaced in different instantiations.
There is <a href="/pkg/text/template/#example_Template_block">an example</a>
in the <code>text/template</code> package that demonstrates this new feature.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<ul>
<li>
The <a href="/pkg/archive/tar/"><code>archive/tar</code></a> package's
implementation corrects many bugs in rare corner cases of the file format.
One visible change is that the
<a href="/pkg/archive/tar/#Reader"><code>Reader</code></a> type's
<a href="/pkg/archive/tar/#Reader.Read"><code>Read</code></a> method
now presents the content of special file types as being empty,
returning <code>io.EOF</code> immediately.
</li>
<li>
In the <a href="/pkg/archive/zip/"><code>archive/zip</code></a> package, the
<a href="/pkg/archive/zip/#Reader"><code>Reader</code></a> type now has a
<a href="/pkg/archive/zip/#Reader.RegisterDecompressor"><code>RegisterDecompressor</code></a> method,
and the
<a href="/pkg/archive/zip/#Writer"><code>Writer</code></a> type now has a
<a href="/pkg/archive/zip/#Writer.RegisterCompressor"><code>RegisterCompressor</code></a> method,
enabling control over compression options for individual zip files.
These take precedence over the pre-existing global
<a href="/pkg/archive/zip/#RegisterDecompressor"><code>RegisterDecompressor</code></a> and
<a href="/pkg/archive/zip/#RegisterCompressor"><code>RegisterCompressor</code></a> functions.
</li>
<li>
The <a href="/pkg/bufio/"><code>bufio</code></a> package's
<a href="/pkg/bufio/#Scanner"><code>Scanner</code></a> type now has a
<a href="/pkg/bufio/#Scanner.Buffer"><code>Buffer</code></a> method,
to specify an initial buffer and maximum buffer size to use during scanning.
This makes it possible, when needed, to scan tokens larger than
<code>MaxScanTokenSize</code>.
Also for the <code>Scanner</code>, the package now defines the
<a href="/pkg/bufio/#ErrFinalToken"><code>ErrFinalToken</code></a> error value, for use by
<a href="/pkg/bufio/#SplitFunc">split functions</a> to abort processing or to return a final empty token.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a> package
has deprecated its
<a href="/pkg/compress/flate/#ReadError"><code>ReadError</code></a> and
<a href="/pkg/compress/flate/#WriteError"><code>WriteError</code></a> error implementations.
In Go 1.5 they were only rarely returned when an error was encountered;
now they are never returned, although they remain defined for compatibility.
</li>
<li>
The <a href="/pkg/compress/flate/"><code>compress/flate</code></a>,
<a href="/pkg/compress/gzip/"><code>compress/gzip</code></a>, and
<a href="/pkg/compress/zlib/"><code>compress/zlib</code></a> packages
now report
<a href="/pkg/io/#ErrUnexpectedEOF"><code>io.ErrUnexpectedEOF</code></a> for truncated input streams, instead of
<a href="/pkg/io/#EOF"><code>io.EOF</code></a>.
</li>
<li>
The <a href="/pkg/crypto/cipher/"><code>crypto/cipher</code></a> package now
overwrites the destination buffer in the event of a GCM decryption failure.
This is to allow the AESNI code to avoid using a temporary buffer.
</li>
<li>
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
has a variety of minor changes.
It now allows
<a href="/pkg/crypto/tls/#Listen"><code>Listen</code></a>
to succeed when the
<a href="/pkg/crypto/tls/#Config"><code>Config</code></a>
has a nil <code>Certificates</code>, as long as the <code>GetCertificate</code> callback is set,
it adds support for RSA with AES-GCM cipher suites,
and
it adds a
<a href="/pkg/crypto/tls/#RecordHeaderError"><code>RecordHeaderError</code></a>
to allow clients (in particular, the <a href="/pkg/net/http/"><code>net/http</code></a> package)
to report a better error when attempting a TLS connection to a non-TLS server.
</li>
<li>
The <a href="/pkg/crypto/x509/"><code>crypto/x509</code></a> package
now permits certificates to contain negative serial numbers
(technically an error, but unfortunately common in practice),
and it defines a new
<a href="/pkg/crypto/x509/#InsecureAlgorithmError"><code>InsecureAlgorithmError</code></a>
to give a better error message when rejecting a certificate
signed with an insecure algorithm like MD5.
</li>
<li>
The <a href="/pkg/debug/dwarf"><code>debug/dwarf</code></a> and
<a href="/pkg/debug/elf/"><code>debug/elf</code></a> packages
together add support for compressed DWARF sections.
User code needs no updating: the sections are decompressed automatically when read.
</li>
<li>
The <a href="/pkg/debug/elf/"><code>debug/elf</code></a> package
adds support for general compressed ELF sections.
User code needs no updating: the sections are decompressed automatically when read.
However, compressed
<a href="/pkg/debug/elf/#Section"><code>Sections</code></a> do not support random access:
they have a nil <code>ReaderAt</code> field.
</li>
<li>
The <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package
now exports
<a href="/pkg/encoding/asn1/#pkg-constants">tag and class constants</a>
useful for advanced parsing of ASN.1 structures.
</li>
<li>
Also in the <a href="/pkg/encoding/asn1/"><code>encoding/asn1</code></a> package,
<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now rejects various non-standard integer and length encodings.
</li>
<li>
The <a href="/pkg/encoding/base64"><code>encoding/base64</code></a> package's
<a href="/pkg/encoding/base64/#Decoder"><code>Decoder</code></a> has been fixed
to process the final bytes of its input. Previously it processed as many four-byte tokens as
possible but ignored the remainder, up to three bytes.
The <code>Decoder</code> therefore now handles inputs in unpadded encodings (like
<a href="/pkg/encoding/base64/#RawURLEncoding">RawURLEncoding</a>) correctly,
but it also rejects inputs in padded encodings that are truncated or end with invalid bytes,
such as trailing spaces.
</li>
<li>
The <a href="/pkg/encoding/json/"><code>encoding/json</code></a> package
now checks the syntax of a
<a href="/pkg/encoding/json/#Number"><code>Number</code></a>
before marshaling it, requiring that it conforms to the JSON specification for numeric values.
As in previous releases, the zero <code>Number</code> (an empty string) is marshaled as a literal 0 (zero).
</li>
<li>
The <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package's
<a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a>
function now supports a <code>cdata</code> attribute, such as <code>chardata</code>
but encoding its argument in one or more <code>&lt;![CDATA[ ... ]]&gt;</code> tags.
</li>
<li>
Also in the <a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> package,
<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a>'s
<a href="/pkg/encoding/xml/#Decoder.Token"><code>Token</code></a> method
now reports an error when encountering EOF before seeing all open tags closed,
consistent with its general requirement that tags in the input be properly matched.
To avoid that requirement, use
<a href="/pkg/encoding/xml/#Decoder.RawToken"><code>RawToken</code></a>.
</li>
<li>
The <a href="/pkg/fmt/"><code>fmt</code></a> package now allows
any integer type as an argument to
<a href="/pkg/fmt/#Printf"><code>Printf</code></a>'s <code>*</code> width and precision specification.
In previous releases, the argument to <code>*</code> was required to have type <code>int</code>.
</li>
<li>
Also in the <a href="/pkg/fmt/"><code>fmt</code></a> package,
<a href="/pkg/fmt/#Scanf"><code>Scanf</code></a> can now scan hexadecimal strings using %X, as an alias for %x.
Both formats accept any mix of upper- and lower-case hexadecimal.
</li>
<li>
The <a href="/pkg/image/"><code>image</code></a>
and
<a href="/pkg/image/color/"><code>image/color</code></a> packages
add
<a href="/pkg/image/#NYCbCrA"><code>NYCbCrA</code></a>
and
<a href="/pkg/image/color/#NYCbCrA"><code>NYCbCrA</code></a>
types, to support Y'CbCr images with non-premultiplied alpha.
</li>
<li>
The <a href="/pkg/io/"><code>io</code></a> package's
<a href="/pkg/io/#MultiWriter"><code>MultiWriter</code></a>
implementation now implements a <code>WriteString</code> method,
for use by
<a href="/pkg/io/#WriteString"><code>WriteString</code></a>.
</li>
<li>
In the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Int"><code>Int</code></a> adds
<a href="/pkg/math/big/#Int.Append"><code>Append</code></a>
and
<a href="/pkg/math/big/#Int.Text"><code>Text</code></a>
methods to give more control over printing.
</li>
<li>
Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Float"><code>Float</code></a> now implements
<a href="/pkg/encoding/#TextMarshaler"><code>encoding.TextMarshaler</code></a> and
<a href="/pkg/encoding/#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>,
allowing it to be serialized in a natural form by the
<a href="/pkg/encoding/json/"><code>encoding/json</code></a> and
<a href="/pkg/encoding/xml/"><code>encoding/xml</code></a> packages.
</li>
<li>
Also in the <a href="/pkg/math/big/"><code>math/big</code></a> package,
<a href="/pkg/math/big/#Float"><code>Float</code></a>'s
<a href="/pkg/math/big/#Float.Append"><code>Append</code></a> method now supports the special precision argument -1.
As in
<a href="/pkg/strconv/#ParseFloat"><code>strconv.ParseFloat</code></a>,
precision -1 means to use the smallest number of digits necessary such that
<a href="/pkg/math/big/#Float.Parse"><code>Parse</code></a>
reading the result into a <code>Float</code> of the same precision
will yield the original value.
</li>
<li>
The <a href="/pkg/math/rand/"><code>math/rand</code></a> package
adds a
<a href="/pkg/math/rand/#Read"><code>Read</code></a>
function, and likewise
<a href="/pkg/math/rand/#Rand"><code>Rand</code></a> adds a
<a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> method.
These make it easier to generate pseudorandom test data.
Note that, like the rest of the package,
these should not be used in cryptographic settings;
for such purposes, use the <a href="/pkg/crypto/rand/"><code>crypto/rand</code></a> package instead.
</li>
<li>
The <a href="/pkg/net/"><code>net</code></a> package's
<a href="/pkg/net/#ParseMAC"><code>ParseMAC</code></a> function now accepts 20-byte IP-over-InfiniBand (IPoIB) link-layer addresses.
</li>
<li>
Also in the <a href="/pkg/net/"><code>net</code></a> package,
there have been a few changes to DNS lookups.
First, the
<a href="/pkg/net/#DNSError"><code>DNSError</code></a> error implementation now implements
<a href="/pkg/net/#Error"><code>Error</code></a>,
and in particular its new
<a href="/pkg/net/#DNSError.IsTemporary"><code>IsTemporary</code></a>
method returns true for DNS server errors.
Second, DNS lookup functions such as
<a href="/pkg/net/#LookupAddr"><code>LookupAddr</code></a>
now return rooted domain names (with a trailing dot)
on Plan 9 and Windows, to match the behavior of Go on Unix systems.
</li>
<li>
The <a href="/pkg/net/http/"><code>net/http</code></a> package has
a number of minor additions beyond the HTTP/2 support already discussed.
First, the
<a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> now sorts its generated directory listings by file name.
Second, the
<a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a> function now refuses to serve a result
if the request's URL path contains &ldquo;..&rdquo; (dot-dot) as a path element.
Programs should typically use <code>FileServer</code> and
<a href="/pkg/net/http/#Dir"><code>Dir</code></a>
instead of calling <code>ServeFile</code> directly.
Programs that need to serve file content in response to requests for URLs containing dot-dot can
still call <a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>.
Third, the
<a href="/pkg/net/http/#Client"><code>Client</code></a> now allows user code to set the
<code>Expect:</code> <code>100-continue</code> header (see
<a href="/pkg/net/http/#Transport"><code>Transport.ExpectContinueTimeout</code></a>).
Fourth, there are
<a href="/pkg/net/http/#pkg-constants">five new error codes</a>:
<code>StatusPreconditionRequired</code> (428),
<code>StatusTooManyRequests</code> (429),
<code>StatusRequestHeaderFieldsTooLarge</code> (431), and
<code>StatusNetworkAuthenticationRequired</code> (511) from RFC 6585,
as well as the recently-approved
<code>StatusUnavailableForLegalReasons</code> (451).
Fifth, the implementation and documentation of
<a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
has been substantially changed.
The <a href="/pkg/net/http/#Hijacker"><code>Hijacker</code></a>
interface now works correctly on connections that have previously
been used with <code>CloseNotifier</code>.
The documentation now describes when <code>CloseNotifier</code>
is expected to work.
</li>
<li>
Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
there are a few changes related to the handling of a
<a href="/pkg/net/http/#Request"><code>Request</code></a> data structure with its <code>Method</code> field set to the empty string.
An empty <code>Method</code> field has always been documented as an alias for <code>"GET"</code>
and it remains so.
However, Go 1.6 fixes a few routines that did not treat an empty
<code>Method</code> the same as an explicit <code>"GET"</code>.
Most notably, in previous releases
<a href="/pkg/net/http/#Client"><code>Client</code></a> followed redirects only with
<code>Method</code> set explicitly to <code>"GET"</code>;
in Go 1.6 <code>Client</code> also follows redirects for the empty <code>Method</code>.
Finally,
<a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a> accepts a <code>method</code> argument that has not been
documented as allowed to be empty.
In past releases, passing an empty <code>method</code> argument resulted
in a <code>Request</code> with an empty <code>Method</code> field.
In Go 1.6, the resulting <code>Request</code> always has an initialized
<code>Method</code> field: if its argument is an empty string, <code>NewRequest</code>
sets the <code>Method</code> field in the returned <code>Request</code> to <code>"GET"</code>.
</li>
<li>
The <a href="/pkg/net/http/httptest/"><code>net/http/httptest</code></a> package's
<a href="/pkg/net/http/httptest/#ResponseRecorder"><code>ResponseRecorder</code></a> now initializes a default Content-Type header
using the same content-sniffing algorithm as in
<a href="/pkg/net/http/#Server"><code>http.Server</code></a>.
</li>
<li>
The <a href="/pkg/net/url/"><code>net/url</code></a> package's
<a href="/pkg/net/url/#Parse"><code>Parse</code></a> is now stricter and more spec-compliant regarding the parsing
of host names.
For example, spaces in the host name are no longer accepted.
</li>
<li>
Also in the <a href="/pkg/net/url/"><code>net/url</code></a> package,
the <a href="/pkg/net/url/#Error"><code>Error</code></a> type now implements
<a href="/pkg/net/#Error"><code>net.Error</code></a>.
</li>
<li>
The <a href="/pkg/os/"><code>os</code></a> package's
<a href="/pkg/os/#IsExist"><code>IsExist</code></a>,
<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a>,
and
<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>
now return correct results when inquiring about an
<a href="/pkg/os/#SyscallError"><code>SyscallError</code></a>.
</li>
<li>
On Unix-like systems, when a write
to <a href="/pkg/os/#pkg-variables"><code>os.Stdout</code>
or <code>os.Stderr</code></a> (more precisely, an <code>os.File</code>
opened for file descriptor 1 or 2) fails due to a broken pipe error,
the program will raise a <code>SIGPIPE</code> signal.
By default this will cause the program to exit; this may be changed by
calling the
<a href="/pkg/os/signal"><code>os/signal</code></a>
<a href="/pkg/os/signal/#Notify"><code>Notify</code></a> function
for <code>syscall.SIGPIPE</code>.
A write to a broken pipe on a file descriptor other 1 or 2 will simply
return <code>syscall.EPIPE</code> (possibly wrapped in
<a href="/pkg/os#PathError"><code>os.PathError</code></a>
and/or <a href="/pkg/os#SyscallError"><code>os.SyscallError</code></a>)
to the caller.
The old behavior of raising an uncatchable <code>SIGPIPE</code> signal
after 10 consecutive writes to a broken pipe no longer occurs.
</li>
<li>
In the <a href="/pkg/os/exec/"><code>os/exec</code></a> package,
<a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a>'s
<a href="/pkg/os/exec/#Cmd.Output"><code>Output</code></a> method continues to return an
<a href="/pkg/os/exec/#ExitError"><code>ExitError</code></a> when a command exits with an unsuccessful status.
If standard error would otherwise have been discarded,
the returned <code>ExitError</code> now holds a prefix and suffix
(currently 32 kB) of the failed command's standard error output,
for debugging or for inclusion in error messages.
The <code>ExitError</code>'s
<a href="/pkg/os/exec/#ExitError.String"><code>String</code></a>
method does not show the captured standard error;
programs must retrieve it from the data structure
separately.
</li>
<li>
On Windows, the <a href="/pkg/path/filepath/"><code>path/filepath</code></a> package's
<a href="/pkg/path/filepath/#Join"><code>Join</code></a> function now correctly handles the case when the base is a relative drive path.
For example, <code>Join(`c:`,</code> <code>`a`)</code> now
returns <code>`c:a`</code> instead of <code>`c:\a`</code> as in past releases.
This may affect code that expects the incorrect result.
</li>
<li>
In the <a href="/pkg/regexp/"><code>regexp</code></a> package,
the
<a href="/pkg/regexp/#Regexp"><code>Regexp</code></a> type has always been safe for use by
concurrent goroutines.
It uses a <a href="/pkg/sync/#Mutex"><code>sync.Mutex</code></a> to protect
a cache of scratch spaces used during regular expression searches.
Some high-concurrency servers using the same <code>Regexp</code> from many goroutines
have seen degraded performance due to contention on that mutex.
To help such servers, <code>Regexp</code> now has a
<a href="/pkg/regexp/#Regexp.Copy"><code>Copy</code></a> method,
which makes a copy of a <code>Regexp</code> that shares most of the structure
of the original but has its own scratch space cache.
Two goroutines can use different copies of a <code>Regexp</code>
without mutex contention.
A copy does have additional space overhead, so <code>Copy</code>
should only be used when contention has been observed.
</li>
<li>
The <a href="/pkg/strconv/"><code>strconv</code></a> package adds
<a href="/pkg/strconv/#IsGraphic"><code>IsGraphic</code></a>,
similar to <a href="/pkg/strconv/#IsPrint"><code>IsPrint</code></a>.
It also adds
<a href="/pkg/strconv/#QuoteToGraphic"><code>QuoteToGraphic</code></a>,
<a href="/pkg/strconv/#QuoteRuneToGraphic"><code>QuoteRuneToGraphic</code></a>,
<a href="/pkg/strconv/#AppendQuoteToGraphic"><code>AppendQuoteToGraphic</code></a>,
and
<a href="/pkg/strconv/#AppendQuoteRuneToGraphic"><code>AppendQuoteRuneToGraphic</code></a>,
analogous to
<a href="/pkg/strconv/#QuoteToASCII"><code>QuoteToASCII</code></a>,
<a href="/pkg/strconv/#QuoteRuneToASCII"><code>QuoteRuneToASCII</code></a>,
and so on.
The <code>ASCII</code> family escapes all space characters except ASCII space (U+0020).
In contrast, the <code>Graphic</code> family does not escape any Unicode space characters (category Zs).
</li>
<li>
In the <a href="/pkg/testing/"><code>testing</code></a> package,
when a test calls
<a href="/pkg/testing/#T.Parallel">t.Parallel</a>,
that test is paused until all non-parallel tests complete, and then
that test continues execution with all other parallel tests.
Go 1.6 changes the time reported for such a test:
previously the time counted only the parallel execution,
but now it also counts the time from the start of testing
until the call to <code>t.Parallel</code>.
</li>
<li>
The <a href="/pkg/text/template/"><code>text/template</code></a> package
contains two minor changes, in addition to the <a href="#template">major changes</a>
described above.
First, it adds a new
<a href="/pkg/text/template/#ExecError"><code>ExecError</code></a> type
returned for any error during
<a href="/pkg/text/template/#Template.Execute"><code>Execute</code></a>
that does not originate in a <code>Write</code> to the underlying writer.
Callers can distinguish template usage errors from I/O errors by checking for
<code>ExecError</code>.
Second, the
<a href="/pkg/text/template/#Template.Funcs"><code>Funcs</code></a> method
now checks that the names used as keys in the
<a href="/pkg/text/template/#FuncMap"><code>FuncMap</code></a>
are identifiers that can appear in a template function invocation.
If not, <code>Funcs</code> panics.
</li>
<li>
The <a href="/pkg/time/"><code>time</code></a> package's
<a href="/pkg/time/#Parse"><code>Parse</code></a> function has always rejected any day of month larger than 31,
such as January 32.
In Go 1.6, <code>Parse</code> now also rejects February 29 in non-leap years,
February 30, February 31, April 31, June 31, September 31, and November 31.
</li>
</ul>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,55 +0,0 @@
This file lists things yet to be moved into go1.8.html or deemed too
minor to mention. Either way, delete from here when done.
Tools:
go: -buildmode=c-archive now builds PIC on ELF (CL 24180)
go: mobile pkg dir change, recommend using go list in scripts (CL 24930, CL 27929)
go, dist: can set default pkg-config tool using PKG_CONFIG env var (CL 29991)
go: can set secure/insecure GIT schemes using GIT_ALLOW_PROTOCOL env var (CL 30135)
API additions and behavior changes:
cmd/compile, runtime, etc: get rid of constant FP registers (CL 28095)
cmd/compile, runtime: add go:yeswritebarrierrec pragma (CL 30938)
cmd/compile/internal/gc: enable new parser by default (CL 27203)
cmd/compile/internal/syntax: fast Go syntax trees, initial commit (CL 27195)
cmd/compile: add compiler phase timing (CL 24462)
cmd/compile: add inline explainer (CL 22782)
cmd/compile: enable flag-specified dump of specific phase+function (CL 23044)
cmd/internal/obj, cmd/link: darwin dynlink support (CL 29393)
cmd/internal/objfile: add ppc64/ppc64le disassembler support (CL 9682)
cmd/link, cmd/go: delay linking of mingwex and mingw32 until very end (CL 26670)
cmd/link: R_ADDR dynamic relocs for internal PIE (CL 29118)
cmd/link: add trampolines for too far calls in ppc64x (CL 30850)
cmd/link: allow internal PIE linking (CL 28543)
cmd/link: fix -X importpath.name=value when import path needs escaping (CL 31970)
cmd/link: fix -buildmode=pie / -linkshared combination (CL 28996)
cmd/link: for -buildmode=exe pass -no-pie to external linker (CL 33106)
cmd/link: insert trampolines for too-far jumps on ARM (CL 29397)
cmd/link: non-executable stack support for Solaris (CL 24142)
cmd/link: put text at address 0x1000000 on darwin/amd64 (CL 32185)
cmd/link: remove the -shared flag (CL 28852)
cmd/link: split large elf text sections on ppc64x (CL 27790)
cmd/link: trampoline support for external linking on ARM (CL 31143)
cmd/objdump: implement objdump of .o files (CL 24818)
go/build: allow % in ${SRCDIR} expansion for Jenkins (CL 31611)
go/build: do not record go:binary-only-package if build tags not satisfied (CL 31577)
go/build: implement default GOPATH (CL 32019)
runtime/race: update race runtime (CL 32160)
runtime: assume 64kB physical pages on ARM (CL 25021)
runtime: disable stack rescanning by default (CL 31766)
runtime: don't call cgocallback from signal handler (CL 30218)
runtime: fix check for vacuous page boundary rounding (CL 27230)
runtime: fix map iterator concurrent map check (CL 24749)
runtime: fix newextram PC passed to race detector (CL 29712)
runtime: implement unconditional hybrid barrier (CL 31765)
runtime: include pre-panic/throw logs in core dumps (CL 32013)
runtime: limit the number of map overflow buckets (CL 25049)
runtime: pass windows float syscall args via XMM (CL 32173)
runtime: print sigcode on signal crash (CL 32183)
runtime: record current PC for SIGPROF on non-Go thread (CL 30252)
runtime: sleep on CLOCK_MONOTONIC in futexsleep1 on freebsd (CL 30154)

View File

@@ -98,7 +98,7 @@ What's the origin of the mascot?</h3>
<p>
The mascot and logo were designed by
<a href="http://reneefrench.blogspot.com">Renée French</a>, who also designed
<a href="https://9p.io/plan9/glenda.html">Glenda</a>,
<a href="http://plan9.bell-labs.com/plan9/glenda.html">Glenda</a>,
the Plan 9 bunny.
The <a href="https://blog.golang.org/gopher">gopher</a>
is derived from one she used for an <a href="http://wfmu.org/">WFMU</a>
@@ -271,27 +271,6 @@ you will need to abide by the guidelines at
<h2 id="Design">Design</h2>
<h3 id="runtime">
Does Go have a runtime?</h3>
<p>
Go does have an extensive library, called the <em>runtime</em>,
that is part of every Go program.
The runtime library implements garbage collection, concurrency,
stack management, and other critical features of the Go language.
Although it is more central to the language, Go's runtime is analogous
to <code>libc</code>, the C library.
</p>
<p>
It is important to understand, however, that Go's runtime does not
include a virtual machine, such as is provided by the Java runtime.
Go programs are compiled ahead of time to native machine code.
Thus, although the term is often used to describe the virtual
environment in which a program runs, in Go the word &ldquo;runtime&rdquo;
is just the name given to the library providing critical language services.
</p>
<h3 id="unicode_identifiers">
What's up with Unicode identifiers?</h3>
@@ -356,10 +335,7 @@ code that does what generics would enable, if less smoothly.
</p>
<p>
The topic remains open.
For a look at several previous unsuccessful attempts to
design a good generics solution for Go, see
<a href="https://golang.org/issue/15292">this proposal</a>.
This remains an open issue.
</p>
<h3 id="exceptions">
@@ -769,29 +745,6 @@ for i, v := range t {
}
</pre>
<h3 id="convert_slice_with_same_underlying_type">
Can I convert []T1 to []T2 if T1 and T2 have the same underlying type?</h3>
This last line of this code sample does not compile.
<pre>
type T1 int
type T2 int
var t1 T1
var x = T2(t1) // OK
var st1 []T1
var sx = ([]T2)(st1) // NOT OK
</pre>
<p>
In Go, types are closely tied to methods, in that every named type has
a (possibly empty) method set.
The general rule is that you can change the name of the type being
converted (and thus possibly change its method set) but you can't
change the name (and method set) of elements of a composite type.
Go requires you to be explicit about type conversions.
</p>
<h3 id="nil_error">
Why is my nil error value not equal to nil?
</h3>
@@ -907,39 +860,6 @@ value to hold the error and a type switch to discriminate cases. The
syntax tree example is also doable, although not as elegantly.
</p>
<h3 id="covariant_types">
Why does Go not have covariant result types?</h3>
<p>
Covariant result types would mean that an interface like
</p>
<pre>
type Copyable interface {
Copy() interface{}
}
</pre>
<p>
would be satisfied by the method
</p>
<pre>
func (v Value) Copy() Value
</pre>
<p>because <code>Value</code> implements the empty interface.
In Go method types must match exactly, so <code>Value</code> does not
implement <code>Copyable</code>.
Go separates the notion of what a
type does&mdash;its methods&mdash;from the type's implementation.
If two methods return different types, they are not doing the same thing.
Programmers who want covariant result types are often trying to
express a type hierarchy through interfaces.
In Go it's more natural to have a clean separation between interface
and implementation.
</p>
<h2 id="values">Values</h2>
<h3 id="conversions">
@@ -1094,7 +1014,7 @@ it's easy to work around this. For GitHub, try one of these solutions:
<ul>
<li>Manually clone the repository in the expected package directory:
<pre>
$ cd src/github.com/username
$ cd $GOPATH/src/github.com/username
$ git clone git@github.com:username/package.git
</pre>
</li>
@@ -1174,12 +1094,6 @@ struct. If the interface value holds a pointer, copying the interface value
makes a copy of the pointer, but again not the data it points to.
</p>
<p>
Note that this discussion is about the semantics of the operations.
Actual implementations may apply optimizations to avoid copying
as long as the optimizations do not change the semantics.
</p>
<h3 id="pointer_to_interface">
When should I use a pointer to an interface?</h3>
@@ -1315,26 +1229,11 @@ size of value should use an explicitly sized type, like <code>int64</code>.
Prior to Go 1.1, the 64-bit Go compilers (both gc and gccgo) used
a 32-bit representation for <code>int</code>. As of Go 1.1 they use
a 64-bit representation.
</p>
<p>
On the other hand, floating-point scalars and complex
types are always sized (there are no <code>float</code> or <code>complex</code> basic types),
because programmers should be aware of precision when using floating-point numbers.
The default type used for an (untyped) floating-point constant is <code>float64</code>.
Thus <code>foo</code> <code>:=</code> <code>3.0</code> declares a variable <code>foo</code>
of type <code>float64</code>.
For a <code>float32</code> variable initialized by an (untyped) constant, the variable type
must be specified explicitly in the variable declaration:
</p>
<pre>
var foo float32 = 3.0
</pre>
<p>
Alternatively, the constant must be given a type with a conversion as in
<code>foo := float32(3.0)</code>.
numbers are always sized: <code>float32</code>, <code>complex64</code>,
etc., because programmers should be aware of precision when using
floating-point numbers.
The default size of a floating-point constant is <code>float64</code>.
</p>
<h3 id="stack_or_heap">
@@ -1738,7 +1637,8 @@ What compiler technology is used to build the compilers?</h3>
<p>
<code>Gccgo</code> has a front end written in C++, with a recursive descent parser coupled to the
standard GCC back end. <code>Gc</code> is written in Go with a recursive descent parser
standard GCC back end. <code>Gc</code> is written in Go using
<code>yacc</code>/<code>bison</code> for the parser
and uses a custom loader, also written in Go but
based on the Plan 9 loader, to generate ELF/Mach-O/PE binaries.
</p>
@@ -1799,7 +1699,7 @@ A simple C "hello, world" program compiled and linked statically using gcc
on Linux is around 750 kB,
including an implementation of <code>printf</code>.
An equivalent Go program using <code>fmt.Printf</code>
is around 1.5 MB, but
is around 2.3 MB, but
that includes more powerful run-time support and type information.
</p>
@@ -1876,16 +1776,15 @@ Why does Go perform badly on benchmark X?</h3>
<p>
One of Go's design goals is to approach the performance of C for comparable
programs, yet on some benchmarks it does quite poorly, including several
in <a href="https://go.googlesource.com/exp/+/master/shootout/">golang.org/x/exp/shootout</a>.
The slowest depend on libraries for which versions of comparable performance
are not available in Go.
For instance, <a href="https://go.googlesource.com/exp/+/master/shootout/pidigits.go">pidigits.go</a>
in <a href="/test/bench/shootout/">test/bench/shootout</a>. The slowest depend on libraries
for which versions of comparable performance are not available in Go.
For instance, <a href="/test/bench/shootout/pidigits.go">pidigits.go</a>
depends on a multi-precision math package, and the C
versions, unlike Go's, use <a href="http://gmplib.org/">GMP</a> (which is
written in optimized assembler).
Benchmarks that depend on regular expressions
(<a href="https://go.googlesource.com/exp/+/master/shootout/regex-dna.go">regex-dna.go</a>,
for instance) are essentially comparing Go's native <a href="/pkg/regexp">regexp package</a> to
(<a href="/test/bench/shootout/regex-dna.go">regex-dna.go</a>, for instance) are
essentially comparing Go's native <a href="/pkg/regexp">regexp package</a> to
mature, highly optimized regular expression libraries like PCRE.
</p>
@@ -1893,9 +1792,9 @@ mature, highly optimized regular expression libraries like PCRE.
Benchmark games are won by extensive tuning and the Go versions of most
of the benchmarks need attention. If you measure comparable C
and Go programs
(<a href="https://go.googlesource.com/exp/+/master/shootout/reverse-complement.go">reverse-complement.go</a>
is one example), you'll see the two languages are much closer in raw performance
than this suite would indicate.
(<a href="/test/bench/shootout/reverse-complement.go">reverse-complement.go</a> is one example), you'll see the two
languages are much closer in raw performance than this suite would
indicate.
</p>
<p>

View File

@@ -1,6 +1,6 @@
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of November 18, 2016",
"Subtitle": "Version of August 5, 2015",
"Path": "/ref/spec"
}-->
@@ -101,14 +101,15 @@ The following terms are used to denote specific Unicode character classes:
newline = /* the Unicode code point U+000A */ .
unicode_char = /* an arbitrary Unicode code point except newline */ .
unicode_letter = /* a Unicode code point classified as "Letter" */ .
unicode_digit = /* a Unicode code point classified as "Number, decimal digit" */ .
unicode_digit = /* a Unicode code point classified as "Decimal Digit" */ .
</pre>
<p>
In <a href="http://www.unicode.org/versions/Unicode8.0.0/">The Unicode Standard 8.0</a>,
Section 4.5 "General Category" defines a set of character categories.
Go treats all characters in any of the Letter categories Lu, Ll, Lt, Lm, or Lo
as Unicode letters, and those in the Number category Nd as Unicode digits.
In <a href="http://www.unicode.org/versions/Unicode6.3.0/">The Unicode Standard 6.3</a>,
Section 4.5 "General Category"
defines a set of character categories. Go treats
those characters in category Lu, Ll, Lt, Lm, or Lo as Unicode letters,
and those in category Nd as Unicode digits.
</p>
<h3 id="Letters_and_digits">Letters and digits</h3>
@@ -557,9 +558,7 @@ and are discussed in that section.
</p>
<p>
Numeric constants represent exact values of arbitrary precision and do not overflow.
Consequently, there are no constants denoting the IEEE-754 negative zero, infinity,
and not-a-number values.
Numeric constants represent values of arbitrary precision and do not overflow.
</p>
<p>
@@ -594,6 +593,16 @@ respectively, depending on whether it is a boolean, rune, integer, floating-poin
complex, or string constant.
</p>
<p>
There are no constants denoting the IEEE-754 infinity and not-a-number values,
but the <a href="/pkg/math/"><code>math</code> package</a>'s
<a href="/pkg/math/#Inf">Inf</a>,
<a href="/pkg/math/#NaN">NaN</a>,
<a href="/pkg/math/#IsInf">IsInf</a>, and
<a href="/pkg/math/#IsNaN">IsNaN</a>
functions return and test for those values at run time.
</p>
<p>
Implementation restriction: Although numeric constants have arbitrary
precision in the language, a compiler may implement them using an
@@ -605,7 +614,7 @@ implementation must:
<li>Represent floating-point constants, including the parts of
a complex constant, with a mantissa of at least 256 bits
and a signed binary exponent of at least 16 bits.</li>
and a signed exponent of at least 32 bits.</li>
<li>Give an error if unable to represent an integer constant
precisely.</li>
@@ -1043,25 +1052,19 @@ promoted methods are included in the method set of the struct as follows:
<p>
A field declaration may be followed by an optional string literal <i>tag</i>,
which becomes an attribute for all the fields in the corresponding
field declaration. An empty tag string is equivalent to an absent tag.
The tags are made visible through a <a href="/pkg/reflect/#StructTag">reflection interface</a>
field declaration. The tags are made
visible through a <a href="/pkg/reflect/#StructTag">reflection interface</a>
and take part in <a href="#Type_identity">type identity</a> for structs
but are otherwise ignored.
</p>
<pre>
// A struct corresponding to the TimeStamp protocol buffer.
// The tag strings define the protocol buffer field numbers.
struct {
x, y float64 "" // an empty tag string is like an absent tag
name string "any string is permitted as a tag"
_ [4]byte "ceci n'est pas un champ de structure"
}
// A struct corresponding to a TimeStamp protocol buffer.
// The tag strings define the protocol buffer field numbers;
// they follow the convention outlined by the reflect package.
struct {
microsec uint64 `protobuf:"1"`
serverIP6 uint64 `protobuf:"2"`
microsec uint64 "field 1"
serverIP6 uint64 "field 2"
process string "field 3"
}
</pre>
@@ -1113,7 +1116,7 @@ one unnamed result it may be written as an unparenthesized type.
</p>
<p>
The final incoming parameter in a function signature may have
The final parameter in a function signature may have
a type prefixed with <code>...</code>.
A function with such a parameter is called <i>variadic</i> and
may be invoked with zero or more arguments for that parameter.
@@ -1794,27 +1797,26 @@ It can be used to construct a set of related constants:
</p>
<pre>
const ( // iota is reset to 0
const ( // iota is reset to 0
c0 = iota // c0 == 0
c1 = iota // c1 == 1
c2 = iota // c2 == 2
)
const ( // iota is reset to 0
a = 1 &lt;&lt; iota // a == 1
const (
a = 1 &lt;&lt; iota // a == 1 (iota has been reset)
b = 1 &lt;&lt; iota // b == 2
c = 3 // c == 3 (iota is not used but still incremented)
d = 1 &lt;&lt; iota // d == 8
c = 1 &lt;&lt; iota // c == 4
)
const ( // iota is reset to 0
const (
u = iota * 42 // u == 0 (untyped integer constant)
v float64 = iota * 42 // v == 42.0 (float64 constant)
w = iota * 42 // w == 84 (untyped integer constant)
)
const x = iota // x == 0 (iota has been reset)
const y = iota // y == 0 (iota has been reset)
const x = iota // x == 0 (iota has been reset)
const y = iota // y == 0 (iota has been reset)
</pre>
<p>
@@ -2006,7 +2008,7 @@ _, y, _ := coord(p) // coord() returns three values; only interested in y coord
<p>
Unlike regular variable declarations, a short variable declaration may <i>redeclare</i>
variables provided they were originally declared earlier in the same block
(or the parameter lists if the block is the function body) with the same type,
(or the parameter lists if the block is the function body) with the same type,
and at least one of the non-<a href="#Blank_identifier">blank</a> variables is new.
As a consequence, redeclaration can only appear in a multi-variable short declaration.
Redeclaration does not introduce a new variable; it just assigns a new value to the original.
@@ -2089,7 +2091,7 @@ Receiver = Parameters .
<p>
The receiver is specified via an extra parameter section preceding the method
name. That parameter section must declare a single non-variadic parameter, the receiver.
name. That parameter section must declare a single parameter, the receiver.
Its type must be of the form <code>T</code> or <code>*T</code> (possibly using
parentheses) where <code>T</code> is a type name. The type denoted by <code>T</code> is called
the receiver <i>base type</i>; it must not be a pointer or interface type and
@@ -2208,8 +2210,9 @@ math.Sin // denotes the Sin function in package math
<p>
Composite literals construct values for structs, arrays, slices, and maps
and create a new value each time they are evaluated.
They consist of the type of the literal followed by a brace-bound list of elements.
Each element may optionally be preceded by a corresponding key.
They consist of the type of the value
followed by a brace-bound list of composite elements. An element may be
a single expression or a key-value pair.
</p>
<pre class="ebnf">
@@ -2217,19 +2220,19 @@ CompositeLit = LiteralType LiteralValue .
LiteralType = StructType | ArrayType | "[" "..." "]" ElementType |
SliceType | MapType | TypeName .
LiteralValue = "{" [ ElementList [ "," ] ] "}" .
ElementList = KeyedElement { "," KeyedElement } .
KeyedElement = [ Key ":" ] Element .
ElementList = Element { "," Element } .
Element = [ Key ":" ] Value .
Key = FieldName | Expression | LiteralValue .
FieldName = identifier .
Element = Expression | LiteralValue .
Value = Expression | LiteralValue .
</pre>
<p>
The LiteralType's underlying type must be a struct, array, slice, or map type
The LiteralType must be a struct, array, slice, or map type
(the grammar enforces this constraint except when the type is given
as a TypeName).
The types of the elements and keys must be <a href="#Assignability">assignable</a>
to the respective field, element, and key types of the literal type;
The types of the expressions must be <a href="#Assignability">assignable</a>
to the respective field, element, and key types of the LiteralType;
there is no additional conversion.
The key is interpreted as a field name for struct literals,
an index for array and slice literals, and a key for map literals.
@@ -2242,7 +2245,7 @@ constant key value.
For struct literals the following rules apply:
</p>
<ul>
<li>A key must be a field name declared in the struct type.
<li>A key must be a field name declared in the LiteralType.
</li>
<li>An element list that does not contain any keys must
list an element for each struct field in the
@@ -2286,10 +2289,8 @@ For array and slice literals the following rules apply:
<li>Each element has an associated integer index marking
its position in the array.
</li>
<li>An element with a key uses the key as its index. The
key must be a non-negative constant representable by
a value of type <code>int</code>; and if it is typed
it must be of integer type.
<li>An element with a key uses the key as its index; the
key must be a constant integer expression.
</li>
<li>An element without a key uses the previous element's index plus one.
If the first element has no key, its index is zero.
@@ -2306,7 +2307,7 @@ var pointer *Point3D = &amp;Point3D{y: 1000}
</pre>
<p>
The length of an array literal is the length specified in the literal type.
The length of an array literal is the length specified in the LiteralType.
If fewer elements than the length are provided in the literal, the missing
elements are set to the zero value for the array element type.
It is an error to provide elements with index values outside the index range
@@ -2322,7 +2323,7 @@ days := [...]string{"Sat", "Sun"} // len(days) == 2
<p>
A slice literal describes the entire underlying array literal.
Thus the length and capacity of a slice literal are the maximum
Thus, the length and capacity of a slice literal are the maximum
element index plus one. A slice literal has the form
</p>
@@ -2352,11 +2353,10 @@ the <code>&amp;T</code> when the element or key type is <code>*T</code>.
[][]int{{1, 2, 3}, {4, 5}} // same as [][]int{[]int{1, 2, 3}, []int{4, 5}}
[][]Point{{{0, 1}, {1, 2}}} // same as [][]Point{[]Point{Point{0, 1}, Point{1, 2}}}
map[string]Point{"orig": {0, 0}} // same as map[string]Point{"orig": Point{0, 0}}
map[Point]string{{0, 0}: "orig"} // same as map[Point]string{Point{0, 0}: "orig"}
type PPoint *Point
[2]*Point{{1.5, -3.5}, {}} // same as [2]*Point{&amp;Point{1.5, -3.5}, &amp;Point{}}
[2]PPoint{{1.5, -3.5}, {}} // same as [2]PPoint{PPoint(&amp;Point{1.5, -3.5}), PPoint(&amp;Point{})}
[...]*Point{{1.5, -3.5}, {0, 0}} // same as [...]*Point{&amp;Point{1.5, -3.5}, &amp;Point{0, 0}}
map[Point]string{{0, 0}: "orig"} // same as map[Point]string{Point{0, 0}: "orig"}
</pre>
<p>
@@ -2446,8 +2446,9 @@ PrimaryExpr =
Selector = "." identifier .
Index = "[" Expression "]" .
Slice = "[" [ Expression ] ":" [ Expression ] "]" |
"[" [ Expression ] ":" Expression ":" Expression "]" .
Slice = "[" ( [ Expression ] ":" [ Expression ] ) |
( [ Expression ] ":" Expression ":" Expression )
"]" .
TypeAssertion = "." "(" Type ")" .
Arguments = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ "..." ] [ "," ] ] ")" .
</pre>
@@ -2936,7 +2937,6 @@ used in an <a href="#Assignments">assignment</a> or initialization of the specia
v, ok = a[x]
v, ok := a[x]
var v, ok = a[x]
var v, ok T = a[x]
</pre>
<p>
@@ -3117,16 +3117,13 @@ known to be <code>T</code> in a correct program.
</p>
<pre>
var x interface{} = 7 // x has dynamic type int and value 7
i := x.(int) // i has type int and value 7
var x interface{} = 7 // x has dynamic type int and value 7
i := x.(int) // i has type int and value 7
type I interface { m() }
func f(y I) {
s := y.(string) // illegal: string does not implement I (missing method m)
r := y.(io.Reader) // r has type io.Reader and the dynamic type of y must implement both I and io.Reader
}
var y I
s := y.(string) // illegal: string does not implement I (missing method m)
r := y.(io.Reader) // r has type io.Reader and y must implement both I and io.Reader
</pre>
<p>
@@ -3137,7 +3134,6 @@ A type assertion used in an <a href="#Assignments">assignment</a> or initializat
v, ok = x.(T)
v, ok := x.(T)
var v, ok = x.(T)
var v, ok T1 = x.(T)
</pre>
<p>
@@ -3334,8 +3330,8 @@ var s uint = 33
var i = 1&lt;&lt;s // 1 has type int
var j int32 = 1&lt;&lt;s // 1 has type int32; j == 0
var k = uint64(1&lt;&lt;s) // 1 has type uint64; k == 1&lt;&lt;33
var m int = 1.0&lt;&lt;s // 1.0 has type int; m == 0 if ints are 32bits in size
var n = 1.0&lt;&lt;s == j // 1.0 has type int32; n == true
var m int = 1.0&lt;&lt;s // 1.0 has type int
var n = 1.0&lt;&lt;s != i // 1.0 has type int; n == false if ints are 32bits in size
var o = 1&lt;&lt;s == 2&lt;&lt;s // 1 and 2 have type int; o == true if ints are 32bits in size
var p = 1&lt;&lt;s == 1&lt;&lt;33 // illegal if ints are 32bits in size: 1 has type int, but 1&lt;&lt;33 overflows int
var u = 1.0&lt;&lt;s // illegal: 1.0 has type float64, cannot shift
@@ -3651,12 +3647,12 @@ is also allowed and follows from the general rules above.
</p>
<pre>
const c = 3 &lt; 4 // c is the untyped boolean constant true
const c = 3 &lt; 4 // c is the untyped bool constant true
type MyBool bool
var x, y int
var (
// The result of a comparison is an untyped boolean.
// The result of a comparison is an untyped bool.
// The usual assignment rules apply.
b3 = x == y // b3 has type bool
b4 bool = x == y // b4 has type bool
@@ -3745,7 +3741,6 @@ A receive expression used in an <a href="#Assignments">assignment</a> or initial
x, ok = &lt;-ch
x, ok := &lt;-ch
var x, ok = &lt;-ch
var x, ok T = &lt;-ch
</pre>
<p>
@@ -3801,8 +3796,7 @@ type <code>T</code> in any of these cases:
<code>T</code> is a floating-point type,
and <code>x</code> is representable by a value
of type <code>T</code> after rounding using
IEEE 754 round-to-even rules, but with an IEEE <code>-0.0</code>
further rounded to an unsigned <code>0.0</code>.
IEEE 754 round-to-even rules.
The constant <code>T(x)</code> is the rounded value.
</li>
<li>
@@ -3822,7 +3816,6 @@ uint(iota) // iota value of type uint
float32(2.718281828) // 2.718281828 of type float32
complex128(1) // 1.0 + 0.0i of type complex128
float32(0.49999999) // 0.5 of type float32
float64(-1e-1000) // 0.0 of type float64
string('x') // "x" of type string
string(0x266c) // "♬" of type string
MyString("foo" + "bar") // "foobar" of type MyString
@@ -3843,12 +3836,10 @@ in any of these cases:
to <code>T</code>.
</li>
<li>
ignoring struct tags (see below),
<code>x</code>'s type and <code>T</code> have <a href="#Type_identity">identical</a>
<code>x</code>'s type and <code>T</code> have identical
<a href="#Types">underlying types</a>.
</li>
<li>
ignoring struct tags (see below),
<code>x</code>'s type and <code>T</code> are unnamed pointer types
and their pointer base types have identical underlying types.
</li>
@@ -3868,31 +3859,6 @@ in any of these cases:
</li>
</ul>
<p>
<a href="#Struct_types">Struct tags</a> are ignored when comparing struct types
for identity for the purpose of conversion:
</p>
<pre>
type Person struct {
Name string
Address *struct {
Street string
City string
}
}
var data *struct {
Name string `json:"name"`
Address *struct {
Street string `json:"street"`
City string `json:"city"`
} `json:"address"`
}
var person = (*Person)(data) // ignoring tags, the underlying types are identical
</pre>
<p>
Specific rules apply to (non-constant) conversions between numeric types or
to and from a string type.
@@ -4293,7 +4259,7 @@ All other statements are not terminating.
<p>
A <a href="#Blocks">statement list</a> ends in a terminating statement if the list
is not empty and its final non-empty statement is terminating.
is not empty and its final statement is terminating.
</p>
@@ -4708,8 +4674,6 @@ Cases then match actual types <code>T</code> against the dynamic type of the
expression <code>x</code>. As with type assertions, <code>x</code> must be of
<a href="#Interface_types">interface type</a>, and each non-interface type
<code>T</code> listed in a case must implement the type of <code>x</code>.
The types listed in the cases of a type switch must all be
<a href="#Type_identity">different</a>.
</p>
<pre class="ebnf">
@@ -4723,8 +4687,8 @@ TypeList = Type { "," Type } .
<p>
The TypeSwitchGuard may include a
<a href="#Short_variable_declarations">short variable declaration</a>.
When that form is used, the variable is declared at the end of the
TypeSwitchCase in the <a href="#Blocks">implicit block</a> of each clause.
When that form is used, the variable is declared at the beginning of
the <a href="#Blocks">implicit block</a> in each clause.
In clauses with a case listing exactly one type, the variable
has that type; otherwise, the variable has the type of the expression
in the TypeSwitchGuard.
@@ -4734,7 +4698,6 @@ in the TypeSwitchGuard.
The type in a case may be <a href="#Predeclared_identifiers"><code>nil</code></a>;
that case is used when the expression in the TypeSwitchGuard
is a <code>nil</code> interface value.
There may be at most one <code>nil</code> case.
</p>
<p>
@@ -4799,8 +4762,8 @@ The "fallthrough" statement is not permitted in a type switch.
<h3 id="For_statements">For statements</h3>
<p>
A "for" statement specifies repeated execution of a block. There are three forms:
The iteration may be controlled by a single condition, a "for" clause, or a "range" clause.
A "for" statement specifies repeated execution of a block. The iteration is
controlled by a condition, a "for" clause, or a "range" clause.
</p>
<pre class="ebnf">
@@ -4808,8 +4771,6 @@ ForStmt = "for" [ Condition | ForClause | RangeClause ] Block .
Condition = Expression .
</pre>
<h4 id="For_condition">For statements with single condition</h4>
<p>
In its simplest form, a "for" statement specifies the repeated execution of
a block as long as a boolean condition evaluates to true.
@@ -4824,8 +4785,6 @@ for a &lt; b {
}
</pre>
<h4 id="For_clause">For statements with <code>for</code> clause</h4>
<p>
A "for" statement with a ForClause is also controlled by its condition, but
additionally it may specify an <i>init</i>
@@ -4864,8 +4823,6 @@ for cond { S() } is the same as for ; cond ; { S() }
for { S() } is the same as for true { S() }
</pre>
<h4 id="For_range">For statements with <code>range</code> clause</h4>
<p>
A "for" statement with a "range" clause
iterates through all entries of an array, slice, string or map,
@@ -5373,7 +5330,7 @@ the "for" statement's block but the <code>goto</code> is not.
<p>
A "fallthrough" statement transfers control to the first statement of the
next case clause in an <a href="#Expression_switches">expression "switch" statement</a>.
next case clause in a <a href="#Expression_switches">expression "switch" statement</a>.
It may be used only as the final non-empty statement in such a clause.
</p>
@@ -5765,12 +5722,12 @@ var a = complex(2, -2) // complex128
const b = complex(1.0, -1.4) // untyped complex constant 1 - 1.4i
x := float32(math.Cos(math.Pi/2)) // float32
var c64 = complex(5, -x) // complex64
var s uint = complex(1, 0) // untyped complex constant 1 + 0i can be converted to uint
_ = complex(1, 2&lt;&lt;s) // illegal: 2 assumes floating-point type, cannot shift
const s uint = complex(1, 0) // untyped complex constant 1 + 0i can be converted to uint
_ = complex(1, 2&lt;&lt;s) // illegal: 2 has floating-point type, cannot shift
var rl = real(c64) // float32
var im = imag(a) // float64
const c = imag(b) // untyped constant -1.4
_ = imag(3 &lt;&lt; s) // illegal: 3 assumes complex type, cannot shift
_ = imag(3 &lt;&lt; s) // illegal: 3 has complex type, cannot shift
</pre>
<h3 id="Handling_panics">Handling panics</h3>
@@ -6201,10 +6158,9 @@ func init() { … }
</pre>
<p>
Multiple such functions may be defined per package, even within a single
source file. In the package block, the <code>init</code> identifier can
be used only to declare <code>init</code> functions, yet the identifier
itself is not <a href="#Declarations_and_scope">declared</a>. Thus
Multiple such functions may be defined, even within a single
source file. The <code>init</code> identifier is not
<a href="#Declarations_and_scope">declared</a> and thus
<code>init</code> functions cannot be referred to from anywhere
in a program.
</p>

View File

@@ -1,238 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 32 32.000001"
id="svg4416"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="favicon.svg"
inkscape:export-filename="../../favicon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4418" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="17.966652"
inkscape:cy="9.2991824"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:snap-bbox="true"
inkscape:snap-bbox-edge-midpoints="false"
inkscape:bbox-nodes="true"
showguides="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-global="false">
<inkscape:grid
type="xygrid"
id="grid5148" />
</sodipodi:namedview>
<metadata
id="metadata4421">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="icon"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1020.3622)">
<ellipse
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="ellipse4216"
cx="-907.35657"
cy="479.90009"
rx="3.5793996"
ry="3.8207953"
transform="matrix(-0.49169095,-0.87076978,-0.87076978,0.49169095,0,0)"
inkscape:transform-center-x="0.67794294"
inkscape:transform-center-y="-2.3634048" />
<ellipse
inkscape:transform-center-y="-2.3633882"
inkscape:transform-center-x="-0.67793718"
transform="matrix(0.49169095,-0.87076978,0.87076978,0.49169095,0,0)"
ry="3.8207953"
rx="3.5793996"
cy="507.8461"
cx="-891.57654"
id="ellipse4463"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#384e54;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 16.091693,1021.3642 c -1.105749,0.01 -2.210341,0.049 -3.31609,0.09 C 6.8422558,1021.6738 2,1026.3942 2,1032.3622 c 0,2.9786 0,13 0,20 l 28,0 c 0,-8 0,-16 0,-20 0,-5.9683 -4.667345,-10.4912 -10.59023,-10.908 -1.10575,-0.078 -2.212328,-0.099 -3.318077,-0.09 z"
id="path4465"
sodipodi:nodetypes="ccsccscc" />
<path
inkscape:transform-center-y="-1.3604657"
inkscape:transform-center-x="-0.98424303"
sodipodi:nodetypes="sssssss"
inkscape:connector-curvature="0"
id="path4469"
d="m 4.6078867,1025.0462 c 0.459564,0.2595 1.818262,1.2013 1.980983,1.648 0.183401,0.5035 0.159385,1.0657 -0.114614,1.551 -0.346627,0.6138 -1.005341,0.9487 -1.696421,0.9365 -0.339886,-0.01 -1.720283,-0.6372 -2.042561,-0.8192 -0.97754,-0.5519 -1.350795,-1.7418 -0.833686,-2.6576 0.517109,-0.9158 1.728749,-1.2107 2.706299,-0.6587 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32850246;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4473"
width="3.0866659"
height="3.5313663"
x="14.406213"
y="1035.6842"
ry="0.62426329" />
<path
inkscape:connector-curvature="0"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 16,1023.3622 c -9,0 -12,3.7153 -12,9 l 0,20 24,0 c -0.04889,-7.3562 0,-18 0,-20 0,-5.2848 -3,-9 -12,-9 z"
id="path4471"
sodipodi:nodetypes="zsccsz" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#76e1fe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 27.074073,1025.0462 c -0.45957,0.2595 -1.818257,1.2013 -1.980979,1.648 -0.183401,0.5035 -0.159384,1.0657 0.114614,1.551 0.346627,0.6138 1.005335,0.9487 1.696415,0.9365 0.33988,-0.01 1.72029,-0.6372 2.04256,-0.8192 0.97754,-0.5519 1.35079,-1.7418 0.83369,-2.6576 -0.51711,-0.9158 -1.72876,-1.2107 -2.7063,-0.6587 z"
id="path4481"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssss"
inkscape:transform-center-x="0.98424094"
inkscape:transform-center-y="-1.3604657" />
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle4477"
cx="21.175734"
cy="1030.3542"
r="4.6537542"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
r="4.8316345"
cy="1030.3542"
cx="10.339486"
id="circle4483"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename=".\rect4485.png"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4246"
width="3.6673687"
height="4.1063409"
x="14.115863"
y="1035.9174"
ry="0.72590536" />
<rect
ry="0.72590536"
y="1035.2253"
x="14.115863"
height="4.1063409"
width="3.6673687"
id="rect4485"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fffcfb;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.32941176;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 19.999735,1036.5289 c 0,0.838 -0.871228,1.2682 -2.144766,1.1659 -0.02366,0 -0.04795,-0.6004 -0.254147,-0.5832 -0.503669,0.042 -1.095902,-0.02 -1.685964,-0.02 -0.612939,0 -1.206342,0.1826 -1.68549,0.017 -0.110233,-0.038 -0.178298,0.5838 -0.261532,0.5816 -1.243685,-0.033 -2.078803,-0.3383 -2.078803,-1.1618 0,-1.2118 1.815635,-2.1941 4.055351,-2.1941 2.239704,0 4.055351,0.9823 4.055351,2.1941 z"
id="path4487"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssssssss"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:nodetypes="sssssssss"
inkscape:connector-curvature="0"
id="path4489"
d="m 19.977414,1035.7004 c 0,0.5685 -0.433659,0.8554 -1.138091,1.0001 -0.291933,0.06 -0.630371,0.096 -1.003719,0.1166 -0.56405,0.032 -1.207782,0.031 -1.89122,0.031 -0.672834,0 -1.307182,0 -1.864904,-0.029 -0.306268,-0.017 -0.589429,-0.043 -0.843164,-0.084 -0.813833,-0.1318 -1.324962,-0.417 -1.324962,-1.0344 0,-1.1601 1.805642,-2.1006 4.03303,-2.1006 2.227377,0 4.03303,0.9405 4.03303,2.1006 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c38c74;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<ellipse
cy="1033.8501"
cx="15.944382"
id="ellipse4491"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#23201f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
rx="2.0801733"
ry="1.343747"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="circle4493"
cx="12.414201"
cy="1030.3542"
r="1.9630634"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<circle
r="1.9630634"
cy="1030.3542"
cx="23.110121"
id="circle4495"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#171311;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename=".\rect4485.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4497"
d="m 5.0055377,1027.2727 c -1.170435,-1.0835 -2.026973,-0.7721 -2.044172,-0.7463"
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 4.3852457,1026.9152 c -1.158557,0.036 -1.346704,0.6303 -1.33881,0.6523"
id="path4499"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.630533,1027.1724 c 1.17043,-1.0835 2.02697,-0.7721 2.04417,-0.7463"
id="path4501"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4503"
d="m 27.321773,1026.673 c 1.15856,0.036 1.3467,0.6302 1.3388,0.6522"
style="display:inline;fill:none;fill-rule:evenodd;stroke:#384e54;stroke-width:0.39730874;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,65 +1,46 @@
<!--{
"Title": "Help",
"Title": "Getting Help",
"Path": "/help/"
}-->
<div id="manual-nav"></div>
<h2 id="help">Get help</h2>
<img class="gopher" src="/doc/gopher/help.png"/>
<h3 id="mailinglist"><a href="https://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
<p>
Get help from Go users, and share your work on the official mailing list.
Need help with Go? Try these resources.
</p>
<div id="manual-nav"></div>
<h3 id="faq"><a href="/doc/faq">Frequently Asked Questions (FAQ)</a></h3>
<p>Answers to common questions about Go.</p>
<h3 id="playground"><a href="/play">The Go Playground</a></h3>
<p>A place to write, run, and share Go code.</p>
<h3 id="wiki"><a href="/wiki">The Go Wiki</a></h3>
<p>A wiki maintained by the Go community.</p>
<h3 id="mailinglist"><a href="//groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
<p>
Search the <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a>
Search the <a href="//groups.google.com/group/golang-nuts">golang-nuts</a>
archives and consult the <a href="/doc/go_faq.html">FAQ</a> and
<a href="//golang.org/wiki">wiki</a> before posting.
</p>
<h3 id="forum"><a href="https://forum.golangbridge.org/">Go Forum</a></h3>
<p>
The <a href="https://forum.golangbridge.org/">Go Forum</a> is a discussion
forum for Go programmers.
</p>
<h3 id="slack"><a href="https://blog.gopheracademy.com/gophers-slack-community/">Gopher Slack</a></h3>
<p>Get live support from other users in the Go slack channel.</p>
<h3 id="irc"><a href="irc:irc.freenode.net/go-nuts">Go IRC Channel</a></h3>
<p>Get live support at <b>#go-nuts</b> on <b>irc.freenode.net</b>, the official
Go IRC channel.</p>
<h3 id="faq"><a href="/doc/faq">Frequently Asked Questions (FAQ)</a></h3>
<p>Answers to common questions about Go.</p>
<h3 id="pluscom"><a href="https://plus.google.com/communities/114112804251407510571">The Go+ community</a></h3>
<p>The Google+ community for Go enthusiasts.</p>
<h2 id="inform">Stay informed</h2>
<h3 id="plus"><a href="https://plus.google.com/101406623878176903605/posts">The Go Programming Language at Google+</a></h3>
<p>The Go project's Google+ page.</p>
<h3 id="announce"><a href="https://groups.google.com/group/golang-announce">Go Announcements Mailing List</a></h3>
<p>
Subscribe to
<a href="https://groups.google.com/group/golang-announce">golang-announce</a>
for important announcements, such as the availability of new Go releases.
</p>
<h3 id="blog"><a href="//blog.golang.org">Go Blog</a></h3>
<p>The Go project's official blog.</p>
<h3 id="twitter"><a href="https://twitter.com/golang">@golang at Twitter</a></h3>
<h3 id="twitter"><a href="//twitter.com/golang">@golang at Twitter</a></h3>
<p>The Go project's official Twitter account.</p>
<h3 id="pluscom"><a href="https://plus.google.com/communities/114112804251407510571">Go+ community</a></h3>
<p>A Google+ community for Go enthusiasts.</p>
<h3 id="reddit"><a href="https://reddit.com/r/golang">golang sub-Reddit</a></h3>
<p>
The <a href="https://reddit.com/r/golang">golang sub-Reddit</a> is a place
for Go news and discussion.
</p>
<h2 id="community">Community resources</h2>
<p>Tweeting about your problem with the <code>#golang</code> hashtag usually
generates some helpful responses.</p>
<h3 id="go_user_groups"><a href="/wiki/GoUserGroups">Go User Groups</a></h3>
<p>
@@ -67,12 +48,6 @@ Each month in places around the world, groups of Go programmers ("gophers")
meet to talk about Go. Find a chapter near you.
</p>
<h3 id="playground"><a href="/play">Go Playground</a></h3>
<p>A place to write, run, and share Go code.</p>
<h3 id="wiki"><a href="/wiki">Go Wiki</a></h3>
<p>A wiki maintained by the Go community.</p>
<h3 id="conduct"><a href="/conduct">Code of Conduct</a></h3>
<p>
Guidelines for participating in Go community spaces

View File

@@ -33,7 +33,7 @@ compiler using the GCC back end, see
</p>
<p>
The Go compilers support eight instruction sets.
The Go compilers support five instruction sets.
There are important differences in the quality of the compilers for the different
architectures.
</p>
@@ -43,7 +43,9 @@ architectures.
<code>amd64</code> (also known as <code>x86-64</code>)
</dt>
<dd>
A mature implementation.
A mature implementation. The compiler has an effective
optimizer (registerizer) and generates good code (although
<code>gccgo</code> can do noticeably better sometimes).
</dd>
<dt>
<code>386</code> (<code>x86</code> or <code>x86-32</code>)
@@ -55,37 +57,19 @@ architectures.
<code>arm</code> (<code>ARM</code>)
</dt>
<dd>
Supports Linux, FreeBSD, NetBSD, OpenBSD and Darwin binaries. Less widely used than the other ports.
Supports Linux, FreeBSD, NetBSD and Darwin binaries. Less widely used than the other ports.
</dd>
<dt>
<code>arm64</code> (<code>AArch64</code>)
</dt>
<dd>
Supports Linux and Darwin binaries. New in 1.5 and not as well exercised as other ports.
Supports Linux and Darwin binaries. New in 1.5 and not as well excercised as other ports.
</dd>
<dt>
<code>ppc64, ppc64le</code> (64-bit PowerPC big- and little-endian)
</dt>
<dd>
Supports Linux binaries. New in 1.5 and not as well exercised as other ports.
</dd>
<dt>
<code>mips, mipsle</code> (32-bit MIPS big- and little-endian)
</dt>
<dd>
Supports Linux binaries. New in 1.8 and not as well exercised as other ports.
</dd>
<dt>
<code>mips64, mips64le</code> (64-bit MIPS big- and little-endian)
</dt>
<dd>
Supports Linux binaries. New in 1.6 and not as well exercised as other ports.
</dd>
<dt>
<code>s390x</code> (IBM System z)
</dt>
<dd>
Supports Linux binaries. New in 1.7 and not as well exercised as other ports.
Supports Linux binaries. New in 1.5 and not as well excercised as other ports.
</dd>
</dl>
@@ -103,17 +87,6 @@ The full set of supported combinations is listed in the discussion of
<a href="#environment">environment variables</a> below.
</p>
<p>
See the main installation page for the <a href="/doc/install#requirements">overall system requirements</a>.
The following additional constraints apply to systems that can be built only from source:
</p>
<ul>
<li>For Linux on PowerPC 64-bit, the minimum supported kernel version is 2.6.37, meaning that
Go does not support CentOS 6 on these systems.
</li>
</ul>
</div>
<h2 id="go14">Install Go compiler binaries</h2>
@@ -121,39 +94,27 @@ Go does not support CentOS 6 on these systems.
<p>
The Go tool chain is written in Go. To build it, you need a Go compiler installed.
The scripts that do the initial build of the tools look for an existing Go tool
chain in <code>$GOROOT_BOOTSTRAP</code>.
If unset, the default value of <code>GOROOT_BOOTSTRAP</code>
is <code>$HOME/go1.4</code>.
chain in <code>$HOME/go1.4</code>.
(This path may be overridden by setting the <code>GOROOT_BOOTSTRAP</code>
environment variable.)
</p>
<p>
There are many options for the bootstrap tool chain.
After obtaining one, set <code>GOROOT_BOOTSTRAP</code> to the
directory containing the unpacked tree.
For example, <code>$GOROOT_BOOTSTRAP/bin/go</code> should be
the <code>go</code> command binary for the bootstrap tool chain.
Build the tools with Go version 1.4 or a point release (1.4.1, 1.4.2 etc.).
Go 1.4 binaries can be found at <a href="/dl/">the downloads page</a>.
</p>
<p>
To use a binary release as a bootstrap tool chain, see
<a href="/dl/">the downloads page</a> or use any other
packaged Go distribution.
Download the zip or tarball of Go 1.4 for your platform and extract it to
<code>$HOME/go1.4</code> (or your nominated <code>GOROOT_BOOTSTRAP</code>
location).
</p>
<p>
To build a bootstrap tool chain from source, use
either the git branch <code>release-branch.go1.4</code> or
<a href="https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz">go1.4-bootstrap-20161024.tar.gz</a>,
which contains the Go 1.4 source code plus accumulated fixes
to keep the tools running on newer operating systems.
(Go 1.4 was the last distribution in which the tool chain was written in C.)
</p>
<p>
To cross-compile a bootstrap tool chain from source, which is
necessary on systems Go 1.4 did not target (for
example, <code>linux/ppc64le</code>), install Go on a different system
and run <a href="/src/bootstrap.bash">bootstrap.bash</a>.
If you want to install Go 1.5 on a system that is not supported by Go 1.4 (such
as <code>linux/ppc64</code>) you can either use
<a href="/src/bootstrap.bash">bootstrap.bash</a> on a system that can bootstrap Go
1.5 normally, or bootstrap with gccgo 5.
</p>
<p>
@@ -172,9 +133,8 @@ and used as <code>GOROOT_BOOTSTRAP</code> to bootstrap a local build.
</p>
<p>
To use gccgo as the bootstrap toolchain, you need to arrange
for <code>$GOROOT_BOOTSTRAP/bin/go</code> to be the go tool that comes
as part of gccgo 5. For example on Ubuntu Vivid:
To use gccgo, you need to arrange for <code>$GOROOT_BOOSTRAP/bin/go</code> to be
the go tool that comes as part of gccgo 5. For example on Ubuntu Vivid:
</p>
<pre>
@@ -196,40 +156,20 @@ follow the instructions on the
<a href="http://git-scm.com/downloads">Git downloads</a> page.
</p>
<h2 id="ccompiler">(Optional) Install a C compiler</h2>
<p>
To build a Go installation
with <code><a href="/cmd/cgo">cgo</a></code> support, which permits Go
programs to import C libraries, a C compiler such as <code>gcc</code>
or <code>clang</code> must be installed first. Do this using whatever
installation method is standard on the system.
</p>
<p>
To build without <code>cgo</code>, set the environment variable
<code>CGO_ENABLED=0</code> before running <code>all.bash</code> or
<code>make.bash</code>.
</p>
<h2 id="fetch">Fetch the repository</h2>
<p>Go will install to a directory named <code>go</code>.
Change to the directory that will be its parent
and make sure the <code>go</code> directory does not exist.
Then clone the repository and check out the latest release tag
(<code class="versionTag">go1.7.4</code>, for example):</p>
Then clone the repository and check out the latest release tag:</p>
<pre>
$ git clone https://go.googlesource.com/go
$ cd go
$ git checkout <span class="versionTag"><i>&lt;tag&gt;</i></span>
$ git checkout go1.5.3
</pre>
<p class="whereTag">
Where <code>&lt;tag&gt;</code> is the version string of the release.
</p>
<h2 id="head">(Optional) Switch to the master branch</h2>
<p>If you intend to modify the go source code, and
@@ -335,7 +275,7 @@ You just need to do a little more setup.
</p>
<p>
The <a href="/doc/code.html">How to Write Go Code</a> document
The <a href="/doc/code.html">How to Write Go Code</a> document
provides <b>essential setup instructions</b> for using the Go tools.
</p>
@@ -361,7 +301,7 @@ $ go get golang.org/x/tools/cmd/godoc
</pre>
<p>
To install these tools, the <code>go</code> <code>get</code> command requires
To install these tools, the <code>go</code> <code>get</code> command requires
that <a href="#git">Git</a> be installed locally.
</p>
@@ -406,7 +346,7 @@ New releases are announced on the
<a href="//groups.google.com/group/golang-announce">golang-announce</a>
mailing list.
Each announcement mentions the latest release tag, for instance,
<code class="versionTag">go1.7.4</code>.
<code>go1.5.3</code>.
</p>
<p>
@@ -416,13 +356,11 @@ To update an existing tree to the latest release, you can run:
<pre>
$ cd go/src
$ git fetch
$ git checkout <span class="versionTag"><i>&lt;tag&gt;</i></psan>
$ git checkout <i>&lt;tag&gt;</i>
$ ./all.bash
</pre>
<p class="whereTag">
Where <code>&lt;tag&gt;</code> is the version string of the release.
</p>
<h2 id="environment">Optional environment variables</h2>
@@ -436,7 +374,7 @@ to override the defaults.
<ul>
<li><code>$GOROOT</code>
<p>
The root of the Go tree, often <code>$HOME/go1.X</code>.
The root of the Go tree, often <code>$HOME/go</code>.
Its value is built into the tree when it is compiled, and
defaults to the parent of the directory where <code>all.bash</code> was run.
There is no need to set this unless you want to switch between multiple
@@ -449,7 +387,7 @@ The value assumed by installed binaries and scripts when
<code>$GOROOT</code> is not set explicitly.
It defaults to the value of <code>$GOROOT</code>.
If you want to build the Go tree in one location
but move it elsewhere after the build, set
but move it elsewhere after the build, set
<code>$GOROOT_FINAL</code> to the eventual location.
</p>
@@ -461,24 +399,19 @@ These default to the values of <code>$GOHOSTOS</code> and
<p>
Choices for <code>$GOOS</code> are
<code>darwin</code> (Mac OS X 10.8 and above and iOS), <code>dragonfly</code>, <code>freebsd</code>,
<code>darwin</code> (Mac OS X 10.7 and above and iOS), <code>dragonfly</code>, <code>freebsd</code>,
<code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,
<code>plan9</code>, <code>solaris</code> and <code>windows</code>.
Choices for <code>$GOARCH</code> are
<code>amd64</code> (64-bit x86, the most mature port),
<code>386</code> (32-bit x86), <code>arm</code> (32-bit ARM), <code>arm64</code> (64-bit ARM),
<code>ppc64le</code> (PowerPC 64-bit, little-endian), <code>ppc64</code> (PowerPC 64-bit, big-endian),
<code>mips64le</code> (MIPS 64-bit, little-endian), and <code>mips64</code> (MIPS 64-bit, big-endian).
<code>mipsle</code> (MIPS 32-bit, little-endian), and <code>mips</code> (MIPS 32-bit, big-endian).
<code>ppc64le</code> (PowerPC 64-bit, little-endian), and <code>ppc64</code> (PowerPC 64-bit, big-endian).
The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
<table cellpadding="0">
<tr>
<th width="50"></th><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th>
</tr>
<tr>
<td></td><td><code>android</code></td> <td><code>arm</code></td>
</tr>
<tr>
<td></td><td><code>darwin</code></td> <td><code>386</code></td>
</tr>
<tr>
@@ -521,18 +454,6 @@ The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
<td></td><td><code>linux</code></td> <td><code>ppc64le</code></td>
</tr>
<tr>
<td></td><td><code>linux</code></td> <td><code>mips</code></td>
</tr>
<tr>
<td></td><td><code>linux</code></td> <td><code>mipsle</code></td>
</tr>
<tr>
<td></td><td><code>linux</code></td> <td><code>mips64</code></td>
</tr>
<tr>
<td></td><td><code>linux</code></td> <td><code>mips64le</code></td>
</tr>
<tr>
<td></td><td><code>netbsd</code></td> <td><code>386</code></td>
</tr>
<tr>
@@ -579,7 +500,7 @@ architecture.
Valid choices are the same as for <code>$GOOS</code> and
<code>$GOARCH</code>, listed above.
The specified values must be compatible with the local system.
For example, you should not set <code>$GOHOSTARCH</code> to
For example, you should not set <code>$GOHOSTARCH</code> to
<code>arm</code> on an x86 system.
</p>
@@ -640,12 +561,12 @@ not <code>amd64</code>.
<p>
If you choose to override the defaults,
set these variables in your shell profile (<code>$HOME/.bashrc</code>,
<code>$HOME/.profile</code>, or equivalent). The settings might look
<code>$HOME/.profile</code>, or equivalent). The settings might look
something like this:
</p>
<pre>
export GOROOT=$HOME/go1.X
export GOROOT=$HOME/go
export GOARCH=amd64
export GOOS=linux
</pre>

View File

@@ -17,7 +17,7 @@
<p>
<a href="https://golang.org/dl/" target="_blank">Official binary
distributions</a> are available for the FreeBSD (release 8-STABLE and above),
Linux, Mac OS X (10.8 and above), and Windows operating systems and
Linux, Mac OS X (10.7 and above), and Windows operating systems and
the 32-bit (<code>386</code>) and 64-bit (<code>amd64</code>) x86 processor
architectures.
</p>
@@ -47,14 +47,14 @@ If your OS or architecture is not on the list, you may be able to
<th align="center">Notes</th>
</tr>
<tr><td colspan="3"><hr></td></tr>
<tr><td>FreeBSD 8-STABLE or later</td> <td>amd64, 386</td> <td>Debian GNU/kFreeBSD not supported</td></tr>
<tr><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm, s390x, ppc64le</td> <td>CentOS/RHEL 5.x not supported</td></tr>
<tr><td>Mac OS X 10.8 or later</td> <td>amd64</td> <td>use the clang or gcc<sup>&#8224;</sup> that comes with Xcode<sup>&#8225;</sup> for <code>cgo</code> support</td></tr>
<tr><td>FreeBSD 8-STABLE or later</td> <td>amd64</td> <td>Debian GNU/kFreeBSD not supported</td></tr>
<tr><td>Linux 2.6.23 or later with glibc</td> <td>amd64, 386, arm</td> <td>CentOS/RHEL 5.x not supported; install from source for ARM</td></tr>
<tr><td>Mac OS X 10.7 or later</td> <td>amd64</td> <td>use the clang or gcc<sup>&#8224;</sup> that comes with Xcode<sup>&#8225;</sup></td></tr>
<tr><td>Windows XP or later</td> <td>amd64, 386</td> <td>use MinGW gcc<sup>&#8224;</sup>. No need for cygwin or msys.</td></tr>
</table>
<p>
<sup>&#8224;</sup>A C compiler is required only if you plan to use
<sup>&#8224;</sup><code>gcc</code> is required only if you plan to use
<a href="/cmd/cgo">cgo</a>.<br/>
<sup>&#8225;</sup>You only need to install the command line tools for
<a href="http://developer.apple.com/Xcode/">Xcode</a>. If you have already
@@ -117,12 +117,12 @@ to point to the directory in which it was installed.
</p>
<p>
For example, if you installed Go to your home directory you should add
commands like the following to <code>$HOME/.profile</code>:
For example, if you installed Go to your home directory you should add the
following commands to <code>$HOME/.profile</code>:
</p>
<pre>
export GOROOT=$HOME/go1.X
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
</pre>
@@ -219,16 +219,27 @@ and building a simple program, as follows.
</p>
<p>
Create your <a href="code.html#Workspaces">workspace</a> directory,
<code class="testUnix">$HOME/go</code><code class="testWindows">%USERPROFILE%\go</code>.
(If you'd like to use a different directory,
you will need to set the <code>GOPATH</code> environment variable;
see <a href="code.html#Workspaces">How to Write Go Code</a> for details.)
Create a directory to contain your <a href="code.html#Workspaces">workspace</a>,
<code>$HOME/work</code> for example, and set the <code>GOPATH</code> environment
variable to point to that location.
</p>
<pre>
$ <b>export GOPATH=$HOME/work</b>
</pre>
<p>
You should put the above command in your shell startup script
(<code>$HOME/.profile</code> for example) or, if you use Windows,
follow the <a href="#windows_env">instructions above</a> to set the
<code>GOPATH</code> environment variable on your system.
</p>
<p>
Next, make the directory <code>src/hello</code> inside your workspace,
and in that directory create a file named <code>hello.go</code> that looks like:
Next, make the directories <code>src/github.com/user/hello</code> inside your
workspace (if you use GitHub, substitute your user name for <code>user</code>),
and inside the <code>hello</code> directory create a file named <code>hello.go</code>
with the following contents:
</p>
<pre>
@@ -242,33 +253,21 @@ func main() {
</pre>
<p>
Then build it with the <code>go</code> tool:
Then compile it with the <code>go</code> tool:
</p>
<pre class="testUnix">
$ <b>cd $HOME/go/src/hello</b>
$ <b>go build</b>
</pre>
<pre class="testWindows" style="display: none">
C:\&gt; <b>cd %USERPROFILE%\go\src\hello</b>
C:\Users\Gopher\go\src\hello&gt; <b>go build</b>
<pre>
$ <b>go install github.com/user/hello</b>
</pre>
<p>
The command above will build an executable named
<code class="testUnix">hello</code><code class="testWindows">hello.exe</code>
in the directory alongside your source code.
Execute it to see the greeting:
The above command will put an executable command named <code>hello</code>
(or <code>hello.exe</code>) inside the <code>bin</code> directory of your workspace.
Execute the command to see the greeting:
</p>
<pre class="testUnix">
$ <b>./hello</b>
hello, world
</pre>
<pre class="testWindows" style="display: none">
C:\Users\Gopher\go\src\hello&gt; <b>hello</b>
<pre>
$ <b>$GOPATH/bin/hello</b>
hello, world
</pre>
@@ -276,12 +275,6 @@ hello, world
If you see the "hello, world" message then your Go installation is working.
</p>
<p>
You can run <code>go</code> <code>install</code> to install the binary into
your workspace's <code>bin</code> directory
or <code>go</code> <code>clean</code> to remove it.
</p>
<p>
Before rushing off to write Go code please read the
<a href="/doc/code.html">How to Write Go Code</a> document,
@@ -313,10 +306,16 @@ environment variables under Windows</a>.
<h2 id="help">Getting help</h2>
<p>
For help, see the <a href="/help/">list of Go mailing lists, forums, and places to chat</a>.
For real-time help, ask the helpful gophers in <code>#go-nuts</code> on the
<a href="http://freenode.net/">Freenode</a> IRC server.
</p>
<p>
Report bugs either by running “<b><code>go</code> <code>bug</code></b>”, or
manually at the <a href="https://golang.org/issue">Go issue tracker</a>.
The official mailing list for discussion of the Go language is
<a href="//groups.google.com/group/golang-nuts">Go Nuts</a>.
</p>
<p>
Report bugs using the
<a href="//golang.org/issue">Go issue tracker</a>.
</p>

View File

@@ -1,5 +1,5 @@
// Concurrent computation of pi.
// See https://goo.gl/la6Kli.
// See http://goo.gl/ZuTZM.
//
// This demonstrates Go's ability to handle
// large numbers of concurrent processes.

View File

@@ -28,7 +28,7 @@ func Encode() {
expected := []byte(`{"Name":"Alice","Body":"Hello","Time":1294706395881547000}`)
if !reflect.DeepEqual(b, expected) {
log.Panicf("Error marshaling %q, expected %q, got %q.", m, expected, b)
log.Panicf("Error marshalling %q, expected %q, got %q.", m, expected, b)
}
}
@@ -49,7 +49,7 @@ func Decode() {
}
if !reflect.DeepEqual(m, expected) {
log.Panicf("Error unmarshaling %q, expected %q, got %q.", b, expected, m)
log.Panicf("Error unmarshalling %q, expected %q, got %q.", b, expected, m)
}
m = Message{
@@ -77,7 +77,7 @@ func PartialDecode() {
}
if !reflect.DeepEqual(expected, m) {
log.Panicf("Error unmarshaling %q, expected %q, got %q.", b, expected, m)
log.Panicf("Error unmarshalling %q, expected %q, got %q.", b, expected, m)
}
}

View File

@@ -33,7 +33,7 @@ func Decode() {
}
if !reflect.DeepEqual(f, expected) {
log.Panicf("Error unmarshaling %q, expected %q, got %q", b, expected, f)
log.Panicf("Error unmarshalling %q, expected %q, got %q", b, expected, f)
}
f = map[string]interface{}{

View File

@@ -36,7 +36,7 @@ func Decode() {
}
if !reflect.DeepEqual(expected, m) {
log.Panicf("Error unmarshaling %q, expected %q, got %q", b, expected, m)
log.Panicf("Error unmarshalling %q, expected %q, got %q", b, expected, m)
}
}

0
doc/progs/run.go Normal file → Executable file
View File

View File

@@ -71,7 +71,7 @@ This person coordinates the fix and release process.</li>
<li>If it is determined, in consultation with the submitter, that a CVE-ID is
required, the primary handler obtains one via email to
<a href="http://oss-security.openwall.org/wiki/mailing-lists/distros">oss-distros</a>.</li>
<li>Fixes are prepared for the two most recent major releases and the head/master
<li>Fixes are prepared for the current stable release and the head/master
revision. These fixes are not yet committed to the public repository.</li>
<li>A notification is sent to the
<a href="https://groups.google.com/group/golang-announce">golang-announce</a>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,15 +1,14 @@
#!/bin/bash
# Copyright 2012 The Go Authors. All rights reserved.
#!/bin/sh
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This script rebuilds the time zone files using files
# downloaded from the ICANN/IANA distribution.
# Consult http://www.iana.org/time-zones for the latest versions.
# Versions to use.
CODE=2016j
DATA=2016j
CODE=2015e
DATA=2015e
set -e
rm -rf work

Binary file not shown.

View File

@@ -1,4 +1,4 @@
// Copyright 2014 The Go Authors. All rights reserved.
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -91,11 +91,11 @@ func main() {
run("shell", "rm", "-rf", deviceGotmp) // Clean up.
exitIdx := strings.LastIndex(output, exitstr)
if exitIdx == -1 {
output = output[strings.LastIndex(output, "\n")+1:]
if !strings.HasPrefix(output, exitstr) {
log.Fatalf("no exit code: %q", output)
}
code, err := strconv.Atoi(output[exitIdx+len(exitstr):])
code, err := strconv.Atoi(output[len(exitstr):])
if err != nil {
log.Fatalf("bad exit code: %v", err)
}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright 2010 The Go Authors. All rights reserved.
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2014 The Go Authors. All rights reserved.
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,15 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
/*
//enum test { foo, bar };
*/
import "C"
func main() {
var a = C.enum_test(1) // ERROR HERE
_ = a
}

View File

@@ -1,15 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
/*
//enum test { foo, bar };
*/
import "C"
func main() {
p := new(C.enum_test) // ERROR HERE
_ = p
}

View File

@@ -1,14 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// issue 13129: used to output error about C.unsignedshort with CC=clang
package main
import "C"
func main() {
var x C.ushort
x = int(0) // ERROR HERE
}

View File

@@ -1,12 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
// #include <stdio.h>
import "C"
func main() {
_ = C.fopen() // ERROR HERE
}

View File

@@ -1,24 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// issue 13635: used to output error about C.unsignedchar.
// This test tests all such types.
package pkg
import "C"
func main() {
var (
_ C.uchar = "uc" // ERROR HERE
_ C.schar = "sc" // ERROR HERE
_ C.ushort = "us" // ERROR HERE
_ C.uint = "ui" // ERROR HERE
_ C.ulong = "ul" // ERROR HERE
_ C.longlong = "ll" // ERROR HERE
_ C.ulonglong = "ull" // ERROR HERE
_ C.complexfloat = "cf" // ERROR HERE
_ C.complexdouble = "cd" // ERROR HERE
)
}

View File

@@ -1,26 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// cgo converts C void* to Go unsafe.Pointer, so despite appearances C
// void** is Go *unsafe.Pointer. This test verifies that we detect the
// problem at build time.
package main
// typedef void v;
// void F(v** p) {}
import "C"
import "unsafe"
type v [0]byte
func f(p **v) {
C.F((**C.v)(unsafe.Pointer(p))) // ERROR HERE
}
func main() {
var p *v
f(&p)
}

View File

@@ -1,23 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 14669: test that fails when build with CGO_CFLAGS selecting
// optimization.
package p
/*
const int E = 1;
typedef struct s {
int c;
} s;
*/
import "C"
func F() {
_ = C.s{
c: C.E,
}
}

View File

@@ -1,12 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
// void f(void *p, int x) {}
import "C"
func main() {
_ = C.f(1) // ERROR HERE
}

View File

@@ -1,17 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 16591: Test that we detect an invalid call that was being
// hidden by a type conversion inserted by cgo checking.
package p
// void f(int** p) { }
import "C"
type x *C.int
func F(p *x) {
C.f(p) // ERROR HERE
}

View File

@@ -1,4 +1,4 @@
// Copyright 2014 The Go Authors. All rights reserved.
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2014 The Go Authors. All rights reserved.
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,34 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test that C.malloc does not return nil.
package main
// #include <stdlib.h>
import "C"
import (
"fmt"
"runtime"
)
func main() {
var size C.size_t
size--
// The Dragonfly libc succeeds when asked to allocate
// 0xffffffffffffffff bytes, so pass a different value that
// causes it to fail.
if runtime.GOOS == "dragonfly" {
size = C.size_t(0x7fffffff << (32 * (^uintptr(0) >> 63)))
}
p := C.malloc(size)
if p == nil {
fmt.Println("malloc: C.malloc returned nil")
// Just exit normally--the test script expects this
// program to crash, so exiting normally indicates failure.
}
}

View File

@@ -1,576 +0,0 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Tests that cgo detects invalid pointer passing at runtime.
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"sync"
)
// ptrTest is the tests without the boilerplate.
type ptrTest struct {
name string // for reporting
c string // the cgo comment
imports []string // a list of imports
support string // supporting functions
body string // the body of the main function
extra []extra // extra files
fail bool // whether the test should fail
expensive bool // whether the test requires the expensive check
}
type extra struct {
name string
contents string
}
var ptrTests = []ptrTest{
{
// Passing a pointer to a struct that contains a Go pointer.
name: "ptr1",
c: `typedef struct s { int *p; } s; void f(s *ps) {}`,
body: `C.f(&C.s{new(C.int)})`,
fail: true,
},
{
// Passing a pointer to a struct that contains a Go pointer.
name: "ptr2",
c: `typedef struct s { int *p; } s; void f(s *ps) {}`,
body: `p := &C.s{new(C.int)}; C.f(p)`,
fail: true,
},
{
// Passing a pointer to an int field of a Go struct
// that (irrelevantly) contains a Go pointer.
name: "ok1",
c: `struct s { int i; int *p; }; void f(int *p) {}`,
body: `p := &C.struct_s{i: 0, p: new(C.int)}; C.f(&p.i)`,
fail: false,
},
{
// Passing a pointer to a pointer field of a Go struct.
name: "ptr-field",
c: `struct s { int i; int *p; }; void f(int **p) {}`,
body: `p := &C.struct_s{i: 0, p: new(C.int)}; C.f(&p.p)`,
fail: true,
},
{
// Passing a pointer to a pointer field of a Go
// struct, where the field does not contain a Go
// pointer, but another field (irrelevantly) does.
name: "ptr-field-ok",
c: `struct s { int *p1; int *p2; }; void f(int **p) {}`,
body: `p := &C.struct_s{p1: nil, p2: new(C.int)}; C.f(&p.p1)`,
fail: false,
},
{
// Passing the address of a slice with no Go pointers.
name: "slice-ok-1",
c: `void f(void **p) {}`,
imports: []string{"unsafe"},
body: `s := []unsafe.Pointer{nil}; C.f(&s[0])`,
fail: false,
},
{
// Passing the address of a slice with a Go pointer.
name: "slice-ptr-1",
c: `void f(void **p) {}`,
imports: []string{"unsafe"},
body: `i := 0; s := []unsafe.Pointer{unsafe.Pointer(&i)}; C.f(&s[0])`,
fail: true,
},
{
// Passing the address of a slice with a Go pointer,
// where we are passing the address of an element that
// is not a Go pointer.
name: "slice-ptr-2",
c: `void f(void **p) {}`,
imports: []string{"unsafe"},
body: `i := 0; s := []unsafe.Pointer{nil, unsafe.Pointer(&i)}; C.f(&s[0])`,
fail: true,
},
{
// Passing the address of a slice that is an element
// in a struct only looks at the slice.
name: "slice-ok-2",
c: `void f(void **p) {}`,
imports: []string{"unsafe"},
support: `type S struct { p *int; s []unsafe.Pointer }`,
body: `i := 0; p := &S{p:&i, s:[]unsafe.Pointer{nil}}; C.f(&p.s[0])`,
fail: false,
},
{
// Passing the address of a slice of an array that is
// an element in a struct, with a type conversion.
name: "slice-ok-3",
c: `void f(void* p) {}`,
imports: []string{"unsafe"},
support: `type S struct { p *int; a [4]byte }`,
body: `i := 0; p := &S{p:&i}; s := p.a[:]; C.f(unsafe.Pointer(&s[0]))`,
fail: false,
},
{
// Passing the address of a slice of an array that is
// an element in a struct, with a type conversion.
name: "slice-ok-4",
c: `typedef void* PV; void f(PV p) {}`,
imports: []string{"unsafe"},
support: `type S struct { p *int; a [4]byte }`,
body: `i := 0; p := &S{p:&i}; C.f(C.PV(unsafe.Pointer(&p.a[0])))`,
fail: false,
},
{
// Passing the address of a static variable with no
// pointers doesn't matter.
name: "varok",
c: `void f(char** parg) {}`,
support: `var hello = [...]C.char{'h', 'e', 'l', 'l', 'o'}`,
body: `parg := [1]*C.char{&hello[0]}; C.f(&parg[0])`,
fail: false,
},
{
// Passing the address of a static variable with
// pointers does matter.
name: "var",
c: `void f(char*** parg) {}`,
support: `var hello = [...]*C.char{new(C.char)}`,
body: `parg := [1]**C.char{&hello[0]}; C.f(&parg[0])`,
fail: true,
},
{
// Storing a Go pointer into C memory should fail.
name: "barrier",
c: `#include <stdlib.h>
char **f1() { return malloc(sizeof(char*)); }
void f2(char **p) {}`,
body: `p := C.f1(); *p = new(C.char); C.f2(p)`,
fail: true,
expensive: true,
},
{
// Storing a Go pointer into C memory by assigning a
// large value should fail.
name: "barrier-struct",
c: `#include <stdlib.h>
struct s { char *a[10]; };
struct s *f1() { return malloc(sizeof(struct s)); }
void f2(struct s *p) {}`,
body: `p := C.f1(); p.a = [10]*C.char{new(C.char)}; C.f2(p)`,
fail: true,
expensive: true,
},
{
// Storing a Go pointer into C memory using a slice
// copy should fail.
name: "barrier-slice",
c: `#include <stdlib.h>
struct s { char *a[10]; };
struct s *f1() { return malloc(sizeof(struct s)); }
void f2(struct s *p) {}`,
body: `p := C.f1(); copy(p.a[:], []*C.char{new(C.char)}); C.f2(p)`,
fail: true,
expensive: true,
},
{
// A very large value uses a GC program, which is a
// different code path.
name: "barrier-gcprog-array",
c: `#include <stdlib.h>
struct s { char *a[32769]; };
struct s *f1() { return malloc(sizeof(struct s)); }
void f2(struct s *p) {}`,
body: `p := C.f1(); p.a = [32769]*C.char{new(C.char)}; C.f2(p)`,
fail: true,
expensive: true,
},
{
// Similar case, with a source on the heap.
name: "barrier-gcprog-array-heap",
c: `#include <stdlib.h>
struct s { char *a[32769]; };
struct s *f1() { return malloc(sizeof(struct s)); }
void f2(struct s *p) {}
void f3(void *p) {}`,
imports: []string{"unsafe"},
body: `p := C.f1(); n := &[32769]*C.char{new(C.char)}; p.a = *n; C.f2(p); n[0] = nil; C.f3(unsafe.Pointer(n))`,
fail: true,
expensive: true,
},
{
// A GC program with a struct.
name: "barrier-gcprog-struct",
c: `#include <stdlib.h>
struct s { char *a[32769]; };
struct s2 { struct s f; };
struct s2 *f1() { return malloc(sizeof(struct s2)); }
void f2(struct s2 *p) {}`,
body: `p := C.f1(); p.f = C.struct_s{[32769]*C.char{new(C.char)}}; C.f2(p)`,
fail: true,
expensive: true,
},
{
// Similar case, with a source on the heap.
name: "barrier-gcprog-struct-heap",
c: `#include <stdlib.h>
struct s { char *a[32769]; };
struct s2 { struct s f; };
struct s2 *f1() { return malloc(sizeof(struct s2)); }
void f2(struct s2 *p) {}
void f3(void *p) {}`,
imports: []string{"unsafe"},
body: `p := C.f1(); n := &C.struct_s{[32769]*C.char{new(C.char)}}; p.f = *n; C.f2(p); n.a[0] = nil; C.f3(unsafe.Pointer(n))`,
fail: true,
expensive: true,
},
{
// Exported functions may not return Go pointers.
name: "export1",
c: `extern unsigned char *GoFn();`,
support: `//export GoFn
func GoFn() *byte { return new(byte) }`,
body: `C.GoFn()`,
fail: true,
},
{
// Returning a C pointer is fine.
name: "exportok",
c: `#include <stdlib.h>
extern unsigned char *GoFn();`,
support: `//export GoFn
func GoFn() *byte { return (*byte)(C.malloc(1)) }`,
body: `C.GoFn()`,
},
{
// Passing a Go string is fine.
name: "pass-string",
c: `#include <stddef.h>
typedef struct { const char *p; ptrdiff_t n; } gostring;
gostring f(gostring s) { return s; }`,
imports: []string{"unsafe"},
body: `s := "a"; r := C.f(*(*C.gostring)(unsafe.Pointer(&s))); if *(*string)(unsafe.Pointer(&r)) != s { panic(r) }`,
},
{
// Passing a slice of Go strings fails.
name: "pass-string-slice",
c: `void f(void *p) {}`,
imports: []string{"strings", "unsafe"},
support: `type S struct { a [1]string }`,
body: `s := S{a:[1]string{strings.Repeat("a", 2)}}; C.f(unsafe.Pointer(&s.a[0]))`,
fail: true,
},
{
// Exported functions may not return strings.
name: "ret-string",
c: `extern void f();`,
imports: []string{"strings"},
support: `//export GoStr
func GoStr() string { return strings.Repeat("a", 2) }`,
body: `C.f()`,
extra: []extra{
{
"call.c",
`#include <stddef.h>
typedef struct { const char *p; ptrdiff_t n; } gostring;
extern gostring GoStr();
void f() { GoStr(); }`,
},
},
fail: true,
},
{
// Don't check non-pointer data.
// Uses unsafe code to get a pointer we shouldn't check.
// Although we use unsafe, the uintptr represents an integer
// that happens to have the same representation as a pointer;
// that is, we are testing something that is not unsafe.
name: "ptrdata1",
c: `#include <stdlib.h>
void f(void* p) {}`,
imports: []string{"unsafe"},
support: `type S struct { p *int; a [8*8]byte; u uintptr }`,
body: `i := 0; p := &S{u:uintptr(unsafe.Pointer(&i))}; q := (*S)(C.malloc(C.size_t(unsafe.Sizeof(*p)))); *q = *p; C.f(unsafe.Pointer(q))`,
fail: false,
},
{
// Like ptrdata1, but with a type that uses a GC program.
name: "ptrdata2",
c: `#include <stdlib.h>
void f(void* p) {}`,
imports: []string{"unsafe"},
support: `type S struct { p *int; a [32769*8]byte; q *int; u uintptr }`,
body: `i := 0; p := S{u:uintptr(unsafe.Pointer(&i))}; q := (*S)(C.malloc(C.size_t(unsafe.Sizeof(p)))); *q = p; C.f(unsafe.Pointer(q))`,
fail: false,
},
{
// Check deferred pointers when they are used, not
// when the defer statement is run.
name: "defer",
c: `typedef struct s { int *p; } s; void f(s *ps) {}`,
body: `p := &C.s{}; defer C.f(p); p.p = new(C.int)`,
fail: true,
},
{
// Check a pointer to a union if the union has any
// pointer fields.
name: "union1",
c: `typedef union { char **p; unsigned long i; } u; void f(u *pu) {}`,
imports: []string{"unsafe"},
body: `var b C.char; p := &b; C.f((*C.u)(unsafe.Pointer(&p)))`,
fail: true,
},
{
// Don't check a pointer to a union if the union does
// not have any pointer fields.
// Like ptrdata1 above, the uintptr represents an
// integer that happens to have the same
// representation as a pointer.
name: "union2",
c: `typedef union { unsigned long i; } u; void f(u *pu) {}`,
imports: []string{"unsafe"},
body: `var b C.char; p := &b; C.f((*C.u)(unsafe.Pointer(&p)))`,
fail: false,
},
}
func main() {
os.Exit(doTests())
}
func doTests() int {
gopath, err := ioutil.TempDir("", "cgoerrors")
if err != nil {
fmt.Fprintln(os.Stderr, err)
return 2
}
defer os.RemoveAll(gopath)
if err := os.MkdirAll(filepath.Join(gopath, "src"), 0777); err != nil {
fmt.Fprintln(os.Stderr, err)
return 2
}
workers := runtime.NumCPU() + 1
var wg sync.WaitGroup
c := make(chan int)
errs := make(chan int)
for i := 0; i < workers; i++ {
wg.Add(1)
go func() {
worker(gopath, c, errs)
wg.Done()
}()
}
for i := range ptrTests {
c <- i
}
close(c)
go func() {
wg.Wait()
close(errs)
}()
tot := 0
for e := range errs {
tot += e
}
return tot
}
func worker(gopath string, c, errs chan int) {
e := 0
for i := range c {
if !doOne(gopath, i) {
e++
}
}
if e > 0 {
errs <- e
}
}
func doOne(gopath string, i int) bool {
t := &ptrTests[i]
dir := filepath.Join(gopath, "src", fmt.Sprintf("dir%d", i))
if err := os.Mkdir(dir, 0777); err != nil {
fmt.Fprintln(os.Stderr, err)
return false
}
name := filepath.Join(dir, fmt.Sprintf("t%d.go", i))
f, err := os.Create(name)
if err != nil {
fmt.Fprintln(os.Stderr, err)
return false
}
b := bufio.NewWriter(f)
fmt.Fprintln(b, `package main`)
fmt.Fprintln(b)
fmt.Fprintln(b, `/*`)
fmt.Fprintln(b, t.c)
fmt.Fprintln(b, `*/`)
fmt.Fprintln(b, `import "C"`)
fmt.Fprintln(b)
for _, imp := range t.imports {
fmt.Fprintln(b, `import "`+imp+`"`)
}
if len(t.imports) > 0 {
fmt.Fprintln(b)
}
if len(t.support) > 0 {
fmt.Fprintln(b, t.support)
fmt.Fprintln(b)
}
fmt.Fprintln(b, `func main() {`)
fmt.Fprintln(b, t.body)
fmt.Fprintln(b, `}`)
if err := b.Flush(); err != nil {
fmt.Fprintf(os.Stderr, "flushing %s: %v\n", name, err)
return false
}
if err := f.Close(); err != nil {
fmt.Fprintf(os.Stderr, "closing %s: %v\n", name, err)
return false
}
for _, e := range t.extra {
if err := ioutil.WriteFile(filepath.Join(dir, e.name), []byte(e.contents), 0644); err != nil {
fmt.Fprintf(os.Stderr, "writing %s: %v\n", e.name, err)
return false
}
}
ok := true
cmd := exec.Command("go", "build")
cmd.Dir = dir
cmd.Env = addEnv("GOPATH", gopath)
buf, err := cmd.CombinedOutput()
if err != nil {
fmt.Fprintf(os.Stderr, "test %s failed to build: %v\n%s", t.name, err, buf)
return false
}
exe := filepath.Join(dir, filepath.Base(dir))
cmd = exec.Command(exe)
cmd.Dir = dir
if t.expensive {
cmd.Env = cgocheckEnv("1")
buf, err := cmd.CombinedOutput()
if err != nil {
var errbuf bytes.Buffer
if t.fail {
fmt.Fprintf(&errbuf, "test %s marked expensive but failed when not expensive: %v\n", t.name, err)
} else {
fmt.Fprintf(&errbuf, "test %s failed unexpectedly with GODEBUG=cgocheck=1: %v\n", t.name, err)
}
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
}
cmd = exec.Command(exe)
cmd.Dir = dir
}
if t.expensive {
cmd.Env = cgocheckEnv("2")
}
buf, err = cmd.CombinedOutput()
if t.fail {
if err == nil {
var errbuf bytes.Buffer
fmt.Fprintf(&errbuf, "test %s did not fail as expected\n", t.name)
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
} else if !bytes.Contains(buf, []byte("Go pointer")) {
var errbuf bytes.Buffer
fmt.Fprintf(&errbuf, "test %s output does not contain expected error (failed with %v)\n", t.name, err)
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
}
} else {
if err != nil {
var errbuf bytes.Buffer
fmt.Fprintf(&errbuf, "test %s failed unexpectedly: %v\n", t.name, err)
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
}
if !t.expensive && ok {
// Make sure it passes with the expensive checks.
cmd := exec.Command(exe)
cmd.Dir = dir
cmd.Env = cgocheckEnv("2")
buf, err := cmd.CombinedOutput()
if err != nil {
var errbuf bytes.Buffer
fmt.Fprintf(&errbuf, "test %s failed unexpectedly with expensive checks: %v\n", t.name, err)
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
}
}
}
if t.fail && ok {
cmd = exec.Command(exe)
cmd.Dir = dir
cmd.Env = cgocheckEnv("0")
buf, err := cmd.CombinedOutput()
if err != nil {
var errbuf bytes.Buffer
fmt.Fprintf(&errbuf, "test %s failed unexpectedly with GODEBUG=cgocheck=0: %v\n", t.name, err)
reportTestOutput(&errbuf, t.name, buf)
os.Stderr.Write(errbuf.Bytes())
ok = false
}
}
return ok
}
func reportTestOutput(w io.Writer, name string, buf []byte) {
fmt.Fprintf(w, "=== test %s output ===\n", name)
fmt.Fprintf(w, "%s", buf)
fmt.Fprintf(w, "=== end of test %s output ===\n", name)
}
func cgocheckEnv(val string) []string {
return addEnv("GODEBUG", "cgocheck="+val)
}
func addEnv(key, val string) []string {
env := []string{key + "=" + val}
look := key + "="
for _, e := range os.Environ() {
if !strings.HasPrefix(e, look) {
env = append(env, e)
}
}
return env
}

View File

@@ -11,27 +11,19 @@ check() {
echo 1>&2 misc/cgo/errors/test.bash: BUG: cannot find ERROR HERE in $file
exit 1
fi
expect $file $file:$line:
}
expect() {
file=$1
shift
if go build $file >errs 2>&1; then
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail on $file but it succeeded
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected cgo to fail but it succeeded
exit 1
fi
if ! test -s errs; then
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output for $file but saw none
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output but saw none
exit 1
fi
if ! fgrep $file:$line: errs >/dev/null 2>&1; then
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error on line $line but saw:
cat 1>&2 errs
exit 1
fi
for error; do
if ! fgrep $error errs >/dev/null 2>&1; then
echo 1>&2 misc/cgo/errors/test.bash: BUG: expected error output for $file to contain \"$error\" but saw:
cat 1>&2 errs
exit 1
fi
done
}
check err1.go
@@ -39,35 +31,6 @@ check err2.go
check err3.go
check issue7757.go
check issue8442.go
check issue11097a.go
check issue11097b.go
expect issue13129.go C.ushort
check issue13423.go
expect issue13635.go C.uchar C.schar C.ushort C.uint C.ulong C.longlong C.ulonglong C.complexfloat C.complexdouble
check issue13830.go
check issue16116.go
check issue16591.go
if ! go build issue14669.go; then
exit 1
fi
if ! CGO_CFLAGS="-O" go build issue14669.go; then
exit 1
fi
if ! go run ptr.go; then
exit 1
fi
# The malloc.go test should crash.
rm -f malloc.out
if go run malloc.go >malloc.out 2>&1; then
echo '`go run malloc.go` succeeded unexpectedly'
cat malloc.out
rm -f malloc.out
exit 1
fi
rm -f malloc.out
rm -rf errs _obj
exit 0

View File

@@ -1,9 +0,0 @@
! Copyright 2016 The Go Authors. All rights reserved.
! Use of this source code is governed by a BSD-style
! license that can be found in the LICENSE file.
function the_answer() result(j) bind(C)
use iso_c_binding, only: c_int
integer(c_int) :: j ! output
j = 42
end function the_answer

View File

@@ -1,12 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fortran
// int the_answer();
import "C"
func TheAnswer() int {
return int(C.the_answer())
}

View File

@@ -1,13 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fortran
import "testing"
func TestFortran(t *testing.T) {
if a := TheAnswer(); a != 42 {
t.Errorf("Unexpected result for The Answer. Got: %d Want: 42", a)
}
}

View File

@@ -1,3 +0,0 @@
program HelloWorldF90
write(*,*) "Hello World!"
end program HelloWorldF90

View File

@@ -1,39 +0,0 @@
#!/usr/bin/env bash
# Copyright 2016 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This directory is intended to test the use of Fortran with cgo.
set -e
FC=$1
goos=$(go env GOOS)
libext="so"
if [ "$goos" == "darwin" ]; then
libext="dylib"
fi
case "$FC" in
*gfortran*)
libpath=$(dirname $($FC -print-file-name=libgfortran.$libext))
export CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-rpath,$libpath -L $libpath"
;;
esac
if ! $FC helloworld/helloworld.f90 -o main.exe >& /dev/null; then
echo "skipping Fortran test: could not build helloworld.f90 with $FC"
exit 0
fi
rm -f main.exe
status=0
if ! go test; then
echo "FAIL: go test"
status=1
fi
exit $status

View File

@@ -1,4 +1,4 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,9 +1,42 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of "The Computer Language Benchmarks Game" nor the
name of "The Computer Language Shootout Benchmarks" nor the names of
its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/
*
* contributed by The Go Authors.
* based on pidigits.c (by Paolo Bonzini & Sean Bartlett,
* modified by Michael Mellor)
*/
package main
import (

View File

@@ -1,4 +1,4 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,6 +1,6 @@
// skip
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,10 +1,10 @@
// cmpout
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build test_run
// +build ignore
// Run the game of life in C using Go for parallelization.

View File

@@ -1,20 +1,19 @@
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build test_run
// +build ignore
// Pass numbers along a chain of threads.
package main
import (
"../stdio"
"runtime"
"strconv"
"../stdio"
)
const N = 10

View File

@@ -1,10 +1,10 @@
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build test_run
// +build ignore
// Compute Fibonacci numbers with two goroutines
// that pass integers back and forth. No actual
@@ -14,10 +14,9 @@
package main
import (
"../stdio"
"runtime"
"strconv"
"../stdio"
)
func fibber(c, out chan int64, i int64) {

View File

@@ -1,6 +1,6 @@
// skip
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,10 +1,10 @@
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build test_run
// +build ignore
package main

View File

@@ -1,6 +1,6 @@
// skip
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -7,11 +7,6 @@
package cgotest
// #include <stdlib.h>
//
// // Test for issue 17723.
// typedef char *cstring_pointer;
// static void cstring_pointer_fun(cstring_pointer dummy) { }
//
// const char *api_hello = "hello!";
import "C"
import "unsafe"
@@ -26,5 +21,4 @@ func testAPI() {
var b []byte
b = C.GoBytes(unsafe.Pointer(C.api_hello), C.int(6))
_, _ = s, b
C.cstring_pointer_fun(nil)
}

View File

@@ -1,4 +1,4 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -162,6 +162,3 @@ func testUnsignedInt(t *testing.T) {
func sliceOperands(array [2000]int) {
_ = array[C.KILO:C.KILO:C.KILO] // no type error
}
// set in cgo_thread_lock.go init
var testThreadLockFunc = func(*testing.T) {}

View File

@@ -1,4 +1,4 @@
// Copyright 2014 The Go Authors. All rights reserved.
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -22,7 +22,7 @@ func testBuildID(t *testing.T) {
if os.IsNotExist(err) {
t.Skip("no /proc/self/exe")
}
t.Fatal("opening /proc/self/exe: ", err)
t.Fatalf("opening /proc/self/exe: ", err)
}
defer f.Close()

View File

@@ -12,7 +12,6 @@ void callPanic(void);
int callGoReturnVal(void);
int returnAfterGrow(void);
int returnAfterGrowFromGo(void);
void callGoWithString(void);
*/
import "C"
@@ -20,47 +19,20 @@ import (
"path"
"runtime"
"strings"
"sync"
"testing"
"unsafe"
)
// Pass a func value from nestedCall to goCallback using an integer token.
var callbackMutex sync.Mutex
var callbackToken int
var callbackFuncs = make(map[int]func())
// nestedCall calls into C, back into Go, and finally to f.
func nestedCall(f func()) {
// NOTE: Depends on representation of f.
// callback(x) calls goCallback(x)
callbackMutex.Lock()
callbackToken++
i := callbackToken
callbackFuncs[i] = f
callbackMutex.Unlock()
// Pass the address of i because the C function was written to
// take a pointer. We could pass an int if we felt like
// rewriting the C code.
C.callback(unsafe.Pointer(&i))
callbackMutex.Lock()
delete(callbackFuncs, i)
callbackMutex.Unlock()
C.callback(*(*unsafe.Pointer)(unsafe.Pointer(&f)))
}
//export goCallback
func goCallback(p unsafe.Pointer) {
i := *(*int)(p)
callbackMutex.Lock()
f := callbackFuncs[i]
callbackMutex.Unlock()
if f == nil {
panic("missing callback function")
}
f()
(*(*func())(unsafe.Pointer(&p)))()
}
func testCallback(t *testing.T) {
@@ -179,6 +151,7 @@ func testCallbackCallers(t *testing.T) {
pc := make([]uintptr, 100)
n := 0
name := []string{
"test.goCallback",
"runtime.call16",
"runtime.cgocallbackg1",
"runtime.cgocallbackg",
@@ -186,7 +159,6 @@ func testCallbackCallers(t *testing.T) {
"runtime.asmcgocall",
"runtime.cgocall",
"test._Cfunc_callback",
"test.nestedCall.func1",
"test.nestedCall",
"test.testCallbackCallers",
"test.TestCallbackCallers",
@@ -194,10 +166,10 @@ func testCallbackCallers(t *testing.T) {
"runtime.goexit",
}
if unsafe.Sizeof((*byte)(nil)) == 8 {
name[0] = "runtime.call32"
name[1] = "runtime.call32"
}
nestedCall(func() {
n = runtime.Callers(4, pc)
n = runtime.Callers(2, pc)
})
if n != len(name) {
t.Errorf("expected %d frames, got %d", len(name), n)
@@ -205,7 +177,7 @@ func testCallbackCallers(t *testing.T) {
for i := 0; i < n; i++ {
f := runtime.FuncForPC(pc[i])
if f == nil {
t.Fatalf("expected non-nil Func for pc %d", pc[i])
t.Fatalf("expected non-nil Func for pc %p", pc[i])
}
fname := f.Name()
// Remove the prepended pathname from automatically
@@ -278,22 +250,6 @@ func goReturnVal() (r C.int) {
return
}
// Test that C can pass in a Go string from a string constant.
func testCallGoWithString(t *testing.T) {
C.callGoWithString()
want := "string passed from C to Go"
if stringFromGo != want {
t.Errorf("string passed through C is %s, want %s", stringFromGo, want)
}
}
var stringFromGo string
//export goWithString
func goWithString(s string) {
stringFromGo = s
}
func testCallbackStack(t *testing.T) {
// Make cgo call and callback with different amount of stack stack available.
// We do not do any explicit checks, just ensure that it does not crash.

View File

@@ -1,8 +1,7 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "_cgo_export.h"
@@ -36,7 +35,7 @@ IntoC(void)
long long
mysleep(int seconds) {
long long st = GetTickCount();
Sleep(1000 * seconds);
sleep(seconds);
return st;
}
#else
@@ -81,10 +80,3 @@ returnAfterGrowFromGo(void)
return goReturnVal();
}
void
callGoWithString(void)
{
extern void goWithString(GoString);
const char *str = "string passed from C to Go";
goWithString((GoString){str, strlen(str)});
}

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@@ -1,4 +1,4 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -6,7 +6,8 @@ package cgotest
import "testing"
func TestSetgid(t *testing.T) { testSetgid(t) }
func Test6997(t *testing.T) { test6997(t) }
func TestBuildID(t *testing.T) { testBuildID(t) }
func Test9400(t *testing.T) { test9400(t) }
func TestSetgid(t *testing.T) { testSetgid(t) }
func Test6997(t *testing.T) { test6997(t) }
func TestBuildID(t *testing.T) { testBuildID(t) }
func Test9400(t *testing.T) { test9400(t) }
func TestSigProcMask(t *testing.T) { testSigProcMask(t) }

View File

@@ -1,13 +0,0 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cgotest
import "testing"
// Stubs for tests that fails to build on Android
func test6997(t *testing.T) {}
func test3775(t *testing.T) {}
func test8694(t *testing.T) {}
func testSigaltstack(t *testing.T) {}

View File

@@ -1,4 +1,4 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -62,19 +62,9 @@ func Test8811(t *testing.T) { test8811(t) }
func TestReturnAfterGrow(t *testing.T) { testReturnAfterGrow(t) }
func TestReturnAfterGrowFromGo(t *testing.T) { testReturnAfterGrowFromGo(t) }
func Test9026(t *testing.T) { test9026(t) }
func Test9510(t *testing.T) { test9510(t) }
func Test9557(t *testing.T) { test9557(t) }
func Test10303(t *testing.T) { test10303(t, 10) }
func Test11925(t *testing.T) { test11925(t) }
func Test12030(t *testing.T) { test12030(t) }
func TestGCC68255(t *testing.T) { testGCC68255(t) }
func TestCallGoWithString(t *testing.T) { testCallGoWithString(t) }
func Test14838(t *testing.T) { test14838(t) }
func Test8756(t *testing.T) { test8756(t) }
func Test17065(t *testing.T) { test17065(t) }
func TestThreadLock(t *testing.T) { testThreadLockFunc(t) }
func TestCheckConst(t *testing.T) { testCheckConst(t) }
func Test17537(t *testing.T) { test17537(t) }
func Test18126(t *testing.T) { test18126(t) }
func BenchmarkCgoCall(b *testing.B) { benchCgoCall(b) }

View File

@@ -1,53 +0,0 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux,freebsd,openbsd
package cgotest
/*
#include <unistd.h>
#include <sys/syscall.h>
void Gosched(void);
static int Ctid(void) { Gosched(); return syscall(SYS_gettid); }
*/
import "C"
import (
"runtime"
"syscall"
"testing"
"time"
)
//export Gosched
func Gosched() {
runtime.Gosched()
}
func init() {
testThreadLockFunc = testThreadLock
}
func testThreadLock(t *testing.T) {
stop := make(chan int)
go func() {
// We need the G continue running,
// so the M has a chance to run this G.
for {
select {
case <-stop:
return
case <-time.After(time.Millisecond * 100):
}
}
}()
defer close(stop)
for i := 0; i < 1000; i++ {
if C.int(syscall.Gettid()) != C.Ctid() {
t.Fatalf("cgo has not locked OS thread")
}
}
}

Some files were not shown because too many files have changed in this diff Show More