mirror of
https://github.com/golang/go.git
synced 2026-01-31 08:02:06 +03:00
Compare commits
69 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50eb39bb23 | ||
|
|
5d9c28077d | ||
|
|
cb65428710 | ||
|
|
8f3395902d | ||
|
|
8f42967124 | ||
|
|
e938de22be | ||
|
|
a527bdbda3 | ||
|
|
883bc6ed0e | ||
|
|
5e9b6cac52 | ||
|
|
e4acac3dfb | ||
|
|
3e5977f99d | ||
|
|
02cf0526bf | ||
|
|
3124622303 | ||
|
|
a255645770 | ||
|
|
2b7d0b4c0d | ||
|
|
5caa9d15f2 | ||
|
|
b64f8f8764 | ||
|
|
15ce943f15 | ||
|
|
886b02d705 | ||
|
|
590548d7bd | ||
|
|
00d88f68bb | ||
|
|
cece1bd03f | ||
|
|
ac15ad8a38 | ||
|
|
7df87f5066 | ||
|
|
97b84fc4c8 | ||
|
|
add1ee0ed5 | ||
|
|
d9e0ca4055 | ||
|
|
ff2ab29914 | ||
|
|
6609baf2f7 | ||
|
|
957ed90d0e | ||
|
|
cc7bbb0ae9 | ||
|
|
4482c7b1a1 | ||
|
|
7cb53b8ca2 | ||
|
|
c303df658d | ||
|
|
75b53641f2 | ||
|
|
7412503a43 | ||
|
|
aec78b7a61 | ||
|
|
031850b689 | ||
|
|
f9ae81edca | ||
|
|
9820fbcf7b | ||
|
|
d88fe6146d | ||
|
|
c089afbbd7 | ||
|
|
05560adf62 | ||
|
|
c139772a39 | ||
|
|
c009bcdd8b | ||
|
|
75c8a78e61 | ||
|
|
f42f5263ad | ||
|
|
59730b3343 | ||
|
|
7aead4c6fd | ||
|
|
19bbff8a32 | ||
|
|
c29baa647e | ||
|
|
4d1f720b70 | ||
|
|
79a3df47aa | ||
|
|
3d34461177 | ||
|
|
28208eb8e3 | ||
|
|
95e92ac420 | ||
|
|
783ad67982 | ||
|
|
d3ae115c41 | ||
|
|
738ccf32d9 | ||
|
|
f6818121ed | ||
|
|
791fec05e4 | ||
|
|
a791780bfd | ||
|
|
427ee80413 | ||
|
|
b4df0154c2 | ||
|
|
c9e183e781 | ||
|
|
30ef146819 | ||
|
|
daf5d41471 | ||
|
|
c1fc059b08 | ||
|
|
335ad3db99 |
20
.github/ISSUE_TEMPLATE
vendored
20
.github/ISSUE_TEMPLATE
vendored
@@ -1,20 +0,0 @@
|
||||
Please answer these questions before submitting your issue. Thanks!
|
||||
|
||||
1. What version of Go are you using (`go version`)?
|
||||
|
||||
|
||||
2. What operating system and processor architecture are you using (`go env`)?
|
||||
|
||||
|
||||
3. 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.
|
||||
|
||||
|
||||
4. What did you expect to see?
|
||||
|
||||
|
||||
5. What did you see instead?
|
||||
|
||||
|
||||
7
.github/PULL_REQUEST_TEMPLATE
vendored
7
.github/PULL_REQUEST_TEMPLATE
vendored
@@ -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!
|
||||
22
.gitignore
vendored
22
.gitignore
vendored
@@ -1,11 +1,11 @@
|
||||
.DS_Store
|
||||
*.[56789ao]
|
||||
*.a[56789o]
|
||||
*.[5689ao]
|
||||
*.a[5689o]
|
||||
*.so
|
||||
*.pyc
|
||||
._*
|
||||
.nfs.*
|
||||
[56789a].out
|
||||
[5689a].out
|
||||
*~
|
||||
*.orig
|
||||
*.rej
|
||||
@@ -21,16 +21,24 @@ _testmain.go
|
||||
build.out
|
||||
test.out
|
||||
doc/articles/wiki/*.bin
|
||||
include/plan9/libc_plan9.h
|
||||
misc/cgo/life/run.out
|
||||
misc/cgo/stdio/run.out
|
||||
misc/cgo/testso/main
|
||||
misc/dashboard/builder/builder
|
||||
src/cmd/?a/y.output
|
||||
src/liblink/anames?.c
|
||||
src/cmd/cc/y.output
|
||||
src/cmd/cgo/zdefaultcc.go
|
||||
src/cmd/dist/dist.dSYM
|
||||
src/cmd/gc/mkbuiltin1
|
||||
src/cmd/gc/opnames.h
|
||||
src/cmd/gc/y.output
|
||||
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/runtime/mkversion
|
||||
src/runtime/zaexperiment.h
|
||||
src/runtime/zversion.go
|
||||
src/unicode/maketables
|
||||
src/*.*/
|
||||
test/pass.out
|
||||
|
||||
58
.hgignore
Normal file
58
.hgignore
Normal file
@@ -0,0 +1,58 @@
|
||||
syntax:glob
|
||||
.DS_Store
|
||||
.git
|
||||
.gitignore
|
||||
*.[568ao]
|
||||
*.a[568o]
|
||||
*.so
|
||||
*.pyc
|
||||
._*
|
||||
.nfs.*
|
||||
[568a].out
|
||||
*~
|
||||
*.orig
|
||||
*.rej
|
||||
*.exe
|
||||
.*.swp
|
||||
core
|
||||
*.cgo*.go
|
||||
*.cgo*.c
|
||||
_cgo_*
|
||||
_obj
|
||||
_test
|
||||
_testmain.go
|
||||
build.out
|
||||
test.out
|
||||
doc/articles/wiki/*.bin
|
||||
include/plan9/libc_plan9.h
|
||||
misc/cgo/life/run.out
|
||||
misc/cgo/stdio/run.out
|
||||
misc/cgo/testso/main
|
||||
misc/dashboard/builder/builder
|
||||
src/cmd/?a/y.output
|
||||
src/liblink/anames?.c
|
||||
src/cmd/cc/y.output
|
||||
src/cmd/cgo/zdefaultcc.go
|
||||
src/cmd/dist/dist.dSYM
|
||||
src/cmd/gc/mkbuiltin1
|
||||
src/cmd/gc/opnames.h
|
||||
src/cmd/gc/y.output
|
||||
src/cmd/go/zdefaultcc.go
|
||||
src/go/doc/headscan
|
||||
src/runtime/mkversion
|
||||
src/runtime/z*
|
||||
src/unicode/maketables
|
||||
src/*.*/
|
||||
test/pass.out
|
||||
test/run.out
|
||||
test/times.out
|
||||
test/garbage/*.out
|
||||
goinstall.log
|
||||
last-change
|
||||
VERSION.cache
|
||||
|
||||
syntax:regexp
|
||||
^bin/
|
||||
^pkg/
|
||||
^src/cmd/(.*)/6?\1$
|
||||
^.*/core.[0-9]*$
|
||||
138
.hgtags
Normal file
138
.hgtags
Normal file
@@ -0,0 +1,138 @@
|
||||
1f0a01c93d305f1ab636c68b67346659c5b957f7 weekly.2009-11-06
|
||||
64e703cb307da550861fe740ff70a482a2c14819 weekly.2009-11-10
|
||||
b51fd2d6c16034480f26c96ba32a11c598e4638e weekly.2009-11-10.1
|
||||
cb140bac9ab0fd9f734ee443cea9ebadc9c99737 weekly.2009-11-12
|
||||
d1b75410b793309532352a6fb6b44453f052f3f4 weekly.2009-11-17
|
||||
e205103b02e7393d4719df5faac2dac808234d3f weekly.2009-12-07
|
||||
3a47d2e3882bb12129de05382a2c131bb0c00964 weekly.2009-12-09
|
||||
a6fcf4303b0a92cce4011556b1c96044252d93af weekly.2009-12-22
|
||||
3887d4d81bca78b63d620985d93f1cc06c063871 weekly.2010-01-05
|
||||
40dd722155f6d0c83fa572c1a5abf7c6ff35049f weekly.2010-01-13
|
||||
0a2770db06efe92b08b5c6f30e14b7e8db012538 weekly.2010-01-27
|
||||
db4262ce882d8445764312d41547ee8f11a7f7a9 weekly.2010-02-04
|
||||
53fec18b83e2b93baafba4733b59bb86b8c1988e weekly.2010-02-17
|
||||
4a0661b86e50eae734dbe43ed1312c4a0304676b weekly.2010-02-23
|
||||
a215d03e7ee1013b2abe3f1e2c84457ec51c68e4 weekly.2010-03-04
|
||||
194d473264c1a015803d07bed200e0c312aca43e weekly.2010-03-15
|
||||
9482fde11a02ffd57ba0561dc8a4ac338061a3ae weekly.2010-03-22
|
||||
57380d620ee6b65eb88da1c52784b62c94d7e72e weekly.2010-03-30
|
||||
f98f784927abc56a61501eba0cf225966f2b0142 weekly.2010-04-13
|
||||
6cc6c0d85fc3234fc0a5ec0a8777aa9d59d05ae8 weekly.2010-04-27
|
||||
17ded5ad443b41ac05924864798f1bd8750da344 weekly.2010-05-04
|
||||
a85ad0a640154b5d33626ad8ea15ed17e3828178 weekly.2010-05-27
|
||||
f776656df34c009f2aad142bf7b34a778404acd1 weekly.2010-06-09
|
||||
113ec27f29f18825444f6f8a3cdc156c1df28e87 weekly.2010-06-21
|
||||
b761e0299e9bf66298778cf170b0f64216e3cf7d weekly.2010-07-01
|
||||
5992bf56aa72efcea87d8dff14985fc8fcc68575 weekly.2010-07-14
|
||||
db904d88dc0ebf6ee5b55e44088915695c1223ee weekly.2010-07-29
|
||||
8884f7b4c7750481ed246c249db47b61fe752c56 weekly.2010-08-04
|
||||
07d3a97302be88af68acff34c8a089589da21d18 weekly.2010-08-11
|
||||
18926649cda7498b8aa539b3a611abcff548f09f weekly.2010-08-25
|
||||
92fcf05736e8565a485adc52da1894270e06ed09 weekly.2010-09-06
|
||||
9329773e204fed50ec686ee78cc715b624bf1b1d weekly.2010-09-15
|
||||
1eec33c03bceef5d7607ea4636185f7bf773e0e4 weekly.2010-09-22
|
||||
c2b8c9f13fb8ad2b56920d9da2928c5314ebf725 weekly.2010-09-29
|
||||
7c2e97710bf49cdbe388260958a6674afefb6c0f weekly.2010-10-13
|
||||
ca4f9687cec0b9c4732afd57b8c2786c7fe242de weekly.2010-10-13.1
|
||||
79997f0e5823ee9d13a34ca9971a9d8811df1c4a weekly.2010-10-20
|
||||
4d5b0816392116d3a3452bb275b6dab6c6456278 weekly.2010-10-27
|
||||
c627e23260c7ddf4a1fcda6ef3197c98fa22551d weekly.2010-11-02
|
||||
a7800e20064a39585aa3ee339c2b7454ae1ce6d5 weekly.2010-11-10
|
||||
c5287468fcff0f8a7bb9ffaece2a4863e7e5d83e weekly.2010-11-23
|
||||
f7e692dc29b02fba8e5d59b967880a347b53607c weekly.2010-12-02
|
||||
56e39c466cc1c49b587eb56dc2166d61151637df weekly.2010-12-08
|
||||
26f4898dc1ca18bb77f9968aca23773637e34f0d weekly.2010-12-15
|
||||
61b2c52b0d2246430395f2869d7b34e565333cf5 weekly.2010-12-15.1
|
||||
51c777dbccb9f537ebffb99244f521c05bf65df6 weekly.2010-12-22
|
||||
8eeee945e358f19405e81792db0e16a1cad14bc0 weekly.2011-01-06
|
||||
514c7ba501a1dd74d69ea2d0a2b4116802ada2b5 weekly.2011-01-12
|
||||
72f9cb714f08b98c6a65ab2f2256fad6bb16967a weekly.2011-01-19
|
||||
d8ba80011a986470a54e5262ec125105aa4adc34 weekly.2011-01-20
|
||||
5b98b59dd37292e36afb24babb2d22758928e13d weekly.2011-02-01
|
||||
867d37fb41a4d96ab7a6202fd6ad54c345494051 weekly.2011-02-01.1
|
||||
b2be017f91348d5f8cbaf42f77a99fc905044b59 weekly.2011-02-15
|
||||
322350d6fdbf11d9c404d6fc766349d824031339 weekly.2011-02-24
|
||||
21848430d60167817ca965c813a2118068ca660f weekly.2011-03-07
|
||||
c5c62aeb6267e124cf05f9622e28dbd0dc6b971d weekly.2011-03-07.1
|
||||
c5c62aeb6267e124cf05f9622e28dbd0dc6b971d release.r56
|
||||
3b4e9c85b643a35860805718323b05186dd7f235 weekly.2011-03-15
|
||||
b84e614e25161f626a6102813c41a80a15e3a625 weekly.2011-03-28
|
||||
cd89452cfea3d125aaf75a1ec8004e2f6a868d38 weekly.2011-04-04
|
||||
d6903b7fbff40c13ee7ea3177c0ae54c7f89d2e6 weekly.2011-04-13
|
||||
2f0fa51fa2da6ab50fcebba526326153da8ed999 weekly.2011-04-27
|
||||
8493bb64e5592bd20c0e60e78e7f8052c1276fcf release.r57
|
||||
95d2ce135523c96c4cea049af94ce76dd8c7d981 release.r57.1
|
||||
c98449d685d2b6aa1df9bfd2e1cce9307efb6e00 weekly.2011-05-22
|
||||
3418f22c39eb8299053ae681199ee90f8cd29c6d weekly.2011-06-02
|
||||
c81944152e973a917797679055b8fcdc70fbc802 weekly.2011-06-09
|
||||
9d7967223815ef6415ff01aa0fe6ad38cdbc7810 release.r57.2
|
||||
dac76f0b1a18a5de5b54a1dc0b231aceaf1c8583 weekly.2011-06-16
|
||||
541c445d6c1353fbfa39df7dc4b0eb27558d1fc1 weekly.2011-06-23
|
||||
1b38d90eebcddefabb3901c5bb63c7e2b04a6ec5 release.r58
|
||||
16bfa562ba767aefd82e598da8b15ee4729e23b0 weekly.2011-07-07
|
||||
d292bc7886682d35bb391bf572be28656baee12d release.r58.1
|
||||
3c21f37b25a3f7a1726265c5339c8a7b0b329336 weekly.2011-07-19
|
||||
bb28251f6da4aca85658582c370c7df89d34efd4 weekly.2011-07-29
|
||||
d5785050f61d973fc36775f7bd2e26689529cb3e release.r59
|
||||
c17ce5ec06b4bd5cf6e7ff2ceb0a60c2e40e0b17 weekly.2011-08-10
|
||||
6eb2b9dbe489acb57a2bfc1de31ec2239ed94326 weekly.2011-08-17
|
||||
c934f6f5fe8b30b4b3210ee3f13669e6e4670c32 weekly.2011-09-01
|
||||
c77997547d546c36c7b969586a36de7ceda74e33 weekly.2011-09-07
|
||||
b0819469a6df6029a27192fe7b19a73d97404c63 release.r60
|
||||
8a09ce0cefc64deab4e6d1ed59a08a53e879bbee weekly.2011-09-16
|
||||
fd30c132d1bdeb79f8f111cb721fb1c78b767b27 release.r60.1
|
||||
d7322ae4d055a4cf3efaf842d0717a41acd85bac weekly.2011-09-21
|
||||
32a5db19629897641b2d488de4d1b998942ef80e release.r60.2
|
||||
3bdabf483805fbf0c7ef013fd09bfd6062b9d3f2 weekly.2011-10-06
|
||||
c1702f36df0397c19fc333571a771666029aa37e release.r60.3
|
||||
acaddf1cea75c059d19b20dbef35b20fb3f38954 release.r58.2
|
||||
6d7136d74b656ba6e1194853a9486375005227ef weekly.2011-10-18
|
||||
941b8015061a0f6480954821dd589c60dfe35ed1 weekly.2011-10-25
|
||||
7c1f789e6efd153951e85e3f28722fc69efc2af2 weekly.2011-10-26
|
||||
e69e528f2afc25a8334cfb9359fa4fcdf2a934b6 weekly.2011-11-01
|
||||
780c85032b174c9d4b42adf75d82bc85af7d78d1 weekly.2011-11-02
|
||||
f4397ad6e87c7ce5feac9b01686f1ebd6cbaac4e weekly.2011-11-08
|
||||
2f4482b89a6b5956828872137b6b96636cd904d3 weekly.2011-11-09
|
||||
b4a91b6933748db1a7150c06a1b55ad506e52906 weekly.2011-11-18
|
||||
80db2da6495a20ddff8305c236825811db8c8665 weekly.2011-12-01
|
||||
0beb796b4ef8747af601ed5ea6766d5b1340086b weekly.2011-12-02
|
||||
0c39eee85b0d1606b79c8ebcdeb3b67ed5849e39 weekly.2011-12-06
|
||||
82fdc445f2ff2c85043446eb84a19cc999dfcb95 weekly.2011-12-14
|
||||
4a82689277582a2a60f006e3f158985f2f8d1da3 weekly.2011-12-22
|
||||
354b17404643c0f1a710bdc48927dff02f203ae3 weekly.2012-01-15
|
||||
9f2be4fbbf690b9562c6e98b91daa0003f0913c7 weekly.2012-01-20
|
||||
1107a7d3cb075836387adfab5ce56d1b3e56637d weekly.2012-01-27
|
||||
52ba9506bd993663a0a033c2bd68699e25d061ab weekly.2012-02-07
|
||||
43cf9b39b6477d3144b0353ee91096e55db6107f weekly.2012-02-14
|
||||
96bd78e7d35e892113bdfa1bdc392d3a5f2e644b weekly.2012-02-22
|
||||
f4470a54e6dbcdd52d8d404e12e4754adcd2c948 weekly.2012-03-04
|
||||
3cdba7b0650c6c906ef3e782654f61701abd7dd2 weekly.2012-03-13
|
||||
bce220d0377405146527ab9478867cbc572a6886 weekly.2012-03-22
|
||||
dc5e410f0b4c32ab11dc992593a2bcf5f607381b weekly.2012-03-27
|
||||
dc5e410f0b4c32ab11dc992593a2bcf5f607381b weekly
|
||||
920e9d1ffd1f46665dd152aa9cf3c0f17d68dd88 go1
|
||||
2ccfd4b451d319941bfe3e08037e1462d3c15093 go1.0.1
|
||||
5e806355a9e1491aaab53d3612fed4c550b130c0 go1.0.2
|
||||
2d8bc3c94ecb3ec8f70556d5fd237788903c7281 go1.0.3
|
||||
35da6063e57f8cefc82ba1ea542c4d9393ea9dfd go1.1rc2
|
||||
5a15f0dae37931da46f0356cf4cffe775a061c12 go1.1rc3
|
||||
e570c2daeaca10663d36d6dee7f8d1d76e8f7b92 go1.1
|
||||
a7bd9a33067b3537351276e0178a045748ad046a go1.1.1
|
||||
414057ac1f1fc850957088e4c5e95cdbccd2d594 go1.1.2
|
||||
45475ec7eab1c588fc4210b34d5901b15ca1e479 go1.2rc2
|
||||
7422495a6bf9d5e84828ee466406293be84f565a go1.2rc3
|
||||
94af58f9fd71feda5c316d791ed11aaf015f9e82 go1.2rc4
|
||||
b3d5a20b070a92da2458c5788694d1359b353f4a go1.2rc5
|
||||
87dea3f5ebe7510998c84dbeeec89382b7d42f9c go1.2
|
||||
0ddbdc3c7ce27e66508fe58ab81ff29324786026 go1.2.1
|
||||
9c4fdd8369ca4483fbed1cb8e67f02643ca10f79 go1.2.2
|
||||
f8b50ad4cac4d4c4ecf48324b4f512f65e82cc1c go1.3beta1
|
||||
9e1652c32289c164126b6171f024afad5665fc9e go1.3beta2
|
||||
9d5451df4e53acc58a848005b7ec3a24c4b6050c go1.3rc1
|
||||
3f66a43d5180052e2e1e38d979d1aa5ad05b21f9 go1.3rc2
|
||||
9895f9e36435468d503eaa74ee217f28d5e28dd4 go1.3
|
||||
073fc578434bf3e1e22749b559d273c8da728ebb go1.3.1
|
||||
85518b1d6f8d6e16133b9ed2c9db6807522d37de go1.3.2
|
||||
f44017549ff9c3cc5eef74ebe7276cd0dfc066b6 go1.3.3
|
||||
f44017549ff9c3cc5eef74ebe7276cd0dfc066b6 release
|
||||
1fdfd7dfaedb1b7702141617e621ab7328a236a1 go1.4beta1
|
||||
330
AUTHORS
330
AUTHORS
@@ -2,70 +2,42 @@
|
||||
# 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 Strasheim <fullung@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>
|
||||
Alex A Skinner <alex@lx.lc>
|
||||
Alex Brainman <alex.brainman@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 Larsson <alexander.larsson@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 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>
|
||||
Amazon.com, Inc
|
||||
Amir Mohammad Saied <amir@gluegadget.com>
|
||||
Amrut Joshi <amrut.joshi@gmail.com>
|
||||
Andre Nathan <andrenth@gmail.com>
|
||||
Andrei Korzhevskii <a.korzhevskiy@gmail.com>
|
||||
Andrei Vieru <euvieru@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 Pritchard <awpritchard@gmail.com>
|
||||
@@ -73,41 +45,23 @@ Andrew Radev <andrey.radev@gmail.com>
|
||||
Andrew Skiba <skibaa@gmail.com>
|
||||
Andrew Szeto <andrew@jabagawee.com>
|
||||
Andrew Wilkins <axwalk@gmail.com>
|
||||
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 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>
|
||||
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>
|
||||
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>
|
||||
Ben Burkert <ben@benburkert.com>
|
||||
Ben Olive <sionide21@gmail.com>
|
||||
Benjamin Black <b@b3k.us>
|
||||
Benny Siegert <bsiegert@gmail.com>
|
||||
@@ -116,24 +70,17 @@ Berengar Lehr <berengar.lehr@gmx.de>
|
||||
Billie Harold Cleek <bhcleek@gmail.com>
|
||||
Bjorn Tillenius <bjorn@tillenius.me>
|
||||
Bjorn Tipling <bjorn.tipling@gmail.com>
|
||||
Blake Gentry <blakesgentry@gmail.com>
|
||||
Blake Mizerany <blake.mizerany@gmail.com>
|
||||
Bobby Powers <bobbypowers@gmail.com>
|
||||
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 Gitonga Marete <marete@toshnix.com>
|
||||
Brian Ketelsen <bketelsen@gmail.com>
|
||||
Brian Smith <ohohvi@gmail.com>
|
||||
Bryan Ford <brynosaurus@gmail.com>
|
||||
Caine Tighe <arctanofyourface@gmail.com>
|
||||
Caleb Spare <cespare@gmail.com>
|
||||
Carl Chatfield <carlchatfield@gmail.com>
|
||||
Carlos Castillo <cookieo9@gmail.com>
|
||||
Carlos Cirello <uldericofilho@gmail.com>
|
||||
Case Nelson <case.nelson@gmail.com>
|
||||
Casey Marshall <casey.marshall@gmail.com>
|
||||
Cezar Sá Espinola <cezarsa@gmail.com>
|
||||
@@ -142,207 +89,120 @@ 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>
|
||||
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
|
||||
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 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 Thomas <davidthomas426@gmail.com>
|
||||
David Titarenco <david.titarenco@gmail.com>
|
||||
Davies Liu <davies.liu@gmail.com>
|
||||
Dean Prichard <dean.prichard@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>
|
||||
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 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>
|
||||
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>
|
||||
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>
|
||||
Fan Hongjian <fan.howard@gmail.com>
|
||||
Fastly, Inc.
|
||||
Fatih Arslan <fatih@arslan.io>
|
||||
Fazlul Shahriar <fshahriar@gmail.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>
|
||||
Gary Burd <gary@beagledreams.com>
|
||||
Gaurish Sharma <contact@gaurishsharma.com>
|
||||
Gautham Thambidorai <gautham.dorai@gmail.com>
|
||||
Geert-Johan Riemer <gjr19912@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>
|
||||
Google Inc.
|
||||
Gordon Klaus <gordon.klaus@gmail.com>
|
||||
Graham King <graham4king@gmail.com>
|
||||
Graham Miller <graham.miller@gmail.com>
|
||||
Greg Ward <greg@gerg.ca>
|
||||
Guillaume J. Charmes <guillaume@charmes.net>
|
||||
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>
|
||||
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>
|
||||
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 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 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>
|
||||
Jamil Djadala <djadala@gmail.com>
|
||||
Jan H. Hosang <jan.hosang@gmail.com>
|
||||
Jan Mercl <0xjnml@gmail.com>
|
||||
Jan Mercl <befelemepeseveze@gmail.com>
|
||||
@@ -350,7 +210,6 @@ 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 Travis <infomaniac7@gmail.com>
|
||||
Jay Weisskopf <jay@jayschwa.net>
|
||||
@@ -360,34 +219,19 @@ Jeff Sickel <jas@corpus-callosum.com>
|
||||
Jeff Wendling <jeff@spacemonkey.com>
|
||||
Jens Frederich <jfrederich@gmail.com>
|
||||
Jeremy Jackins <jeremyjackins@gmail.com>
|
||||
Jess Frazelle <me@jessfraz.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>
|
||||
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>
|
||||
@@ -399,65 +243,35 @@ Josh Bleecher Snyder <josharian@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>
|
||||
Kai Backman <kaib@golang.org>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
Luit van Drongelen <luitvd@gmail.com>
|
||||
Luka Zakrajšek <tr00.g33k@gmail.com>
|
||||
Luke Curley <qpingu@gmail.com>
|
||||
Mal Curtis <mal@mal.co.nz>
|
||||
Manu S Ajith <neo@codingarena.in>
|
||||
Manuel Mendez <mmendez534@gmail.com>
|
||||
Marc Weistroff <marc@weistroff.net>
|
||||
Marco Hennings <marco.hennings@freiheit.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>
|
||||
@@ -465,114 +279,63 @@ Markover Inc. DBA Poptip
|
||||
Markus Duft <markus.duft@salomon.at>
|
||||
Markus Sonderegger <marraison@gmail.com>
|
||||
Markus Zimmermann <zimmski@gmail.com>
|
||||
Martin Garton <garton@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 Holt <Matthew.Holt+git@gmail.com>
|
||||
Matthew Horsnell <matthew.horsnell@gmail.com>
|
||||
Maxim Khitrov <max@mxcrypt.com>
|
||||
Maxwell Krohn <themax@gmail.com>
|
||||
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>
|
||||
Michael Fraenkel <michael.fraenkel@gmail.com>
|
||||
Michael Gehring <mg@ebfe.org> <gnirheg.leahcim@gmail.com>
|
||||
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 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>
|
||||
Mohit Agarwal <mohit@sdf.org>
|
||||
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 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>
|
||||
Niko Dziemba <niko@dziemba.com>
|
||||
Nikolay Turpitko <nikolay@turpitko.com>
|
||||
Noah Campbell <noahcampbell@gmail.com>
|
||||
Norberto Lopes <nlopes.ml@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>
|
||||
Pascal S. de Kloe <pascal@quies.net>
|
||||
Patrick Crosby <patrick@stathat.com>
|
||||
Patrick Gavlin <pgavlin@gmail.com>
|
||||
@@ -583,194 +346,113 @@ 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>
|
||||
Peter Kleiweg <pkleiweg@xs4all.nl>
|
||||
Peter Moody <pmoody@uber.com>
|
||||
Peter Mundy <go.peter.90@gmail.com>
|
||||
Péter Surányi <speter.go1@gmail.com>
|
||||
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.
|
||||
Raif S. Naffah <go@naffah-raif.name>
|
||||
Rajat Goel <rajat.goel2010@gmail.com>
|
||||
Ralph Corderoy <ralph@inputplus.co.uk>
|
||||
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 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 Hitchman <hitchmanr@gmail.com>
|
||||
Ryan Lower <rpjlower@gmail.com>
|
||||
Ryan Seys <ryan@ryanseys.com>
|
||||
Ryan Slade <ryanslade@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>
|
||||
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>
|
||||
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 Thulbourn <simon+github@thulbourn.com>
|
||||
Simon Whitehead <chemnova@gmail.com>
|
||||
Sokolov Yura <funny.falcon@gmail.com>
|
||||
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>
|
||||
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.
|
||||
Sven Almgren <sven@tras.se>
|
||||
Szabolcs Nagy <nsz@port70.net>
|
||||
Tad Glines <tad.glines@gmail.com>
|
||||
Taj Khattra <taj.khattra@gmail.com>
|
||||
Takeshi YAMANASHI <9.nashi@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>
|
||||
Tetsuo Kiso <tetsuokiso9@gmail.com>
|
||||
Thiago Fransosi Farina <thiago.farina@gmail.com>
|
||||
Thomas Alan Copeland <talan.copeland@gmail.com>
|
||||
Thomas Desrosiers <thomasdesr@gmail.com>
|
||||
Thomas Kappler <tkappler@gmail.com>
|
||||
Thorben Krueger <thorben.krueger@gmail.com>
|
||||
Tilman Dilo <tilman.dilo@gmail.com>
|
||||
Tim Cooijmans <timcooijmans@gmail.com>
|
||||
Tim Ebringer <tim.ebringer@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 Tacon <ttacon@gmail.com>
|
||||
Tudor Golubenco <tudor.g@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>
|
||||
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>
|
||||
Vladimir Nikishenko <vova616@gmail.com>
|
||||
Volker Dobler <dr.volker.dobler@gmail.com>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
Zemanta d.o.o.
|
||||
Ziad Hatahet <hatahet@gmail.com>
|
||||
Zorion Arrizabalaga <zorionk@gmail.com>
|
||||
申习之 <bronze1man@gmail.com>
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# Contributing to Go
|
||||
|
||||
Go is an open source project.
|
||||
|
||||
It is the work of hundreds of contributors. We appreciate your help!
|
||||
|
||||
|
||||
## Filing issues
|
||||
|
||||
When filing an issue, make sure to answer these five questions:
|
||||
|
||||
1. What version of Go are you using (`go version`)?
|
||||
2. What operating system and processor architecture are you using?
|
||||
3. What did you do?
|
||||
4. What did you expect to see?
|
||||
5. What did you see instead?
|
||||
|
||||
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).
|
||||
|
||||
## Contributing code
|
||||
|
||||
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).
|
||||
|
||||
Unless otherwise noted, the Go source files are distributed under
|
||||
the BSD-style license found in the LICENSE file.
|
||||
|
||||
436
CONTRIBUTORS
436
CONTRIBUTORS
File diff suppressed because it is too large
Load Diff
2
LICENSE
2
LICENSE
@@ -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
|
||||
|
||||
32
README
Normal file
32
README
Normal file
@@ -0,0 +1,32 @@
|
||||
This is the source code repository for the Go programming language.
|
||||
|
||||
For documentation about how to install and use Go,
|
||||
visit http://golang.org/ or load doc/install-source.html
|
||||
in your web browser.
|
||||
|
||||
After installing Go, you can view a nicely formatted
|
||||
doc/install-source.html by running godoc --http=:6060
|
||||
and then visiting http://localhost:6060/doc/install/source.
|
||||
|
||||
Unless otherwise noted, the Go source files are distributed
|
||||
under the BSD-style license found in the LICENSE file.
|
||||
|
||||
--
|
||||
|
||||
Binary Distribution Notes
|
||||
|
||||
If you have just untarred a binary Go distribution, you need to set
|
||||
the environment variable $GOROOT to the full path of the go
|
||||
directory (the one containing this README). You can omit the
|
||||
variable if you unpack it into /usr/local/go, or if you rebuild
|
||||
from sources by running all.bash (see doc/install.html).
|
||||
You should also add the Go binary directory $GOROOT/bin
|
||||
to your shell's path.
|
||||
|
||||
For example, if you extracted the tar file into $HOME/go, you might
|
||||
put the following in your .profile:
|
||||
|
||||
export GOROOT=$HOME/go
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
|
||||
See doc/install.html for more details.
|
||||
43
README.md
43
README.md
@@ -1,43 +0,0 @@
|
||||
# The Go Programming Language
|
||||
|
||||
Go is an open source programming language that makes it easy to build simple,
|
||||
reliable, and efficient software.
|
||||
|
||||

|
||||
|
||||
For documentation about how to install and use Go,
|
||||
visit https://golang.org/ or load doc/install-source.html
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Unless otherwise noted, the Go source files are distributed
|
||||
under the BSD-style license found in the LICENSE file.
|
||||
|
||||
--
|
||||
|
||||
## Binary Distribution Notes
|
||||
|
||||
If you have just untarred a binary Go distribution, you need to set
|
||||
the environment variable $GOROOT to the full path of the go
|
||||
directory (the one containing this file). You can omit the
|
||||
variable if you unpack it into /usr/local/go, or if you rebuild
|
||||
from sources by running all.bash (see doc/install-source.html).
|
||||
You should also add the Go binary directory $GOROOT/bin
|
||||
to your shell's path.
|
||||
|
||||
For example, if you extracted the tar file into $HOME/go, you might
|
||||
put the following in your .profile:
|
||||
|
||||
export GOROOT=$HOME/go
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
|
||||
See https://golang.org/doc/install or doc/install.html for more details.
|
||||
@@ -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.
|
||||
|
||||
@@ -328,5 +328,3 @@ 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"
|
||||
|
||||
@@ -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
|
||||
|
||||
975
api/go1.5.txt
975
api/go1.5.txt
@@ -1,975 +0,0 @@
|
||||
pkg archive/zip, method (*Writer) SetOffset(int64)
|
||||
pkg bufio, method (*Reader) Discard(int) (int, error)
|
||||
pkg bufio, method (ReadWriter) Discard(int) (int, error)
|
||||
pkg bytes, func LastIndexByte([]uint8, uint8) int
|
||||
pkg bytes, method (*Buffer) Cap() int
|
||||
pkg bytes, method (*Reader) Size() int64
|
||||
pkg crypto, const SHA512_224 = 14
|
||||
pkg crypto, const SHA512_224 Hash
|
||||
pkg crypto, const SHA512_256 = 15
|
||||
pkg crypto, const SHA512_256 Hash
|
||||
pkg crypto, type Decrypter interface { Decrypt, Public }
|
||||
pkg crypto, type Decrypter interface, Decrypt(io.Reader, []uint8, DecrypterOpts) ([]uint8, error)
|
||||
pkg crypto, type Decrypter interface, Public() PublicKey
|
||||
pkg crypto, type DecrypterOpts interface {}
|
||||
pkg crypto/cipher, func NewGCMWithNonceSize(Block, int) (AEAD, error)
|
||||
pkg crypto/elliptic, type CurveParams struct, Name string
|
||||
pkg crypto/rsa, method (*PrivateKey) Decrypt(io.Reader, []uint8, crypto.DecrypterOpts) ([]uint8, error)
|
||||
pkg crypto/rsa, type OAEPOptions struct
|
||||
pkg crypto/rsa, type OAEPOptions struct, Hash crypto.Hash
|
||||
pkg crypto/rsa, type OAEPOptions struct, Label []uint8
|
||||
pkg crypto/rsa, type PKCS1v15DecryptOptions struct
|
||||
pkg crypto/rsa, type PKCS1v15DecryptOptions struct, SessionKeyLen int
|
||||
pkg crypto/sha512, const Size224 = 28
|
||||
pkg crypto/sha512, const Size224 ideal-int
|
||||
pkg crypto/sha512, const Size256 = 32
|
||||
pkg crypto/sha512, const Size256 ideal-int
|
||||
pkg crypto/sha512, func New512_224() hash.Hash
|
||||
pkg crypto/sha512, func New512_256() hash.Hash
|
||||
pkg crypto/sha512, func Sum512_224([]uint8) [28]uint8
|
||||
pkg crypto/sha512, func Sum512_256([]uint8) [32]uint8
|
||||
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 49196
|
||||
pkg crypto/tls, const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16
|
||||
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 49200
|
||||
pkg crypto/tls, const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16
|
||||
pkg crypto/tls, method (*Config) SetSessionTicketKeys([][32]uint8)
|
||||
pkg crypto/tls, type Certificate struct, SignedCertificateTimestamps [][]uint8
|
||||
pkg crypto/tls, type ConnectionState struct, OCSPResponse []uint8
|
||||
pkg crypto/tls, type ConnectionState struct, SignedCertificateTimestamps [][]uint8
|
||||
pkg crypto/x509, method (*CertificateRequest) CheckSignature() error
|
||||
pkg crypto/x509, type Certificate struct, UnhandledCriticalExtensions []asn1.ObjectIdentifier
|
||||
pkg crypto/x509/pkix, type Name struct, ExtraNames []AttributeTypeAndValue
|
||||
pkg database/sql, method (*DB) Stats() DBStats
|
||||
pkg database/sql, type DBStats struct
|
||||
pkg database/sql, type DBStats struct, OpenConnections int
|
||||
pkg debug/dwarf, const ClassAddress = 1
|
||||
pkg debug/dwarf, const ClassAddress Class
|
||||
pkg debug/dwarf, const ClassBlock = 2
|
||||
pkg debug/dwarf, const ClassBlock Class
|
||||
pkg debug/dwarf, const ClassConstant = 3
|
||||
pkg debug/dwarf, const ClassConstant Class
|
||||
pkg debug/dwarf, const ClassExprLoc = 4
|
||||
pkg debug/dwarf, const ClassExprLoc Class
|
||||
pkg debug/dwarf, const ClassFlag = 5
|
||||
pkg debug/dwarf, const ClassFlag Class
|
||||
pkg debug/dwarf, const ClassLinePtr = 6
|
||||
pkg debug/dwarf, const ClassLinePtr Class
|
||||
pkg debug/dwarf, const ClassLocListPtr = 7
|
||||
pkg debug/dwarf, const ClassLocListPtr Class
|
||||
pkg debug/dwarf, const ClassMacPtr = 8
|
||||
pkg debug/dwarf, const ClassMacPtr Class
|
||||
pkg debug/dwarf, const ClassRangeListPtr = 9
|
||||
pkg debug/dwarf, const ClassRangeListPtr Class
|
||||
pkg debug/dwarf, const ClassReference = 10
|
||||
pkg debug/dwarf, const ClassReference Class
|
||||
pkg debug/dwarf, const ClassReferenceAlt = 13
|
||||
pkg debug/dwarf, const ClassReferenceAlt Class
|
||||
pkg debug/dwarf, const ClassReferenceSig = 11
|
||||
pkg debug/dwarf, const ClassReferenceSig Class
|
||||
pkg debug/dwarf, const ClassString = 12
|
||||
pkg debug/dwarf, const ClassString Class
|
||||
pkg debug/dwarf, const ClassStringAlt = 14
|
||||
pkg debug/dwarf, const ClassStringAlt Class
|
||||
pkg debug/dwarf, method (*Data) LineReader(*Entry) (*LineReader, error)
|
||||
pkg debug/dwarf, method (*Entry) AttrField(Attr) *Field
|
||||
pkg debug/dwarf, method (*LineReader) Next(*LineEntry) error
|
||||
pkg debug/dwarf, method (*LineReader) Reset()
|
||||
pkg debug/dwarf, method (*LineReader) Seek(LineReaderPos)
|
||||
pkg debug/dwarf, method (*LineReader) SeekPC(uint64, *LineEntry) error
|
||||
pkg debug/dwarf, method (*LineReader) Tell() LineReaderPos
|
||||
pkg debug/dwarf, method (*Reader) AddressSize() int
|
||||
pkg debug/dwarf, method (Class) GoString() string
|
||||
pkg debug/dwarf, method (Class) String() string
|
||||
pkg debug/dwarf, type Class int
|
||||
pkg debug/dwarf, type Field struct, Class Class
|
||||
pkg debug/dwarf, type LineEntry struct
|
||||
pkg debug/dwarf, type LineEntry struct, Address uint64
|
||||
pkg debug/dwarf, type LineEntry struct, BasicBlock bool
|
||||
pkg debug/dwarf, type LineEntry struct, Column int
|
||||
pkg debug/dwarf, type LineEntry struct, Discriminator int
|
||||
pkg debug/dwarf, type LineEntry struct, EndSequence bool
|
||||
pkg debug/dwarf, type LineEntry struct, EpilogueBegin bool
|
||||
pkg debug/dwarf, type LineEntry struct, File *LineFile
|
||||
pkg debug/dwarf, type LineEntry struct, ISA int
|
||||
pkg debug/dwarf, type LineEntry struct, IsStmt bool
|
||||
pkg debug/dwarf, type LineEntry struct, Line int
|
||||
pkg debug/dwarf, type LineEntry struct, OpIndex int
|
||||
pkg debug/dwarf, type LineEntry struct, PrologueEnd bool
|
||||
pkg debug/dwarf, type LineFile struct
|
||||
pkg debug/dwarf, type LineFile struct, Length int
|
||||
pkg debug/dwarf, type LineFile struct, Mtime uint64
|
||||
pkg debug/dwarf, type LineFile struct, Name string
|
||||
pkg debug/dwarf, type LineReader struct
|
||||
pkg debug/dwarf, type LineReaderPos struct
|
||||
pkg debug/dwarf, var ErrUnknownPC error
|
||||
pkg debug/elf, const R_PPC64_ADDR14 = 7
|
||||
pkg debug/elf, const R_PPC64_ADDR14 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR14_BRNTAKEN = 9
|
||||
pkg debug/elf, const R_PPC64_ADDR14_BRNTAKEN R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR14_BRTAKEN = 8
|
||||
pkg debug/elf, const R_PPC64_ADDR14_BRTAKEN R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16 = 3
|
||||
pkg debug/elf, const R_PPC64_ADDR16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_DS = 56
|
||||
pkg debug/elf, const R_PPC64_ADDR16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HA = 6
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HI = 5
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHER = 39
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHER R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHERA = 40
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHERA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHEST = 41
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHEST R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHESTA = 42
|
||||
pkg debug/elf, const R_PPC64_ADDR16_HIGHESTA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_LO = 4
|
||||
pkg debug/elf, const R_PPC64_ADDR16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR16_LO_DS = 57
|
||||
pkg debug/elf, const R_PPC64_ADDR16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR24 = 2
|
||||
pkg debug/elf, const R_PPC64_ADDR24 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR32 = 1
|
||||
pkg debug/elf, const R_PPC64_ADDR32 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_ADDR64 = 38
|
||||
pkg debug/elf, const R_PPC64_ADDR64 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPMOD64 = 68
|
||||
pkg debug/elf, const R_PPC64_DTPMOD64 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16 = 74
|
||||
pkg debug/elf, const R_PPC64_DTPREL16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_DS = 101
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HA = 77
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HI = 76
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHER = 103
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHER R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHERA = 104
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHERA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHEST = 105
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHEST R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHESTA = 106
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_HIGHESTA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_LO = 75
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_LO_DS = 102
|
||||
pkg debug/elf, const R_PPC64_DTPREL16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_DTPREL64 = 78
|
||||
pkg debug/elf, const R_PPC64_DTPREL64 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16 = 14
|
||||
pkg debug/elf, const R_PPC64_GOT16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16_DS = 58
|
||||
pkg debug/elf, const R_PPC64_GOT16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16_HA = 17
|
||||
pkg debug/elf, const R_PPC64_GOT16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16_HI = 16
|
||||
pkg debug/elf, const R_PPC64_GOT16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16_LO = 15
|
||||
pkg debug/elf, const R_PPC64_GOT16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT16_LO_DS = 59
|
||||
pkg debug/elf, const R_PPC64_GOT16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_DS = 91
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_HA = 94
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_HI = 93
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_LO_DS = 92
|
||||
pkg debug/elf, const R_PPC64_GOT_DTPREL16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16 = 79
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_HA = 82
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_HI = 81
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_LO = 80
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSGD16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16 = 83
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_HA = 86
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_HI = 85
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_LO = 84
|
||||
pkg debug/elf, const R_PPC64_GOT_TLSLD16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_DS = 87
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_HA = 90
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_HI = 89
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_LO_DS = 88
|
||||
pkg debug/elf, const R_PPC64_GOT_TPREL16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_JMP_SLOT = 21
|
||||
pkg debug/elf, const R_PPC64_JMP_SLOT R_PPC64
|
||||
pkg debug/elf, const R_PPC64_NONE = 0
|
||||
pkg debug/elf, const R_PPC64_NONE R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL14 = 11
|
||||
pkg debug/elf, const R_PPC64_REL14 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL14_BRNTAKEN = 13
|
||||
pkg debug/elf, const R_PPC64_REL14_BRNTAKEN R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL14_BRTAKEN = 12
|
||||
pkg debug/elf, const R_PPC64_REL14_BRTAKEN R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL16 = 249
|
||||
pkg debug/elf, const R_PPC64_REL16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL16_HA = 252
|
||||
pkg debug/elf, const R_PPC64_REL16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL16_HI = 251
|
||||
pkg debug/elf, const R_PPC64_REL16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL16_LO = 250
|
||||
pkg debug/elf, const R_PPC64_REL16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL24 = 10
|
||||
pkg debug/elf, const R_PPC64_REL24 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL32 = 26
|
||||
pkg debug/elf, const R_PPC64_REL32 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_REL64 = 44
|
||||
pkg debug/elf, const R_PPC64_REL64 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TLS = 67
|
||||
pkg debug/elf, const R_PPC64_TLS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TLSGD = 107
|
||||
pkg debug/elf, const R_PPC64_TLSGD R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TLSLD = 108
|
||||
pkg debug/elf, const R_PPC64_TLSLD R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC = 51
|
||||
pkg debug/elf, const R_PPC64_TOC R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16 = 47
|
||||
pkg debug/elf, const R_PPC64_TOC16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16_DS = 63
|
||||
pkg debug/elf, const R_PPC64_TOC16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16_HA = 50
|
||||
pkg debug/elf, const R_PPC64_TOC16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16_HI = 49
|
||||
pkg debug/elf, const R_PPC64_TOC16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16_LO = 48
|
||||
pkg debug/elf, const R_PPC64_TOC16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TOC16_LO_DS = 64
|
||||
pkg debug/elf, const R_PPC64_TOC16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16 = 69
|
||||
pkg debug/elf, const R_PPC64_TPREL16 R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_DS = 95
|
||||
pkg debug/elf, const R_PPC64_TPREL16_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HA = 72
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HI = 71
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HI R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHER = 97
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHER R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHERA = 98
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHERA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHEST = 99
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHEST R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHESTA = 100
|
||||
pkg debug/elf, const R_PPC64_TPREL16_HIGHESTA R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_LO = 70
|
||||
pkg debug/elf, const R_PPC64_TPREL16_LO R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL16_LO_DS = 96
|
||||
pkg debug/elf, const R_PPC64_TPREL16_LO_DS R_PPC64
|
||||
pkg debug/elf, const R_PPC64_TPREL64 = 73
|
||||
pkg debug/elf, const R_PPC64_TPREL64 R_PPC64
|
||||
pkg debug/elf, method (R_PPC64) GoString() string
|
||||
pkg debug/elf, method (R_PPC64) String() string
|
||||
pkg debug/elf, type R_PPC64 int
|
||||
pkg encoding/base64, const NoPadding = -1
|
||||
pkg encoding/base64, const NoPadding int32
|
||||
pkg encoding/base64, const StdPadding = 61
|
||||
pkg encoding/base64, const StdPadding int32
|
||||
pkg encoding/base64, method (Encoding) WithPadding(int32) *Encoding
|
||||
pkg encoding/base64, var RawStdEncoding *Encoding
|
||||
pkg encoding/base64, var RawURLEncoding *Encoding
|
||||
pkg encoding/json, method (*Decoder) More() bool
|
||||
pkg encoding/json, method (*Decoder) Token() (Token, error)
|
||||
pkg encoding/json, method (Delim) String() string
|
||||
pkg encoding/json, type Delim int32
|
||||
pkg encoding/json, type Token interface {}
|
||||
pkg encoding/json, type UnmarshalTypeError struct, Offset int64
|
||||
pkg flag, func UnquoteUsage(*Flag) (string, string)
|
||||
pkg go/ast, type EmptyStmt struct, Implicit bool
|
||||
pkg go/build, type Package struct, PkgTargetRoot string
|
||||
pkg go/constant, const Bool = 1
|
||||
pkg go/constant, const Bool Kind
|
||||
pkg go/constant, const Complex = 5
|
||||
pkg go/constant, const Complex Kind
|
||||
pkg go/constant, const Float = 4
|
||||
pkg go/constant, const Float Kind
|
||||
pkg go/constant, const Int = 3
|
||||
pkg go/constant, const Int Kind
|
||||
pkg go/constant, const String = 2
|
||||
pkg go/constant, const String Kind
|
||||
pkg go/constant, const Unknown = 0
|
||||
pkg go/constant, const Unknown Kind
|
||||
pkg go/constant, func BinaryOp(Value, token.Token, Value) Value
|
||||
pkg go/constant, func BitLen(Value) int
|
||||
pkg go/constant, func BoolVal(Value) bool
|
||||
pkg go/constant, func Bytes(Value) []uint8
|
||||
pkg go/constant, func Compare(Value, token.Token, Value) bool
|
||||
pkg go/constant, func Denom(Value) Value
|
||||
pkg go/constant, func Float32Val(Value) (float32, bool)
|
||||
pkg go/constant, func Float64Val(Value) (float64, bool)
|
||||
pkg go/constant, func Imag(Value) Value
|
||||
pkg go/constant, func Int64Val(Value) (int64, bool)
|
||||
pkg go/constant, func MakeBool(bool) Value
|
||||
pkg go/constant, func MakeFloat64(float64) Value
|
||||
pkg go/constant, func MakeFromBytes([]uint8) Value
|
||||
pkg go/constant, func MakeFromLiteral(string, token.Token, uint) Value
|
||||
pkg go/constant, func MakeImag(Value) Value
|
||||
pkg go/constant, func MakeInt64(int64) Value
|
||||
pkg go/constant, func MakeString(string) Value
|
||||
pkg go/constant, func MakeUint64(uint64) Value
|
||||
pkg go/constant, func MakeUnknown() Value
|
||||
pkg go/constant, func Num(Value) Value
|
||||
pkg go/constant, func Real(Value) Value
|
||||
pkg go/constant, func Shift(Value, token.Token, uint) Value
|
||||
pkg go/constant, func Sign(Value) int
|
||||
pkg go/constant, func StringVal(Value) string
|
||||
pkg go/constant, func Uint64Val(Value) (uint64, bool)
|
||||
pkg go/constant, func UnaryOp(token.Token, Value, uint) Value
|
||||
pkg go/constant, type Kind int
|
||||
pkg go/constant, type Value interface, Kind() Kind
|
||||
pkg go/constant, type Value interface, String() string
|
||||
pkg go/constant, type Value interface, unexported methods
|
||||
pkg go/importer, func Default() types.Importer
|
||||
pkg go/importer, func For(string, Lookup) types.Importer
|
||||
pkg go/importer, type Lookup func(string) (io.ReadCloser, error)
|
||||
pkg go/parser, func ParseExprFrom(*token.FileSet, string, interface{}, Mode) (ast.Expr, error)
|
||||
pkg go/types, const Bool = 1
|
||||
pkg go/types, const Bool BasicKind
|
||||
pkg go/types, const Byte = 8
|
||||
pkg go/types, const Byte BasicKind
|
||||
pkg go/types, const Complex128 = 16
|
||||
pkg go/types, const Complex128 BasicKind
|
||||
pkg go/types, const Complex64 = 15
|
||||
pkg go/types, const Complex64 BasicKind
|
||||
pkg go/types, const FieldVal = 0
|
||||
pkg go/types, const FieldVal SelectionKind
|
||||
pkg go/types, const Float32 = 13
|
||||
pkg go/types, const Float32 BasicKind
|
||||
pkg go/types, const Float64 = 14
|
||||
pkg go/types, const Float64 BasicKind
|
||||
pkg go/types, const Int = 2
|
||||
pkg go/types, const Int BasicKind
|
||||
pkg go/types, const Int16 = 4
|
||||
pkg go/types, const Int16 BasicKind
|
||||
pkg go/types, const Int32 = 5
|
||||
pkg go/types, const Int32 BasicKind
|
||||
pkg go/types, const Int64 = 6
|
||||
pkg go/types, const Int64 BasicKind
|
||||
pkg go/types, const Int8 = 3
|
||||
pkg go/types, const Int8 BasicKind
|
||||
pkg go/types, const Invalid = 0
|
||||
pkg go/types, const Invalid BasicKind
|
||||
pkg go/types, const IsBoolean = 1
|
||||
pkg go/types, const IsBoolean BasicInfo
|
||||
pkg go/types, const IsComplex = 16
|
||||
pkg go/types, const IsComplex BasicInfo
|
||||
pkg go/types, const IsConstType = 59
|
||||
pkg go/types, const IsConstType BasicInfo
|
||||
pkg go/types, const IsFloat = 8
|
||||
pkg go/types, const IsFloat BasicInfo
|
||||
pkg go/types, const IsInteger = 2
|
||||
pkg go/types, const IsInteger BasicInfo
|
||||
pkg go/types, const IsNumeric = 26
|
||||
pkg go/types, const IsNumeric BasicInfo
|
||||
pkg go/types, const IsOrdered = 42
|
||||
pkg go/types, const IsOrdered BasicInfo
|
||||
pkg go/types, const IsString = 32
|
||||
pkg go/types, const IsString BasicInfo
|
||||
pkg go/types, const IsUnsigned = 4
|
||||
pkg go/types, const IsUnsigned BasicInfo
|
||||
pkg go/types, const IsUntyped = 64
|
||||
pkg go/types, const IsUntyped BasicInfo
|
||||
pkg go/types, const MethodExpr = 2
|
||||
pkg go/types, const MethodExpr SelectionKind
|
||||
pkg go/types, const MethodVal = 1
|
||||
pkg go/types, const MethodVal SelectionKind
|
||||
pkg go/types, const RecvOnly = 2
|
||||
pkg go/types, const RecvOnly ChanDir
|
||||
pkg go/types, const Rune = 5
|
||||
pkg go/types, const Rune BasicKind
|
||||
pkg go/types, const SendOnly = 1
|
||||
pkg go/types, const SendOnly ChanDir
|
||||
pkg go/types, const SendRecv = 0
|
||||
pkg go/types, const SendRecv ChanDir
|
||||
pkg go/types, const String = 17
|
||||
pkg go/types, const String BasicKind
|
||||
pkg go/types, const Uint = 7
|
||||
pkg go/types, const Uint BasicKind
|
||||
pkg go/types, const Uint16 = 9
|
||||
pkg go/types, const Uint16 BasicKind
|
||||
pkg go/types, const Uint32 = 10
|
||||
pkg go/types, const Uint32 BasicKind
|
||||
pkg go/types, const Uint64 = 11
|
||||
pkg go/types, const Uint64 BasicKind
|
||||
pkg go/types, const Uint8 = 8
|
||||
pkg go/types, const Uint8 BasicKind
|
||||
pkg go/types, const Uintptr = 12
|
||||
pkg go/types, const Uintptr BasicKind
|
||||
pkg go/types, const UnsafePointer = 18
|
||||
pkg go/types, const UnsafePointer BasicKind
|
||||
pkg go/types, const UntypedBool = 19
|
||||
pkg go/types, const UntypedBool BasicKind
|
||||
pkg go/types, const UntypedComplex = 23
|
||||
pkg go/types, const UntypedComplex BasicKind
|
||||
pkg go/types, const UntypedFloat = 22
|
||||
pkg go/types, const UntypedFloat BasicKind
|
||||
pkg go/types, const UntypedInt = 20
|
||||
pkg go/types, const UntypedInt BasicKind
|
||||
pkg go/types, const UntypedNil = 25
|
||||
pkg go/types, const UntypedNil BasicKind
|
||||
pkg go/types, const UntypedRune = 21
|
||||
pkg go/types, const UntypedRune BasicKind
|
||||
pkg go/types, const UntypedString = 24
|
||||
pkg go/types, const UntypedString BasicKind
|
||||
pkg go/types, func AssertableTo(*Interface, Type) bool
|
||||
pkg go/types, func AssignableTo(Type, Type) bool
|
||||
pkg go/types, func Comparable(Type) bool
|
||||
pkg go/types, func ConvertibleTo(Type, Type) bool
|
||||
pkg go/types, func DefPredeclaredTestFuncs()
|
||||
pkg go/types, func Eval(*token.FileSet, *Package, token.Pos, string) (TypeAndValue, error)
|
||||
pkg go/types, func ExprString(ast.Expr) string
|
||||
pkg go/types, func Id(*Package, string) string
|
||||
pkg go/types, func Identical(Type, Type) bool
|
||||
pkg go/types, func Implements(Type, *Interface) bool
|
||||
pkg go/types, func IsInterface(Type) bool
|
||||
pkg go/types, func LookupFieldOrMethod(Type, bool, *Package, string) (Object, []int, bool)
|
||||
pkg go/types, func MissingMethod(Type, *Interface, bool) (*Func, bool)
|
||||
pkg go/types, func NewArray(Type, int64) *Array
|
||||
pkg go/types, func NewChan(ChanDir, Type) *Chan
|
||||
pkg go/types, func NewChecker(*Config, *token.FileSet, *Package, *Info) *Checker
|
||||
pkg go/types, func NewConst(token.Pos, *Package, string, Type, constant.Value) *Const
|
||||
pkg go/types, func NewField(token.Pos, *Package, string, Type, bool) *Var
|
||||
pkg go/types, func NewFunc(token.Pos, *Package, string, *Signature) *Func
|
||||
pkg go/types, func NewInterface([]*Func, []*Named) *Interface
|
||||
pkg go/types, func NewLabel(token.Pos, *Package, string) *Label
|
||||
pkg go/types, func NewMap(Type, Type) *Map
|
||||
pkg go/types, func NewMethodSet(Type) *MethodSet
|
||||
pkg go/types, func NewNamed(*TypeName, Type, []*Func) *Named
|
||||
pkg go/types, func NewPackage(string, string) *Package
|
||||
pkg go/types, func NewParam(token.Pos, *Package, string, Type) *Var
|
||||
pkg go/types, func NewPkgName(token.Pos, *Package, string, *Package) *PkgName
|
||||
pkg go/types, func NewPointer(Type) *Pointer
|
||||
pkg go/types, func NewScope(*Scope, token.Pos, token.Pos, string) *Scope
|
||||
pkg go/types, func NewSignature(*Var, *Tuple, *Tuple, bool) *Signature
|
||||
pkg go/types, func NewSlice(Type) *Slice
|
||||
pkg go/types, func NewStruct([]*Var, []string) *Struct
|
||||
pkg go/types, func NewTuple(...*Var) *Tuple
|
||||
pkg go/types, func NewTypeName(token.Pos, *Package, string, Type) *TypeName
|
||||
pkg go/types, func NewVar(token.Pos, *Package, string, Type) *Var
|
||||
pkg go/types, func ObjectString(Object, Qualifier) string
|
||||
pkg go/types, func RelativeTo(*Package) Qualifier
|
||||
pkg go/types, func SelectionString(*Selection, Qualifier) string
|
||||
pkg go/types, func TypeString(Type, Qualifier) string
|
||||
pkg go/types, func WriteExpr(*bytes.Buffer, ast.Expr)
|
||||
pkg go/types, func WriteSignature(*bytes.Buffer, *Signature, Qualifier)
|
||||
pkg go/types, func WriteType(*bytes.Buffer, Type, Qualifier)
|
||||
pkg go/types, method (*Array) Elem() Type
|
||||
pkg go/types, method (*Array) Len() int64
|
||||
pkg go/types, method (*Array) String() string
|
||||
pkg go/types, method (*Array) Underlying() Type
|
||||
pkg go/types, method (*Basic) Info() BasicInfo
|
||||
pkg go/types, method (*Basic) Kind() BasicKind
|
||||
pkg go/types, method (*Basic) Name() string
|
||||
pkg go/types, method (*Basic) String() string
|
||||
pkg go/types, method (*Basic) Underlying() Type
|
||||
pkg go/types, method (*Builtin) Exported() bool
|
||||
pkg go/types, method (*Builtin) Id() string
|
||||
pkg go/types, method (*Builtin) Name() string
|
||||
pkg go/types, method (*Builtin) Parent() *Scope
|
||||
pkg go/types, method (*Builtin) Pkg() *Package
|
||||
pkg go/types, method (*Builtin) Pos() token.Pos
|
||||
pkg go/types, method (*Builtin) String() string
|
||||
pkg go/types, method (*Builtin) Type() Type
|
||||
pkg go/types, method (*Chan) Dir() ChanDir
|
||||
pkg go/types, method (*Chan) Elem() Type
|
||||
pkg go/types, method (*Chan) String() string
|
||||
pkg go/types, method (*Chan) Underlying() Type
|
||||
pkg go/types, method (*Checker) Files([]*ast.File) error
|
||||
pkg go/types, method (*Config) Check(string, *token.FileSet, []*ast.File, *Info) (*Package, error)
|
||||
pkg go/types, method (*Const) Exported() bool
|
||||
pkg go/types, method (*Const) Id() string
|
||||
pkg go/types, method (*Const) Name() string
|
||||
pkg go/types, method (*Const) Parent() *Scope
|
||||
pkg go/types, method (*Const) Pkg() *Package
|
||||
pkg go/types, method (*Const) Pos() token.Pos
|
||||
pkg go/types, method (*Const) String() string
|
||||
pkg go/types, method (*Const) Type() Type
|
||||
pkg go/types, method (*Const) Val() constant.Value
|
||||
pkg go/types, method (*Func) Exported() bool
|
||||
pkg go/types, method (*Func) FullName() string
|
||||
pkg go/types, method (*Func) Id() string
|
||||
pkg go/types, method (*Func) Name() string
|
||||
pkg go/types, method (*Func) Parent() *Scope
|
||||
pkg go/types, method (*Func) Pkg() *Package
|
||||
pkg go/types, method (*Func) Pos() token.Pos
|
||||
pkg go/types, method (*Func) Scope() *Scope
|
||||
pkg go/types, method (*Func) String() string
|
||||
pkg go/types, method (*Func) Type() Type
|
||||
pkg go/types, method (*Info) ObjectOf(*ast.Ident) Object
|
||||
pkg go/types, method (*Info) TypeOf(ast.Expr) Type
|
||||
pkg go/types, method (*Initializer) String() string
|
||||
pkg go/types, method (*Interface) Complete() *Interface
|
||||
pkg go/types, method (*Interface) Embedded(int) *Named
|
||||
pkg go/types, method (*Interface) Empty() bool
|
||||
pkg go/types, method (*Interface) ExplicitMethod(int) *Func
|
||||
pkg go/types, method (*Interface) Method(int) *Func
|
||||
pkg go/types, method (*Interface) NumEmbeddeds() int
|
||||
pkg go/types, method (*Interface) NumExplicitMethods() int
|
||||
pkg go/types, method (*Interface) NumMethods() int
|
||||
pkg go/types, method (*Interface) String() string
|
||||
pkg go/types, method (*Interface) Underlying() Type
|
||||
pkg go/types, method (*Label) Exported() bool
|
||||
pkg go/types, method (*Label) Id() string
|
||||
pkg go/types, method (*Label) Name() string
|
||||
pkg go/types, method (*Label) Parent() *Scope
|
||||
pkg go/types, method (*Label) Pkg() *Package
|
||||
pkg go/types, method (*Label) Pos() token.Pos
|
||||
pkg go/types, method (*Label) String() string
|
||||
pkg go/types, method (*Label) Type() Type
|
||||
pkg go/types, method (*Map) Elem() Type
|
||||
pkg go/types, method (*Map) Key() Type
|
||||
pkg go/types, method (*Map) String() string
|
||||
pkg go/types, method (*Map) Underlying() Type
|
||||
pkg go/types, method (*MethodSet) At(int) *Selection
|
||||
pkg go/types, method (*MethodSet) Len() int
|
||||
pkg go/types, method (*MethodSet) Lookup(*Package, string) *Selection
|
||||
pkg go/types, method (*MethodSet) String() string
|
||||
pkg go/types, method (*Named) AddMethod(*Func)
|
||||
pkg go/types, method (*Named) Method(int) *Func
|
||||
pkg go/types, method (*Named) NumMethods() int
|
||||
pkg go/types, method (*Named) Obj() *TypeName
|
||||
pkg go/types, method (*Named) SetUnderlying(Type)
|
||||
pkg go/types, method (*Named) String() string
|
||||
pkg go/types, method (*Named) Underlying() Type
|
||||
pkg go/types, method (*Nil) Exported() bool
|
||||
pkg go/types, method (*Nil) Id() string
|
||||
pkg go/types, method (*Nil) Name() string
|
||||
pkg go/types, method (*Nil) Parent() *Scope
|
||||
pkg go/types, method (*Nil) Pkg() *Package
|
||||
pkg go/types, method (*Nil) Pos() token.Pos
|
||||
pkg go/types, method (*Nil) String() string
|
||||
pkg go/types, method (*Nil) Type() Type
|
||||
pkg go/types, method (*Package) Complete() bool
|
||||
pkg go/types, method (*Package) Imports() []*Package
|
||||
pkg go/types, method (*Package) MarkComplete()
|
||||
pkg go/types, method (*Package) Name() string
|
||||
pkg go/types, method (*Package) Path() string
|
||||
pkg go/types, method (*Package) Scope() *Scope
|
||||
pkg go/types, method (*Package) SetImports([]*Package)
|
||||
pkg go/types, method (*Package) String() string
|
||||
pkg go/types, method (*PkgName) Exported() bool
|
||||
pkg go/types, method (*PkgName) Id() string
|
||||
pkg go/types, method (*PkgName) Imported() *Package
|
||||
pkg go/types, method (*PkgName) Name() string
|
||||
pkg go/types, method (*PkgName) Parent() *Scope
|
||||
pkg go/types, method (*PkgName) Pkg() *Package
|
||||
pkg go/types, method (*PkgName) Pos() token.Pos
|
||||
pkg go/types, method (*PkgName) String() string
|
||||
pkg go/types, method (*PkgName) Type() Type
|
||||
pkg go/types, method (*Pointer) Elem() Type
|
||||
pkg go/types, method (*Pointer) String() string
|
||||
pkg go/types, method (*Pointer) Underlying() Type
|
||||
pkg go/types, method (*Scope) Child(int) *Scope
|
||||
pkg go/types, method (*Scope) Contains(token.Pos) bool
|
||||
pkg go/types, method (*Scope) End() token.Pos
|
||||
pkg go/types, method (*Scope) Innermost(token.Pos) *Scope
|
||||
pkg go/types, method (*Scope) Insert(Object) Object
|
||||
pkg go/types, method (*Scope) Len() int
|
||||
pkg go/types, method (*Scope) Lookup(string) Object
|
||||
pkg go/types, method (*Scope) LookupParent(string, token.Pos) (*Scope, Object)
|
||||
pkg go/types, method (*Scope) Names() []string
|
||||
pkg go/types, method (*Scope) NumChildren() int
|
||||
pkg go/types, method (*Scope) Parent() *Scope
|
||||
pkg go/types, method (*Scope) Pos() token.Pos
|
||||
pkg go/types, method (*Scope) String() string
|
||||
pkg go/types, method (*Scope) WriteTo(io.Writer, int, bool)
|
||||
pkg go/types, method (*Selection) Index() []int
|
||||
pkg go/types, method (*Selection) Indirect() bool
|
||||
pkg go/types, method (*Selection) Kind() SelectionKind
|
||||
pkg go/types, method (*Selection) Obj() Object
|
||||
pkg go/types, method (*Selection) Recv() Type
|
||||
pkg go/types, method (*Selection) String() string
|
||||
pkg go/types, method (*Selection) Type() Type
|
||||
pkg go/types, method (*Signature) Params() *Tuple
|
||||
pkg go/types, method (*Signature) Recv() *Var
|
||||
pkg go/types, method (*Signature) Results() *Tuple
|
||||
pkg go/types, method (*Signature) String() string
|
||||
pkg go/types, method (*Signature) Underlying() Type
|
||||
pkg go/types, method (*Signature) Variadic() bool
|
||||
pkg go/types, method (*Slice) Elem() Type
|
||||
pkg go/types, method (*Slice) String() string
|
||||
pkg go/types, method (*Slice) Underlying() Type
|
||||
pkg go/types, method (*StdSizes) Alignof(Type) int64
|
||||
pkg go/types, method (*StdSizes) Offsetsof([]*Var) []int64
|
||||
pkg go/types, method (*StdSizes) Sizeof(Type) int64
|
||||
pkg go/types, method (*Struct) Field(int) *Var
|
||||
pkg go/types, method (*Struct) NumFields() int
|
||||
pkg go/types, method (*Struct) String() string
|
||||
pkg go/types, method (*Struct) Tag(int) string
|
||||
pkg go/types, method (*Struct) Underlying() Type
|
||||
pkg go/types, method (*Tuple) At(int) *Var
|
||||
pkg go/types, method (*Tuple) Len() int
|
||||
pkg go/types, method (*Tuple) String() string
|
||||
pkg go/types, method (*Tuple) Underlying() Type
|
||||
pkg go/types, method (*TypeName) Exported() bool
|
||||
pkg go/types, method (*TypeName) Id() string
|
||||
pkg go/types, method (*TypeName) Name() string
|
||||
pkg go/types, method (*TypeName) Parent() *Scope
|
||||
pkg go/types, method (*TypeName) Pkg() *Package
|
||||
pkg go/types, method (*TypeName) Pos() token.Pos
|
||||
pkg go/types, method (*TypeName) String() string
|
||||
pkg go/types, method (*TypeName) Type() Type
|
||||
pkg go/types, method (*Var) Anonymous() bool
|
||||
pkg go/types, method (*Var) Exported() bool
|
||||
pkg go/types, method (*Var) Id() string
|
||||
pkg go/types, method (*Var) IsField() bool
|
||||
pkg go/types, method (*Var) Name() string
|
||||
pkg go/types, method (*Var) Parent() *Scope
|
||||
pkg go/types, method (*Var) Pkg() *Package
|
||||
pkg go/types, method (*Var) Pos() token.Pos
|
||||
pkg go/types, method (*Var) String() string
|
||||
pkg go/types, method (*Var) Type() Type
|
||||
pkg go/types, method (Checker) ObjectOf(*ast.Ident) Object
|
||||
pkg go/types, method (Checker) TypeOf(ast.Expr) Type
|
||||
pkg go/types, method (Error) Error() string
|
||||
pkg go/types, method (TypeAndValue) Addressable() bool
|
||||
pkg go/types, method (TypeAndValue) Assignable() bool
|
||||
pkg go/types, method (TypeAndValue) HasOk() bool
|
||||
pkg go/types, method (TypeAndValue) IsBuiltin() bool
|
||||
pkg go/types, method (TypeAndValue) IsNil() bool
|
||||
pkg go/types, method (TypeAndValue) IsType() bool
|
||||
pkg go/types, method (TypeAndValue) IsValue() bool
|
||||
pkg go/types, method (TypeAndValue) IsVoid() bool
|
||||
pkg go/types, type Array struct
|
||||
pkg go/types, type Basic struct
|
||||
pkg go/types, type BasicInfo int
|
||||
pkg go/types, type BasicKind int
|
||||
pkg go/types, type Builtin struct
|
||||
pkg go/types, type Chan struct
|
||||
pkg go/types, type ChanDir int
|
||||
pkg go/types, type Checker struct
|
||||
pkg go/types, type Checker struct, embedded *Info
|
||||
pkg go/types, type Config struct
|
||||
pkg go/types, type Config struct, DisableUnusedImportCheck bool
|
||||
pkg go/types, type Config struct, Error func(error)
|
||||
pkg go/types, type Config struct, FakeImportC bool
|
||||
pkg go/types, type Config struct, IgnoreFuncBodies bool
|
||||
pkg go/types, type Config struct, Importer Importer
|
||||
pkg go/types, type Config struct, Sizes Sizes
|
||||
pkg go/types, type Const struct
|
||||
pkg go/types, type Error struct
|
||||
pkg go/types, type Error struct, Fset *token.FileSet
|
||||
pkg go/types, type Error struct, Msg string
|
||||
pkg go/types, type Error struct, Pos token.Pos
|
||||
pkg go/types, type Error struct, Soft bool
|
||||
pkg go/types, type Func struct
|
||||
pkg go/types, type Importer interface { Import }
|
||||
pkg go/types, type Importer interface, Import(string) (*Package, error)
|
||||
pkg go/types, type Info struct
|
||||
pkg go/types, type Info struct, Defs map[*ast.Ident]Object
|
||||
pkg go/types, type Info struct, Implicits map[ast.Node]Object
|
||||
pkg go/types, type Info struct, InitOrder []*Initializer
|
||||
pkg go/types, type Info struct, Scopes map[ast.Node]*Scope
|
||||
pkg go/types, type Info struct, Selections map[*ast.SelectorExpr]*Selection
|
||||
pkg go/types, type Info struct, Types map[ast.Expr]TypeAndValue
|
||||
pkg go/types, type Info struct, Uses map[*ast.Ident]Object
|
||||
pkg go/types, type Initializer struct
|
||||
pkg go/types, type Initializer struct, Lhs []*Var
|
||||
pkg go/types, type Initializer struct, Rhs ast.Expr
|
||||
pkg go/types, type Interface struct
|
||||
pkg go/types, type Label struct
|
||||
pkg go/types, type Map struct
|
||||
pkg go/types, type MethodSet struct
|
||||
pkg go/types, type Named struct
|
||||
pkg go/types, type Nil struct
|
||||
pkg go/types, type Object interface, Exported() bool
|
||||
pkg go/types, type Object interface, Id() string
|
||||
pkg go/types, type Object interface, Name() string
|
||||
pkg go/types, type Object interface, Parent() *Scope
|
||||
pkg go/types, type Object interface, Pkg() *Package
|
||||
pkg go/types, type Object interface, Pos() token.Pos
|
||||
pkg go/types, type Object interface, String() string
|
||||
pkg go/types, type Object interface, Type() Type
|
||||
pkg go/types, type Object interface, unexported methods
|
||||
pkg go/types, type Package struct
|
||||
pkg go/types, type PkgName struct
|
||||
pkg go/types, type Pointer struct
|
||||
pkg go/types, type Qualifier func(*Package) string
|
||||
pkg go/types, type Scope struct
|
||||
pkg go/types, type Selection struct
|
||||
pkg go/types, type SelectionKind int
|
||||
pkg go/types, type Signature struct
|
||||
pkg go/types, type Sizes interface { Alignof, Offsetsof, Sizeof }
|
||||
pkg go/types, type Sizes interface, Alignof(Type) int64
|
||||
pkg go/types, type Sizes interface, Offsetsof([]*Var) []int64
|
||||
pkg go/types, type Sizes interface, Sizeof(Type) int64
|
||||
pkg go/types, type Slice struct
|
||||
pkg go/types, type StdSizes struct
|
||||
pkg go/types, type StdSizes struct, MaxAlign int64
|
||||
pkg go/types, type StdSizes struct, WordSize int64
|
||||
pkg go/types, type Struct struct
|
||||
pkg go/types, type Tuple struct
|
||||
pkg go/types, type Type interface { String, Underlying }
|
||||
pkg go/types, type Type interface, String() string
|
||||
pkg go/types, type Type interface, Underlying() Type
|
||||
pkg go/types, type TypeAndValue struct
|
||||
pkg go/types, type TypeAndValue struct, Type Type
|
||||
pkg go/types, type TypeAndValue struct, Value constant.Value
|
||||
pkg go/types, type TypeName struct
|
||||
pkg go/types, type Var struct
|
||||
pkg go/types, var Typ []*Basic
|
||||
pkg go/types, var Universe *Scope
|
||||
pkg go/types, var Unsafe *Package
|
||||
pkg html/template, method (*Template) Option(...string) *Template
|
||||
pkg image, const YCbCrSubsampleRatio410 = 5
|
||||
pkg image, const YCbCrSubsampleRatio410 YCbCrSubsampleRatio
|
||||
pkg image, const YCbCrSubsampleRatio411 = 4
|
||||
pkg image, const YCbCrSubsampleRatio411 YCbCrSubsampleRatio
|
||||
pkg image, func NewCMYK(Rectangle) *CMYK
|
||||
pkg image, method (*CMYK) At(int, int) color.Color
|
||||
pkg image, method (*CMYK) Bounds() Rectangle
|
||||
pkg image, method (*CMYK) CMYKAt(int, int) color.CMYK
|
||||
pkg image, method (*CMYK) ColorModel() color.Model
|
||||
pkg image, method (*CMYK) Opaque() bool
|
||||
pkg image, method (*CMYK) PixOffset(int, int) int
|
||||
pkg image, method (*CMYK) Set(int, int, color.Color)
|
||||
pkg image, method (*CMYK) SetCMYK(int, int, color.CMYK)
|
||||
pkg image, method (*CMYK) SubImage(Rectangle) Image
|
||||
pkg image, method (Rectangle) At(int, int) color.Color
|
||||
pkg image, method (Rectangle) Bounds() Rectangle
|
||||
pkg image, method (Rectangle) ColorModel() color.Model
|
||||
pkg image, type CMYK struct
|
||||
pkg image, type CMYK struct, Pix []uint8
|
||||
pkg image, type CMYK struct, Rect Rectangle
|
||||
pkg image, type CMYK struct, Stride int
|
||||
pkg image/color, func CMYKToRGB(uint8, uint8, uint8, uint8) (uint8, uint8, uint8)
|
||||
pkg image/color, func RGBToCMYK(uint8, uint8, uint8) (uint8, uint8, uint8, uint8)
|
||||
pkg image/color, method (CMYK) RGBA() (uint32, uint32, uint32, uint32)
|
||||
pkg image/color, type CMYK struct
|
||||
pkg image/color, type CMYK struct, C uint8
|
||||
pkg image/color, type CMYK struct, K uint8
|
||||
pkg image/color, type CMYK struct, M uint8
|
||||
pkg image/color, type CMYK struct, Y uint8
|
||||
pkg image/color, var CMYKModel Model
|
||||
pkg image/gif, const DisposalBackground = 2
|
||||
pkg image/gif, const DisposalBackground ideal-int
|
||||
pkg image/gif, const DisposalNone = 1
|
||||
pkg image/gif, const DisposalNone ideal-int
|
||||
pkg image/gif, const DisposalPrevious = 3
|
||||
pkg image/gif, const DisposalPrevious ideal-int
|
||||
pkg image/gif, type GIF struct, BackgroundIndex uint8
|
||||
pkg image/gif, type GIF struct, Config image.Config
|
||||
pkg image/gif, type GIF struct, Disposal []uint8
|
||||
pkg io, func CopyBuffer(Writer, Reader, []uint8) (int64, error)
|
||||
pkg log, const LUTC = 32
|
||||
pkg log, const LUTC ideal-int
|
||||
pkg log, func Output(int, string) error
|
||||
pkg log, method (*Logger) SetOutput(io.Writer)
|
||||
pkg math/big, const Above = 1
|
||||
pkg math/big, const Above Accuracy
|
||||
pkg math/big, const AwayFromZero = 3
|
||||
pkg math/big, const AwayFromZero RoundingMode
|
||||
pkg math/big, const Below = -1
|
||||
pkg math/big, const Below Accuracy
|
||||
pkg math/big, const Exact = 0
|
||||
pkg math/big, const Exact Accuracy
|
||||
pkg math/big, const MaxExp = 2147483647
|
||||
pkg math/big, const MaxExp ideal-int
|
||||
pkg math/big, const MaxPrec = 4294967295
|
||||
pkg math/big, const MaxPrec ideal-int
|
||||
pkg math/big, const MinExp = -2147483648
|
||||
pkg math/big, const MinExp ideal-int
|
||||
pkg math/big, const ToNearestAway = 1
|
||||
pkg math/big, const ToNearestAway RoundingMode
|
||||
pkg math/big, const ToNearestEven = 0
|
||||
pkg math/big, const ToNearestEven RoundingMode
|
||||
pkg math/big, const ToNegativeInf = 4
|
||||
pkg math/big, const ToNegativeInf RoundingMode
|
||||
pkg math/big, const ToPositiveInf = 5
|
||||
pkg math/big, const ToPositiveInf RoundingMode
|
||||
pkg math/big, const ToZero = 2
|
||||
pkg math/big, const ToZero RoundingMode
|
||||
pkg math/big, func Jacobi(*Int, *Int) int
|
||||
pkg math/big, func NewFloat(float64) *Float
|
||||
pkg math/big, func ParseFloat(string, int, uint, RoundingMode) (*Float, int, error)
|
||||
pkg math/big, method (*Float) Abs(*Float) *Float
|
||||
pkg math/big, method (*Float) Acc() Accuracy
|
||||
pkg math/big, method (*Float) Add(*Float, *Float) *Float
|
||||
pkg math/big, method (*Float) Append([]uint8, uint8, int) []uint8
|
||||
pkg math/big, method (*Float) Cmp(*Float) int
|
||||
pkg math/big, method (*Float) Copy(*Float) *Float
|
||||
pkg math/big, method (*Float) Float32() (float32, Accuracy)
|
||||
pkg math/big, method (*Float) Float64() (float64, Accuracy)
|
||||
pkg math/big, method (*Float) Format(fmt.State, int32)
|
||||
pkg math/big, method (*Float) Int(*Int) (*Int, Accuracy)
|
||||
pkg math/big, method (*Float) Int64() (int64, Accuracy)
|
||||
pkg math/big, method (*Float) IsInf() bool
|
||||
pkg math/big, method (*Float) IsInt() bool
|
||||
pkg math/big, method (*Float) MantExp(*Float) int
|
||||
pkg math/big, method (*Float) MinPrec() uint
|
||||
pkg math/big, method (*Float) Mode() RoundingMode
|
||||
pkg math/big, method (*Float) Mul(*Float, *Float) *Float
|
||||
pkg math/big, method (*Float) Neg(*Float) *Float
|
||||
pkg math/big, method (*Float) Parse(string, int) (*Float, int, error)
|
||||
pkg math/big, method (*Float) Prec() uint
|
||||
pkg math/big, method (*Float) Quo(*Float, *Float) *Float
|
||||
pkg math/big, method (*Float) Rat(*Rat) (*Rat, Accuracy)
|
||||
pkg math/big, method (*Float) Set(*Float) *Float
|
||||
pkg math/big, method (*Float) SetFloat64(float64) *Float
|
||||
pkg math/big, method (*Float) SetInf(bool) *Float
|
||||
pkg math/big, method (*Float) SetInt(*Int) *Float
|
||||
pkg math/big, method (*Float) SetInt64(int64) *Float
|
||||
pkg math/big, method (*Float) SetMantExp(*Float, int) *Float
|
||||
pkg math/big, method (*Float) SetMode(RoundingMode) *Float
|
||||
pkg math/big, method (*Float) SetPrec(uint) *Float
|
||||
pkg math/big, method (*Float) SetRat(*Rat) *Float
|
||||
pkg math/big, method (*Float) SetString(string) (*Float, bool)
|
||||
pkg math/big, method (*Float) SetUint64(uint64) *Float
|
||||
pkg math/big, method (*Float) Sign() int
|
||||
pkg math/big, method (*Float) Signbit() bool
|
||||
pkg math/big, method (*Float) String() string
|
||||
pkg math/big, method (*Float) Sub(*Float, *Float) *Float
|
||||
pkg math/big, method (*Float) Text(uint8, int) string
|
||||
pkg math/big, method (*Float) Uint64() (uint64, Accuracy)
|
||||
pkg math/big, method (*Int) ModSqrt(*Int, *Int) *Int
|
||||
pkg math/big, method (Accuracy) String() string
|
||||
pkg math/big, method (ErrNaN) Error() string
|
||||
pkg math/big, method (RoundingMode) String() string
|
||||
pkg math/big, type Accuracy int8
|
||||
pkg math/big, type ErrNaN struct
|
||||
pkg math/big, type Float struct
|
||||
pkg math/big, type RoundingMode uint8
|
||||
pkg mime, const BEncoding = 98
|
||||
pkg mime, const BEncoding WordEncoder
|
||||
pkg mime, const QEncoding = 113
|
||||
pkg mime, const QEncoding WordEncoder
|
||||
pkg mime, func ExtensionsByType(string) ([]string, error)
|
||||
pkg mime, method (*WordDecoder) Decode(string) (string, error)
|
||||
pkg mime, method (*WordDecoder) DecodeHeader(string) (string, error)
|
||||
pkg mime, method (WordEncoder) Encode(string, string) string
|
||||
pkg mime, type WordDecoder struct
|
||||
pkg mime, type WordDecoder struct, CharsetReader func(string, io.Reader) (io.Reader, error)
|
||||
pkg mime, type WordEncoder uint8
|
||||
pkg mime/quotedprintable, func NewReader(io.Reader) *Reader
|
||||
pkg mime/quotedprintable, func NewWriter(io.Writer) *Writer
|
||||
pkg mime/quotedprintable, method (*Reader) Read([]uint8) (int, error)
|
||||
pkg mime/quotedprintable, method (*Writer) Close() error
|
||||
pkg mime/quotedprintable, method (*Writer) Write([]uint8) (int, error)
|
||||
pkg mime/quotedprintable, type Reader struct
|
||||
pkg mime/quotedprintable, type Writer struct
|
||||
pkg mime/quotedprintable, type Writer struct, Binary bool
|
||||
pkg net, type Dialer struct, FallbackDelay time.Duration
|
||||
pkg net, type OpError struct, Source Addr
|
||||
pkg net/http, type Request struct, Cancel <-chan struct
|
||||
pkg net/http/fcgi, var ErrConnClosed error
|
||||
pkg net/http/fcgi, var ErrRequestAborted error
|
||||
pkg net/http/pprof, func Trace(http.ResponseWriter, *http.Request)
|
||||
pkg net/mail, method (*AddressParser) Parse(string) (*Address, error)
|
||||
pkg net/mail, method (*AddressParser) ParseList(string) ([]*Address, error)
|
||||
pkg net/mail, type AddressParser struct
|
||||
pkg net/mail, type AddressParser struct, WordDecoder *mime.WordDecoder
|
||||
pkg net/smtp, method (*Client) TLSConnectionState() (tls.ConnectionState, bool)
|
||||
pkg net/url, method (*URL) EscapedPath() string
|
||||
pkg net/url, type URL struct, RawPath string
|
||||
pkg os, func LookupEnv(string) (string, bool)
|
||||
pkg os/signal, func Ignore(...os.Signal)
|
||||
pkg os/signal, func Reset(...os.Signal)
|
||||
pkg reflect, func ArrayOf(int, Type) Type
|
||||
pkg reflect, func FuncOf([]Type, []Type, bool) Type
|
||||
pkg runtime, func ReadTrace() []uint8
|
||||
pkg runtime, func StartTrace() error
|
||||
pkg runtime, func StopTrace()
|
||||
pkg runtime, type MemStats struct, GCCPUFraction float64
|
||||
pkg runtime/trace, func Start(io.Writer) error
|
||||
pkg runtime/trace, func Stop()
|
||||
pkg strings, func Compare(string, string) int
|
||||
pkg strings, func LastIndexByte(string, uint8) int
|
||||
pkg strings, method (*Reader) Size() int64
|
||||
pkg syscall (darwin-386), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (darwin-386), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (darwin-386), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (darwin-386-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (darwin-386-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (darwin-386-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (darwin-amd64), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (darwin-amd64), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (darwin-amd64), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (darwin-amd64-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-386), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-386), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-386), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-386-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-amd64), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-amd64), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-amd64), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-amd64-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-arm), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-arm), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-arm), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (freebsd-arm-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-386), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-386), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-386), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-386-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-386-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-386-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-amd64), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-amd64), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-amd64), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-amd64-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-amd64-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-amd64-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-arm), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-arm), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-arm), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (linux-arm-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (linux-arm-cgo), type SysProcAttr struct, GidMappingsEnableSetgroups bool
|
||||
pkg syscall (linux-arm-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-386), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-386), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-386), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-386-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-amd64), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-amd64), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-amd64), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-amd64-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-arm), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-arm), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-arm), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (netbsd-arm-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (openbsd-386), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (openbsd-386), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (openbsd-386), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (openbsd-386-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (openbsd-amd64), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (openbsd-amd64), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (openbsd-amd64), type SysProcAttr struct, Pgid int
|
||||
pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Ctty int
|
||||
pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Foreground bool
|
||||
pkg syscall (openbsd-amd64-cgo), type SysProcAttr struct, Pgid int
|
||||
pkg text/template, method (*Template) DefinedTemplates() string
|
||||
pkg text/template, method (*Template) Option(...string) *Template
|
||||
pkg time, method (Time) AppendFormat([]uint8, string) []uint8
|
||||
pkg unicode, const Version = "8.0.0"
|
||||
pkg unicode, var Ahom *RangeTable
|
||||
pkg unicode, var Anatolian_Hieroglyphs *RangeTable
|
||||
pkg unicode, var Hatran *RangeTable
|
||||
pkg unicode, var Multani *RangeTable
|
||||
pkg unicode, var Old_Hungarian *RangeTable
|
||||
pkg unicode, var SignWriting *RangeTable
|
||||
275
api/go1.6.txt
275
api/go1.6.txt
@@ -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
|
||||
285
api/go1.7.txt
285
api/go1.7.txt
@@ -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
|
||||
141
api/next.txt
141
api/next.txt
@@ -0,0 +1,141 @@
|
||||
pkg debug/goobj, const SBSS = 21
|
||||
pkg debug/goobj, const SBSS SymKind
|
||||
pkg debug/goobj, const SCONST = 31
|
||||
pkg debug/goobj, const SCONST SymKind
|
||||
pkg debug/goobj, const SDATA = 19
|
||||
pkg debug/goobj, const SDATA SymKind
|
||||
pkg debug/goobj, const SDYNIMPORT = 32
|
||||
pkg debug/goobj, const SDYNIMPORT SymKind
|
||||
pkg debug/goobj, const SELFROSECT = 12
|
||||
pkg debug/goobj, const SELFROSECT SymKind
|
||||
pkg debug/goobj, const SELFRXSECT = 2
|
||||
pkg debug/goobj, const SELFRXSECT SymKind
|
||||
pkg debug/goobj, const SELFSECT = 14
|
||||
pkg debug/goobj, const SELFSECT SymKind
|
||||
pkg debug/goobj, const SFILE = 29
|
||||
pkg debug/goobj, const SFILE SymKind
|
||||
pkg debug/goobj, const SFILEPATH = 30
|
||||
pkg debug/goobj, const SFILEPATH SymKind
|
||||
pkg debug/goobj, const SFUNCTAB = 8
|
||||
pkg debug/goobj, const SFUNCTAB SymKind
|
||||
pkg debug/goobj, const SGOFUNC = 6
|
||||
pkg debug/goobj, const SGOFUNC SymKind
|
||||
pkg debug/goobj, const SGOSTRING = 5
|
||||
pkg debug/goobj, const SGOSTRING SymKind
|
||||
pkg debug/goobj, const SHOSTOBJ = 33
|
||||
pkg debug/goobj, const SHOSTOBJ SymKind
|
||||
pkg debug/goobj, const SINITARR = 18
|
||||
pkg debug/goobj, const SINITARR SymKind
|
||||
pkg debug/goobj, const SMACHO = 15
|
||||
pkg debug/goobj, const SMACHO SymKind
|
||||
pkg debug/goobj, const SMACHOGOT = 16
|
||||
pkg debug/goobj, const SMACHOGOT SymKind
|
||||
pkg debug/goobj, const SMACHOINDIRECTGOT = 28
|
||||
pkg debug/goobj, const SMACHOINDIRECTGOT SymKind
|
||||
pkg debug/goobj, const SMACHOINDIRECTPLT = 27
|
||||
pkg debug/goobj, const SMACHOINDIRECTPLT SymKind
|
||||
pkg debug/goobj, const SMACHOPLT = 13
|
||||
pkg debug/goobj, const SMACHOPLT SymKind
|
||||
pkg debug/goobj, const SMACHOSYMSTR = 25
|
||||
pkg debug/goobj, const SMACHOSYMSTR SymKind
|
||||
pkg debug/goobj, const SMACHOSYMTAB = 26
|
||||
pkg debug/goobj, const SMACHOSYMTAB SymKind
|
||||
pkg debug/goobj, const SNOPTRBSS = 22
|
||||
pkg debug/goobj, const SNOPTRBSS SymKind
|
||||
pkg debug/goobj, const SNOPTRDATA = 17
|
||||
pkg debug/goobj, const SNOPTRDATA SymKind
|
||||
pkg debug/goobj, const SPCLNTAB = 11
|
||||
pkg debug/goobj, const SPCLNTAB SymKind
|
||||
pkg debug/goobj, const SRODATA = 7
|
||||
pkg debug/goobj, const SRODATA SymKind
|
||||
pkg debug/goobj, const SSTRING = 4
|
||||
pkg debug/goobj, const SSTRING SymKind
|
||||
pkg debug/goobj, const SSYMTAB = 10
|
||||
pkg debug/goobj, const SSYMTAB SymKind
|
||||
pkg debug/goobj, const STEXT = 1
|
||||
pkg debug/goobj, const STEXT SymKind
|
||||
pkg debug/goobj, const STLSBSS = 23
|
||||
pkg debug/goobj, const STLSBSS SymKind
|
||||
pkg debug/goobj, const STYPE = 3
|
||||
pkg debug/goobj, const STYPE SymKind
|
||||
pkg debug/goobj, const STYPELINK = 9
|
||||
pkg debug/goobj, const STYPELINK SymKind
|
||||
pkg debug/goobj, const SWINDOWS = 20
|
||||
pkg debug/goobj, const SWINDOWS SymKind
|
||||
pkg debug/goobj, const SXREF = 24
|
||||
pkg debug/goobj, const SXREF SymKind
|
||||
pkg debug/goobj, func Parse(io.ReadSeeker, string) (*Package, error)
|
||||
pkg debug/goobj, method (Sym) String() string
|
||||
pkg debug/goobj, method (SymID) String() string
|
||||
pkg debug/goobj, method (SymKind) String() string
|
||||
pkg debug/goobj, type Data struct
|
||||
pkg debug/goobj, type Data struct, Offset int64
|
||||
pkg debug/goobj, type Data struct, Size int64
|
||||
pkg debug/goobj, type Func struct
|
||||
pkg debug/goobj, type Func struct, Args int
|
||||
pkg debug/goobj, type Func struct, File []string
|
||||
pkg debug/goobj, type Func struct, Frame int
|
||||
pkg debug/goobj, type Func struct, FuncData []FuncData
|
||||
pkg debug/goobj, type Func struct, Leaf bool
|
||||
pkg debug/goobj, type Func struct, NoSplit bool
|
||||
pkg debug/goobj, type Func struct, PCData []Data
|
||||
pkg debug/goobj, type Func struct, PCFile Data
|
||||
pkg debug/goobj, type Func struct, PCLine Data
|
||||
pkg debug/goobj, type Func struct, PCSP Data
|
||||
pkg debug/goobj, type Func struct, Var []Var
|
||||
pkg debug/goobj, type FuncData struct
|
||||
pkg debug/goobj, type FuncData struct, Offset int64
|
||||
pkg debug/goobj, type FuncData struct, Sym SymID
|
||||
pkg debug/goobj, type Package struct
|
||||
pkg debug/goobj, type Package struct, ImportPath string
|
||||
pkg debug/goobj, type Package struct, Imports []string
|
||||
pkg debug/goobj, type Package struct, MaxVersion int
|
||||
pkg debug/goobj, type Package struct, Syms []*Sym
|
||||
pkg debug/goobj, type Reloc struct
|
||||
pkg debug/goobj, type Reloc struct, Add int
|
||||
pkg debug/goobj, type Reloc struct, Offset int
|
||||
pkg debug/goobj, type Reloc struct, Size int
|
||||
pkg debug/goobj, type Reloc struct, Sym SymID
|
||||
pkg debug/goobj, type Reloc struct, Type int
|
||||
pkg debug/goobj, type Sym struct
|
||||
pkg debug/goobj, type Sym struct, Data Data
|
||||
pkg debug/goobj, type Sym struct, DupOK bool
|
||||
pkg debug/goobj, type Sym struct, Func *Func
|
||||
pkg debug/goobj, type Sym struct, Kind SymKind
|
||||
pkg debug/goobj, type Sym struct, Reloc []Reloc
|
||||
pkg debug/goobj, type Sym struct, Size int
|
||||
pkg debug/goobj, type Sym struct, Type SymID
|
||||
pkg debug/goobj, type Sym struct, embedded SymID
|
||||
pkg debug/goobj, type SymID struct
|
||||
pkg debug/goobj, type SymID struct, Name string
|
||||
pkg debug/goobj, type SymID struct, Version int
|
||||
pkg debug/goobj, type SymKind int
|
||||
pkg debug/goobj, type Var struct
|
||||
pkg debug/goobj, type Var struct, Kind int
|
||||
pkg debug/goobj, type Var struct, Name string
|
||||
pkg debug/goobj, type Var struct, Offset int
|
||||
pkg debug/goobj, type Var struct, Type SymID
|
||||
pkg unicode, const Version = "7.0.0"
|
||||
pkg unicode, var Bassa_Vah *RangeTable
|
||||
pkg unicode, var Caucasian_Albanian *RangeTable
|
||||
pkg unicode, var Duployan *RangeTable
|
||||
pkg unicode, var Elbasan *RangeTable
|
||||
pkg unicode, var Grantha *RangeTable
|
||||
pkg unicode, var Khojki *RangeTable
|
||||
pkg unicode, var Khudawadi *RangeTable
|
||||
pkg unicode, var Linear_A *RangeTable
|
||||
pkg unicode, var Mahajani *RangeTable
|
||||
pkg unicode, var Manichaean *RangeTable
|
||||
pkg unicode, var Mende_Kikakui *RangeTable
|
||||
pkg unicode, var Modi *RangeTable
|
||||
pkg unicode, var Mro *RangeTable
|
||||
pkg unicode, var Nabataean *RangeTable
|
||||
pkg unicode, var Old_North_Arabian *RangeTable
|
||||
pkg unicode, var Old_Permic *RangeTable
|
||||
pkg unicode, var Pahawh_Hmong *RangeTable
|
||||
pkg unicode, var Palmyrene *RangeTable
|
||||
pkg unicode, var Pau_Cin_Hau *RangeTable
|
||||
pkg unicode, var Psalter_Pahlavi *RangeTable
|
||||
pkg unicode, var Siddham *RangeTable
|
||||
pkg unicode, var Tirhuta *RangeTable
|
||||
pkg unicode, var Warang_Citi *RangeTable
|
||||
|
||||
@@ -250,16 +250,11 @@ 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
|
||||
tool.
|
||||
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, such as by running <code>yacc</code>.
|
||||
For more advanced build setups, you may need to write a
|
||||
tool. In particular, it does not have any facility for generating Go
|
||||
source files during a build. Instead, if you want to use a tool like
|
||||
yacc or the protocol buffer compiler, you will 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
|
||||
to generate the Go files and then check those generated source files
|
||||
into your repository. This is more work for you, the package author,
|
||||
but it is significantly less work for your users, who can use
|
||||
"<code>go get</code>" without needing to obtain and build
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
*** final.go 2015-06-14 23:59:22.000000000 +0200
|
||||
--- final-test.go 2015-06-15 00:15:41.000000000 +0200
|
||||
***************
|
||||
*** 7,12 ****
|
||||
--- 7,14 ----
|
||||
import (
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
+ "log"
|
||||
+ "net"
|
||||
"net/http"
|
||||
"regexp"
|
||||
)
|
||||
***************
|
||||
*** 85,89 ****
|
||||
http.HandleFunc("/edit/", makeHandler(editHandler))
|
||||
http.HandleFunc("/save/", makeHandler(saveHandler))
|
||||
|
||||
! http.ListenAndServe(":8080", nil)
|
||||
}
|
||||
--- 87,101 ----
|
||||
http.HandleFunc("/edit/", makeHandler(editHandler))
|
||||
http.HandleFunc("/save/", makeHandler(saveHandler))
|
||||
|
||||
! l, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
! if err != nil {
|
||||
! log.Fatal(err)
|
||||
! }
|
||||
! err = ioutil.WriteFile("final-test-port.txt", []byte(l.Addr().String()), 0644)
|
||||
! if err != nil {
|
||||
! log.Fatal(err)
|
||||
! }
|
||||
! s := &http.Server{}
|
||||
! s.Serve(l)
|
||||
! return
|
||||
}
|
||||
@@ -5,12 +5,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
addr = flag.Bool("addr", false, "find open address and print to final-port.txt")
|
||||
)
|
||||
|
||||
type Page struct {
|
||||
Title string
|
||||
Body []byte
|
||||
@@ -81,9 +88,24 @@ func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.Handl
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
http.HandleFunc("/view/", makeHandler(viewHandler))
|
||||
http.HandleFunc("/edit/", makeHandler(editHandler))
|
||||
http.HandleFunc("/save/", makeHandler(saveHandler))
|
||||
|
||||
if *addr {
|
||||
l, err := net.Listen("tcp", "127.0.0.1:0")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = ioutil.WriteFile("final-port.txt", []byte(l.Addr().String()), 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
s := &http.Server{}
|
||||
s.Serve(l)
|
||||
return
|
||||
}
|
||||
|
||||
http.ListenAndServe(":8080", nil)
|
||||
}
|
||||
|
||||
@@ -4,20 +4,14 @@
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
set -e
|
||||
|
||||
if ! which patch > /dev/null; then
|
||||
echo "Skipping test; patch command not found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
wiki_pid=
|
||||
cleanup() {
|
||||
kill $wiki_pid
|
||||
rm -f test_*.out Test.txt final-test.go final-test.bin final-test-port.txt a.out get.bin
|
||||
rm -f test_*.out Test.txt final.bin final-port.txt a.out get.bin
|
||||
}
|
||||
trap cleanup 0 INT
|
||||
|
||||
rm -f get.bin final-test.bin a.out
|
||||
rm -f get.bin final.bin a.out
|
||||
|
||||
# If called with -all, check that all code snippets compile.
|
||||
if [ "$1" == "-all" ]; then
|
||||
@@ -27,14 +21,12 @@ if [ "$1" == "-all" ]; then
|
||||
fi
|
||||
|
||||
go build -o get.bin get.go
|
||||
cp final.go final-test.go
|
||||
patch final-test.go final-test.patch > /dev/null
|
||||
go build -o final-test.bin final-test.go
|
||||
./final-test.bin &
|
||||
go build -o final.bin final.go
|
||||
(./final.bin --addr) &
|
||||
wiki_pid=$!
|
||||
|
||||
l=0
|
||||
while [ ! -f ./final-test-port.txt ]
|
||||
while [ ! -f ./final-port.txt ]
|
||||
do
|
||||
l=$(($l+1))
|
||||
if [ "$l" -gt 5 ]
|
||||
@@ -46,7 +38,7 @@ do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
addr=$(cat final-test-port.txt)
|
||||
addr=$(cat final-port.txt)
|
||||
./get.bin http://$addr/edit/Test > test_edit.out
|
||||
diff -u test_edit.out test_edit.good
|
||||
./get.bin -post=body=some%20content http://$addr/save/Test > test_save.out
|
||||
|
||||
451
doc/asm.html
451
doc/asm.html
@@ -6,16 +6,16 @@
|
||||
<h2 id="introduction">A Quick Guide to Go's Assembler</h2>
|
||||
|
||||
<p>
|
||||
This document is a quick outline of the unusual form of assembly language used by the <code>gc</code> Go compiler.
|
||||
This document is a quick outline of the unusual form of assembly language used by the <code>gc</code>
|
||||
suite of Go compilers (<code>6g</code>, <code>8g</code>, etc.).
|
||||
The document is not comprehensive.
|
||||
</p>
|
||||
|
||||
<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>.
|
||||
The assembler is based on the input to the Plan 9 assemblers, which is documented in detail
|
||||
<a href="http://plan9.bell-labs.com/sys/doc/asm.html">on the Plan 9 site</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
|
||||
This document provides a summary of the syntax and
|
||||
describes the peculiarities that apply when writing assembly code to interact with Go.
|
||||
</p>
|
||||
|
||||
@@ -23,14 +23,12 @@ 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.
|
||||
The assembler works on the semi-abstract form, so
|
||||
when you see an instruction like <code>MOV</code>
|
||||
what the tool chain actually generates for that operation might
|
||||
not be a move instruction at all, perhaps a clear or load.
|
||||
Instead, the compiler emits a kind of incompletely defined instruction set, in binary form, which the linker
|
||||
then completes.
|
||||
In particular, the linker does instruction selection, so when you see an instruction like <code>MOV</code>
|
||||
what the linker actually generates for that operation might not be a move instruction at all, perhaps a clear or load.
|
||||
Or it might correspond exactly to the machine instruction with that name.
|
||||
In general, machine-specific operations tend to appear as themselves, while more general concepts like
|
||||
memory move and subroutine call and return are more abstract.
|
||||
@@ -38,15 +36,13 @@ The details vary with architecture, and we apologize for the imprecision; the si
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The assembler program is a way to parse a description of that
|
||||
semi-abstract instruction set and turn it into instructions to be
|
||||
input to the linker.
|
||||
The assembler program is a way to generate that intermediate, incompletely defined instruction sequence
|
||||
as input for the linker.
|
||||
If you want to see what the instructions look like in assembly for a given architecture, say amd64, there
|
||||
are many examples in the sources of the standard library, in packages such as
|
||||
<a href="/pkg/runtime/"><code>runtime</code></a> and
|
||||
<a href="/pkg/math/big/"><code>math/big</code></a>.
|
||||
You can also examine what the compiler emits as assembly code
|
||||
(the actual output may differ from what you see here):
|
||||
You can also examine what the compiler emits as assembly code:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -56,7 +52,7 @@ package main
|
||||
func main() {
|
||||
println(3)
|
||||
}
|
||||
$ GOOS=linux GOARCH=amd64 go tool compile -S x.go # or: go build -gcflags -S x.go
|
||||
$ go tool 6g -S x.go # or: go build -gcflags -S x.go
|
||||
|
||||
--- prog list "main" ---
|
||||
0000 (x.go:3) TEXT main+0(SB),$8-0
|
||||
@@ -110,73 +106,20 @@ codeblk [0x2000,0x1d059) at offset 0x1000
|
||||
|
||||
-->
|
||||
|
||||
<h3 id="constants">Constants</h3>
|
||||
|
||||
<p>
|
||||
Although the assembler takes its guidance from the Plan 9 assemblers,
|
||||
it is a distinct program, so there are some differences.
|
||||
One is in constant evaluation.
|
||||
Constant expressions in the assembler are parsed using Go's operator
|
||||
precedence, not the C-like precedence of the original.
|
||||
Thus <code>3&1<<2</code> is 4, not 0—it parses as <code>(3&1)<<2</code>
|
||||
not <code>3&(1<<2)</code>.
|
||||
Also, constants are always evaluated as 64-bit unsigned integers.
|
||||
Thus <code>-2</code> is not the integer value minus two,
|
||||
but the unsigned 64-bit integer with the same bit pattern.
|
||||
The distinction rarely matters but
|
||||
to avoid ambiguity, division or right shift where the right operand's
|
||||
high bit is set is rejected.
|
||||
</p>
|
||||
|
||||
<h3 id="symbols">Symbols</h3>
|
||||
|
||||
<p>
|
||||
Some symbols, such as <code>R1</code> or <code>LR</code>,
|
||||
are predefined and refer to registers.
|
||||
The exact set depends on the architecture.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are four predeclared symbols that refer to pseudo-registers.
|
||||
These are not real registers, but rather virtual registers maintained by
|
||||
the tool chain, such as a frame pointer.
|
||||
The set of pseudo-registers is the same for all architectures:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<code>FP</code>: Frame pointer: arguments and locals.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>PC</code>: Program counter:
|
||||
jumps and branches.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>SB</code>: Static base pointer: global symbols.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>SP</code>: Stack pointer: top of stack.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
All user-defined symbols are written as offsets to the pseudo-registers
|
||||
<code>FP</code> (arguments and locals) and <code>SB</code> (globals).
|
||||
Some symbols, such as <code>PC</code>, <code>R0</code> and <code>SP</code>, are predeclared and refer to registers.
|
||||
There are two other predeclared symbols, <code>SB</code> (static base) and <code>FP</code> (frame pointer).
|
||||
All user-defined symbols other than jump labels are written as offsets to these pseudo-registers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>SB</code> pseudo-register can be thought of as the origin of memory, so the symbol <code>foo(SB)</code>
|
||||
is the name <code>foo</code> as an address in memory.
|
||||
This form is used to name global functions and data.
|
||||
Adding <code><></code> to the name, as in <span style="white-space: nowrap"><code>foo<>(SB)</code></span>, makes the name
|
||||
Adding <code><></code> to the name, as in <code>foo<>(SB)</code>, 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>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -185,19 +128,9 @@ used to refer to function arguments.
|
||||
The compilers maintain a virtual frame pointer and refer to the arguments on the stack as offsets from that pseudo-register.
|
||||
Thus <code>0(FP)</code> is the first argument to the function,
|
||||
<code>8(FP)</code> is the second (on a 64-bit machine), and so on.
|
||||
However, when referring to a function argument this way, it is necessary to place a name
|
||||
When referring to a function argument this way, it is conventional to place the name
|
||||
at the beginning, as in <code>first_arg+0(FP)</code> and <code>second_arg+8(FP)</code>.
|
||||
(The meaning of the offset—offset from the frame pointer—distinct
|
||||
from its use with <code>SB</code>, where it is an offset from the symbol.)
|
||||
The assembler enforces this convention, rejecting plain <code>0(FP)</code> and <code>8(FP)</code>.
|
||||
The actual name is semantically irrelevant but should be used to document
|
||||
the argument's name.
|
||||
It is worth stressing that <code>FP</code> is always a
|
||||
pseudo-register, not a hardware
|
||||
register, even on architectures with a hardware frame pointer.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some of the assemblers enforce this convention, rejecting plain <code>0(FP)</code> and <code>8(FP)</code>.
|
||||
For assembly functions with Go prototypes, <code>go</code> <code>vet</code> will check that the argument names
|
||||
and offsets match.
|
||||
On 32-bit systems, the low and high 32 bits of a 64-bit value are distinguished by adding
|
||||
@@ -212,53 +145,13 @@ prepared for function calls.
|
||||
It points to the top of the local stack frame, so references should use negative offsets
|
||||
in the range [−framesize, 0):
|
||||
<code>x-8(SP)</code>, <code>y-4(SP)</code>, and so on.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
On architectures with a hardware register named <code>SP</code>,
|
||||
the name prefix distinguishes
|
||||
references to the virtual stack pointer from references to the architectural
|
||||
<code>SP</code> register.
|
||||
That is, <code>x-8(SP)</code> and <code>-8(SP)</code>
|
||||
are different memory locations:
|
||||
the first refers to the virtual stack pointer pseudo-register,
|
||||
while the second refers to the
|
||||
On architectures with a real register named <code>SP</code>, the name prefix distinguishes
|
||||
references to the virtual stack pointer from references to the architectural <code>SP</code> register.
|
||||
That is, <code>x-8(SP)</code> and <code>-8(SP)</code> are different memory locations:
|
||||
the first refers to the virtual stack pointer pseudo-register, while the second refers to the
|
||||
hardware's <code>SP</code> register.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
On machines where <code>SP</code> and <code>PC</code> are
|
||||
traditionally aliases for a physical, numbered register,
|
||||
in the Go assembler the names <code>SP</code> and <code>PC</code>
|
||||
are still treated specially;
|
||||
for instance, references to <code>SP</code> require a symbol,
|
||||
much like <code>FP</code>.
|
||||
To access the actual hardware register use the true <code>R</code> name.
|
||||
For example, on the ARM architecture the hardware
|
||||
<code>SP</code> and <code>PC</code> are accessible as
|
||||
<code>R13</code> and <code>R15</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Branches and direct jumps are always written as offsets to the PC, or as
|
||||
jumps to labels:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
label:
|
||||
MOVW $0, R1
|
||||
JMP label
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Each label is visible only within the function in which it is defined.
|
||||
It is therefore permitted for multiple functions in a file to define
|
||||
and use the same label names.
|
||||
Direct jumps and call instructions can target text symbols,
|
||||
such as <code>name(SB)</code>, but not offsets from symbols,
|
||||
such as <code>name+4(SB)</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Instructions, registers, and assembler directives are always in UPPER CASE to remind you
|
||||
that assembly programming is a fraught endeavor.
|
||||
@@ -419,17 +312,11 @@ This data contains no pointers and therefore does not need to be
|
||||
scanned by the garbage collector.
|
||||
</li>
|
||||
<li>
|
||||
<code>WRAPPER</code> = 32
|
||||
<code>WRAPPER</code> = 32
|
||||
<br>
|
||||
(For <code>TEXT</code> items.)
|
||||
This is a wrapper function and should not count as disabling <code>recover</code>.
|
||||
</li>
|
||||
<li>
|
||||
<code>NEEDCTXT</code> = 64
|
||||
<br>
|
||||
(For <code>TEXT</code> items.)
|
||||
This function is a closure so it uses its incoming context register.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="runtime">Runtime Coordination</h3>
|
||||
@@ -463,11 +350,7 @@ live pointers in its arguments, results, and local stack frame.
|
||||
For an assembly function with no pointer results and
|
||||
either no local stack frame or no function calls,
|
||||
the only requirement is to define a Go prototype for the function
|
||||
in a Go source file in the same package. The name of the assembly
|
||||
function must not contain the package name component (for example,
|
||||
function <code>Syscall</code> in package <code>syscall</code> should
|
||||
use the name <code>·Syscall</code> instead of the equivalent name
|
||||
<code>syscall·Syscall</code> in its <code>TEXT</code> directive).
|
||||
in a Go source file in the same package.
|
||||
For more complex situations, explicit annotation is needed.
|
||||
These annotations use pseudo-instructions defined in the standard
|
||||
<code>#include</code> file <code>funcdata.h</code>.
|
||||
@@ -510,72 +393,46 @@ 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>
|
||||
It is impractical to list all the instructions and other details for each machine.
|
||||
To see what instructions are defined for a given machine, say ARM,
|
||||
look in the source for the <code>obj</code> support library for
|
||||
that architecture, located in the directory <code>src/cmd/internal/obj/arm</code>.
|
||||
In that directory is a file <code>a.out.go</code>; it contains
|
||||
a long list of constants starting with <code>A</code>, like this:
|
||||
To see what instructions are defined for a given machine, say 32-bit Intel x86,
|
||||
look in the top-level header file for the corresponding linker, in this case <code>8l</code>.
|
||||
That is, the file <code>$GOROOT/src/cmd/8l/8.out.h</code> contains a C enumeration, called <code>as</code>,
|
||||
of the instructions and their spellings as known to the assembler and linker for that architecture.
|
||||
In that file you'll find a declaration that begins
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
const (
|
||||
AAND = obj.ABaseARM + obj.A_ARCHSPECIFIC + iota
|
||||
AEOR
|
||||
ASUB
|
||||
ARSB
|
||||
AADD
|
||||
enum as
|
||||
{
|
||||
AXXX,
|
||||
AAAA,
|
||||
AAAD,
|
||||
AAAM,
|
||||
AAAS,
|
||||
AADCB,
|
||||
...
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This is the list of instructions and their spellings as known to the assembler and linker for that architecture.
|
||||
Each instruction begins with an initial capital <code>A</code> in this list, so <code>AAND</code>
|
||||
represents the bitwise and instruction,
|
||||
<code>AND</code> (without the leading <code>A</code>),
|
||||
and is written in assembly source as <code>AND</code>.
|
||||
The enumeration is mostly in alphabetical order.
|
||||
(The architecture-independent <code>AXXX</code>, defined in the
|
||||
<code>cmd/internal/obj</code> package,
|
||||
represents an invalid instruction).
|
||||
The sequence of the <code>A</code> names has nothing to do with the actual
|
||||
encoding of the machine instructions.
|
||||
The <code>cmd/internal/obj</code> package takes care of that detail.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The instructions for both the 386 and AMD64 architectures are listed in
|
||||
<code>cmd/internal/obj/x86/a.out.go</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The architectures share syntax for common addressing modes such as
|
||||
<code>(R1)</code> (register indirect),
|
||||
<code>4(R1)</code> (register indirect with offset), and
|
||||
<code>$foo(SB)</code> (absolute address).
|
||||
The assembler also supports some (not necessarily all) addressing modes
|
||||
specific to each architecture.
|
||||
The sections below list these.
|
||||
Each instruction begins with a initial capital <code>A</code> in this list, so <code>AADCB</code>
|
||||
represents the <code>ADCB</code> (add carry byte) instruction.
|
||||
The enumeration is in alphabetical order, plus some late additions (<code>AXXX</code> occupies
|
||||
the zero slot as an invalid instruction).
|
||||
The sequence has nothing to do with the actual encoding of the machine instructions.
|
||||
Again, the linker takes care of that detail.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
One detail evident in the examples from the previous sections is that data in the instructions flows from left to right:
|
||||
<code>MOVQ</code> <code>$0,</code> <code>CX</code> clears <code>CX</code>.
|
||||
This rule applies even on architectures where the conventional notation uses the opposite direction.
|
||||
This convention applies even on architectures where the usual mode is the opposite direction.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Here follow some descriptions of key Go-specific details for the supported architectures.
|
||||
Here follows some descriptions of key Go-specific details for the supported architectures.
|
||||
</p>
|
||||
|
||||
<h3 id="x86">32-bit Intel 386</h3>
|
||||
@@ -584,11 +441,11 @@ Here follow some descriptions of key Go-specific details for the supported archi
|
||||
The runtime pointer to the <code>g</code> structure is maintained
|
||||
through the value of an otherwise unused (as far as Go is concerned) register in the MMU.
|
||||
A OS-dependent macro <code>get_tls</code> is defined for the assembler if the source includes
|
||||
a special header, <code>go_asm.h</code>:
|
||||
an architecture-dependent header file, like this:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
#include "go_asm.h"
|
||||
#include "zasm_GOOS_GOARCH.h"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -601,48 +458,21 @@ The sequence to load <code>g</code> and <code>m</code> using <code>CX</code> loo
|
||||
<pre>
|
||||
get_tls(CX)
|
||||
MOVL g(CX), AX // Move g into AX.
|
||||
MOVL g_m(AX), BX // Move g.m into BX.
|
||||
MOVL g_m(AX), BX // Move g->m into BX.
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Addressing modes:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<code>(DI)(BX*2)</code>: The location at address <code>DI</code> plus <code>BX*2</code>.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>64(DI)(BX*2)</code>: The location at address <code>DI</code> plus <code>BX*2</code> plus 64.
|
||||
These modes accept only 1, 2, 4, and 8 as scale factors.
|
||||
</li>
|
||||
|
||||
</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>
|
||||
The two architectures behave largely the same at the assembler level.
|
||||
Assembly code to access the <code>m</code> and <code>g</code>
|
||||
pointers on the 64-bit version is the same as on the 32-bit 386,
|
||||
except it uses <code>MOVQ</code> rather than <code>MOVL</code>:
|
||||
The assembly code to access the <code>m</code> and <code>g</code>
|
||||
pointers is the same as on the 386, except it uses <code>MOVQ</code> rather than
|
||||
<code>MOVL</code>:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
get_tls(CX)
|
||||
MOVQ g(CX), AX // Move g into AX.
|
||||
MOVQ g_m(AX), BX // Move g.m into BX.
|
||||
MOVQ g_m(AX), BX // Move g->m into BX.
|
||||
</pre>
|
||||
|
||||
<h3 id="arm">ARM</h3>
|
||||
@@ -679,165 +509,6 @@ The name <code>SP</code> always refers to the virtual stack pointer described ea
|
||||
For the hardware register, use <code>R13</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Condition code syntax is to append a period and the one- or two-letter code to the instruction,
|
||||
as in <code>MOVW.EQ</code>.
|
||||
Multiple codes may be appended: <code>MOVM.IA.W</code>.
|
||||
The order of the code modifiers is irrelevant.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Addressing modes:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<code>R0->16</code>
|
||||
<br>
|
||||
<code>R0>>16</code>
|
||||
<br>
|
||||
<code>R0<<16</code>
|
||||
<br>
|
||||
<code>R0@>16</code>:
|
||||
For <code><<</code>, left shift <code>R0</code> by 16 bits.
|
||||
The other codes are <code>-></code> (arithmetic right shift),
|
||||
<code>>></code> (logical right shift), and
|
||||
<code>@></code> (rotate right).
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>R0->R1</code>
|
||||
<br>
|
||||
<code>R0>>R1</code>
|
||||
<br>
|
||||
<code>R0<<R1</code>
|
||||
<br>
|
||||
<code>R0@>R1</code>:
|
||||
For <code><<</code>, left shift <code>R0</code> by the count in <code>R1</code>.
|
||||
The other codes are <code>-></code> (arithmetic right shift),
|
||||
<code>>></code> (logical right shift), and
|
||||
<code>@></code> (rotate right).
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>[R0,g,R12-R15]</code>: For multi-register instructions, the set comprising
|
||||
<code>R0</code>, <code>g</code>, and <code>R12</code> through <code>R15</code> inclusive.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<code>(R5, R6)</code>: Destination register pair.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3 id="arm64">ARM64</h3>
|
||||
|
||||
<p>
|
||||
The ARM64 port is in an experimental state.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Instruction modifiers are appended to the instruction following a period.
|
||||
The only modifiers are <code>P</code> (postincrement) and <code>W</code>
|
||||
(preincrement):
|
||||
<code>MOVW.P</code>, <code>MOVW.W</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Addressing modes:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<code>(R5, R6)</code>: Register pair for <code>LDP</code>/<code>STP</code>.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3 id="ppc64">64-bit PowerPC, a.k.a. ppc64</h3>
|
||||
|
||||
<p>
|
||||
The 64-bit PowerPC port is in an experimental state.
|
||||
</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>
|
||||
|
||||
<li>
|
||||
<code>(R5+R6)</code>: Alias for (R5)(R6*1)
|
||||
</li>
|
||||
|
||||
</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="unsupported_opcodes">Unsupported opcodes</h3>
|
||||
|
||||
<p>
|
||||
@@ -856,17 +527,11 @@ Here's how the 386 runtime defines the 64-bit atomic load function.
|
||||
// uint64 atomicload64(uint64 volatile* addr);
|
||||
// so actually
|
||||
// void atomicload64(uint64 *res, uint64 volatile *addr);
|
||||
TEXT runtime·atomicload64(SB), NOSPLIT, $0-12
|
||||
TEXT runtime·atomicload64(SB), NOSPLIT, $0-8
|
||||
MOVL ptr+0(FP), AX
|
||||
TESTL $7, AX
|
||||
JZ 2(PC)
|
||||
MOVL 0, AX // crash with nil ptr deref
|
||||
LEAL ret_lo+4(FP), BX
|
||||
// MOVQ (%EAX), %MM0
|
||||
BYTE $0x0f; BYTE $0x6f; BYTE $0x00
|
||||
// MOVQ %MM0, 0(%EBX)
|
||||
BYTE $0x0f; BYTE $0x7f; BYTE $0x03
|
||||
// EMMS
|
||||
BYTE $0x0F; BYTE $0x77
|
||||
BYTE $0x0f; BYTE $0x6f; BYTE $0x00 // MOVQ (%EAX), %MM0
|
||||
BYTE $0x0f; BYTE $0x7f; BYTE $0x03 // MOVQ %MM0, 0(%EBX)
|
||||
BYTE $0x0F; BYTE $0x77 // EMMS
|
||||
RET
|
||||
</pre>
|
||||
|
||||
@@ -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> </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>
|
||||
|
||||
@@ -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>
|
||||
@@ -127,14 +108,13 @@ when developing Go code.
|
||||
<p>
|
||||
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
|
||||
<code>$HOME/go</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>
|
||||
$ <b>mkdir $HOME/go</b>
|
||||
$ <b>export GOPATH=$HOME/go</b>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -146,22 +126,11 @@ to your <code>PATH</code>:
|
||||
$ <b>export PATH=$PATH:$GOPATH/bin</b>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
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>
|
||||
|
||||
<h3 id="ImportPaths">Import paths</h3>
|
||||
<h3 id="PackagePaths">Package 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
|
||||
@@ -249,7 +218,7 @@ This command builds the <code>hello</code> command, producing an executable
|
||||
binary. It then installs that binary to the workspace's <code>bin</code>
|
||||
directory as <code>hello</code> (or, under Windows, <code>hello.exe</code>).
|
||||
In our example, that will be <code>$GOPATH/bin/hello</code>, which is
|
||||
<code>$HOME/work/bin/hello</code>.
|
||||
<code>$HOME/go/bin/hello</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -285,7 +254,7 @@ optional: you do not need to use source control to write Go code.
|
||||
<pre>
|
||||
$ <b>cd $GOPATH/src/github.com/user/hello</b>
|
||||
$ <b>git init</b>
|
||||
Initialized empty Git repository in /home/user/work/src/github.com/user/hello/.git/
|
||||
Initialized empty Git repository in /home/user/go/src/github.com/user/hello/.git/
|
||||
$ <b>git add hello.go</b>
|
||||
$ <b>git commit -m "initial commit"</b>
|
||||
[master (root-commit) 0b4507d] initial commit
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
-->
|
||||
|
||||
273
doc/conduct.html
273
doc/conduct.html
@@ -1,273 +0,0 @@
|
||||
<!--{
|
||||
"Title": "Go Community Code of Conduct",
|
||||
"Path": "/conduct",
|
||||
"Template": true
|
||||
}-->
|
||||
|
||||
<style>
|
||||
ul {
|
||||
max-width: 800px;
|
||||
}
|
||||
ul ul {
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h2 id="about">About the Code of Conduct</h2>
|
||||
|
||||
<h3 id="why">Why have a Code of Conduct?</h3>
|
||||
|
||||
<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, race,
|
||||
religion, sexuality, or similar personal characteristic.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The first goal of the Code of Conduct is to specify a baseline standard
|
||||
of behavior so that people with different social values and communication
|
||||
styles can talk about Go effectively, productively, and respectfully.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The second goal is to provide a mechanism for resolving conflicts in the
|
||||
community when they arise.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The third goal of the Code of Conduct is to make our community welcoming to
|
||||
people from different backgrounds.
|
||||
Diversity is critical to the project; for Go to be successful, it needs
|
||||
contributors and users from all backgrounds.
|
||||
(See <a href="https://blog.golang.org/open-source">Go, Open Source, Community</a>.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With that said, a healthy community must allow for disagreement and debate.
|
||||
The Code of Conduct is not a mechanism for people to silence others with whom
|
||||
they disagree.
|
||||
</p>
|
||||
|
||||
<h3 id="spaces">Where does the Code of Conduct apply?</h3>
|
||||
|
||||
<p>
|
||||
If you participate in or contribute to the Go ecosystem in any way,
|
||||
you are encouraged to follow the Code of Conduct while doing so.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Explicit enforcement of the Code of Conduct applies to the
|
||||
official forums operated by the Go project (“Go spaces”):
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>The official <a href="https://github.com/golang/">GitHub projects</a>
|
||||
and <a href="https://go-review.googlesource.com/">code reviews</a>.
|
||||
<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>
|
||||
Other Go groups (such as conferences, meetups, and other unofficial forums) are
|
||||
encouraged to adopt this Code of Conduct. Those groups must provide their own
|
||||
moderators and/or working group (see below).
|
||||
</p>
|
||||
|
||||
<h2 id="values">Gopher values</h2>
|
||||
|
||||
<p>
|
||||
These are the values to which people in the Go community (“Gophers”) should aspire.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Be friendly and welcoming
|
||||
<li>Be patient
|
||||
<ul>
|
||||
<li>Remember that people have varying communication styles and that not
|
||||
everyone is using their native language.
|
||||
(Meaning and tone can be lost in translation.)
|
||||
</ul>
|
||||
<li>Be thoughtful
|
||||
<ul>
|
||||
<li>Productive communication requires effort.
|
||||
Think about how your words will be interpreted.
|
||||
<li>Remember that sometimes it is best to refrain entirely from commenting.
|
||||
</ul>
|
||||
<li>Be respectful
|
||||
<ul>
|
||||
<li>In particular, respect differences of opinion.
|
||||
</ul>
|
||||
<li>Be charitable
|
||||
<ul>
|
||||
<li>Interpret the arguments of others in good faith, do not seek to disagree.
|
||||
<li>When we do disagree, try to understand why.
|
||||
</ul>
|
||||
<li>Avoid destructive behavior:
|
||||
<ul>
|
||||
<li>Derailing: stay on topic; if you want to talk about something else,
|
||||
start a new conversation.
|
||||
<li>Unconstructive criticism: don't merely decry the current state of affairs;
|
||||
offer—or at least solicit—suggestions as to how things may be improved.
|
||||
<li>Snarking (pithy, unproductive, sniping comments)
|
||||
<li>Discussing potentially offensive or sensitive issues;
|
||||
this all too often leads to unnecessary conflict.
|
||||
<li>Microaggressions: brief and commonplace verbal, behavioral and
|
||||
environmental indignities that communicate hostile, derogatory or negative
|
||||
slights and insults to a person or group.
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
People are complicated.
|
||||
You should expect to be misunderstood and to misunderstand others;
|
||||
when this inevitably occurs, resist the urge to be defensive or assign blame.
|
||||
Try not to take offense where no offense was intended.
|
||||
Give people the benefit of the doubt.
|
||||
Even if the intent was to provoke, do not rise to it.
|
||||
It is the responsibility of <i>all parties</i> to de-escalate conflict when it arises.
|
||||
</p>
|
||||
|
||||
<h2 id="unwelcome_behavior">Unwelcome behavior</h2>
|
||||
|
||||
<p>
|
||||
These actions are explicitly forbidden in Go spaces:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Insulting, demeaning, hateful, or threatening remarks.
|
||||
<li>Discrimination based on age, disability, gender, nationality, race,
|
||||
religion, sexuality, or similar personal characteristic.
|
||||
<li>Bullying or systematic harassment.
|
||||
<li>Unwelcome sexual advances.
|
||||
<li>Incitement to any of these.
|
||||
</ul>
|
||||
|
||||
<h2 id="moderation">Moderation</h2>
|
||||
|
||||
<p>
|
||||
The Go spaces are not free speech venues; they are for discussion about Go.
|
||||
These spaces have moderators.
|
||||
The goal of the moderators is to facilitate civil discussion about Go.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When using the official Go spaces you should act in the spirit of the “Gopher
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Moderators are held to a higher standard than other community members.
|
||||
If a moderator creates an inappropriate situation, they should expect less
|
||||
leeway than others, and should expect to be removed from their position if they
|
||||
cannot adhere to the CoC.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Complaints about moderator actions must be handled using the reporting process
|
||||
below.
|
||||
</p>
|
||||
|
||||
<h2 id="reporting">Reporting issues</h2>
|
||||
|
||||
<p>
|
||||
The Code of Conduct Working Group is a group of people that represent the Go
|
||||
community. They are responsible for handling conduct-related issues.
|
||||
Their purpose is to de-escalate conflicts and try to resolve issues to the
|
||||
satisfaction of all parties. They are:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Aditya Mukerjee <dev@chimeracoder.net>
|
||||
<li>Andrew Gerrand <adg@golang.org>
|
||||
<li>Dave Cheney <dave@cheney.net>
|
||||
<li>Jason Buberel <jbuberel@google.com>
|
||||
<li>Peggy Li <peggyli.224@gmail.com>
|
||||
<li>Sarah Adams <sadams.codes@gmail.com>
|
||||
<li>Steve Francia <steve.francia@gmail.com>
|
||||
<li>Verónica López <gveronicalg@gmail.com>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
If you encounter a conduct-related issue, you should report it to the
|
||||
Working Group using the process described below.
|
||||
<b>Do not</b> post about the issue publicly or try to rally sentiment against a
|
||||
particular individual or group.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Mail <a href="mailto:conduct@golang.org">conduct@golang.org</a> or
|
||||
<a href="https://golang.org/s/conduct-report">submit an anonymous report</a>.
|
||||
<ul>
|
||||
<li>Your message will reach the Working Group.
|
||||
<li>Reports are confidential within the Working Group.
|
||||
<li>Should you choose to remain anonymous then the Working Group cannot
|
||||
notify you of the outcome of your report.
|
||||
<li>You may contact a member of the group directly if you do not feel
|
||||
comfortable contacting the group as a whole. That member will then raise
|
||||
the issue with the Working Group as a whole, preserving the privacy of the
|
||||
reporter (if desired).
|
||||
<li>If your report concerns a member of the Working Group they will be recused
|
||||
from Working Group discussions of the report.
|
||||
<li>The Working Group will strive to handle reports with discretion and
|
||||
sensitivity, to protect the privacy of the involved parties,
|
||||
and to avoid conflicts of interest.
|
||||
</ul>
|
||||
<li>You should receive a response within 48 hours (likely sooner).
|
||||
(Should you choose to contact a single Working Group member,
|
||||
it may take longer to receive a response.)
|
||||
<li>The Working Group will meet to review the incident and determine what happened.
|
||||
<ul>
|
||||
<li>With the permission of person reporting the incident, the Working Group
|
||||
may reach out to other community members for more context.
|
||||
</ul>
|
||||
<li>The Working Group will reach a decision as to how to act. These may include:
|
||||
<ul>
|
||||
<li>Nothing.
|
||||
<li>A request for a private or public apology.
|
||||
<li>A private or public warning.
|
||||
<li>An imposed vacation (for instance, asking someone to abstain for a week
|
||||
from a mailing list or IRC).
|
||||
<li>A permanent or temporary ban from some or all Go spaces.
|
||||
</ul>
|
||||
<li>The Working Group will reach out to the original reporter to let them know
|
||||
the decision.
|
||||
<li>Appeals to the decision may be made to the Working Group,
|
||||
or to any of its members directly.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<b>Note that the goal of the Code of Conduct and the Working Group is to resolve
|
||||
conflicts in the most harmonious way possible.</b>
|
||||
We hope that in most cases issues may be resolved through polite discussion and
|
||||
mutual agreement.
|
||||
Bannings and other forceful measures are to be employed only as a last resort.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Changes to the Code of Conduct (including to the members of the Working Group)
|
||||
should be proposed using the
|
||||
<a href="https://golang.org/s/proposal-process">change proposal process</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="summary">Summary</h2>
|
||||
|
||||
<ul>
|
||||
<li>Treat everyone with respect and kindness.
|
||||
<li>Be thoughtful in how you communicate.
|
||||
<li>Don’t be destructive or inflammatory.
|
||||
<li>If you encounter an issue, please mail <a href="mailto:conduct@golang.org">conduct@golang.org</a>.
|
||||
</ul>
|
||||
|
||||
<h3 id="acknowledgements">Acknowledgements</h3>
|
||||
|
||||
<p>
|
||||
Parts of this document were derived from the Code of Conduct documents of the
|
||||
Django, FreeBSD, and Rust projects.
|
||||
</p>
|
||||
@@ -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.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>
|
||||
<li><a href="/doc/go1.2">Go 1.2</a> <small>(December 2013)</small></li>
|
||||
@@ -68,6 +66,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>
|
||||
@@ -90,18 +91,6 @@ a new one.)
|
||||
We pride ourselves on being meticulous; no issue is too small.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Security-related issues should be reported to
|
||||
<a href="mailto:security@golang.org">security@golang.org</a>.<br>
|
||||
See the <a href="/security">security policy</a> for more details.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Community-related issues should be reported to
|
||||
<a href="mailto:conduct@golang.org">conduct@golang.org</a>.<br>
|
||||
See the <a href="/conduct">Code of Conduct</a> for more details.
|
||||
</p>
|
||||
|
||||
<h3><a href="/doc/contribute.html">Contributing code</a></h3>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -16,40 +16,27 @@ 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>
|
||||
The project welcomes submissions but please let everyone know what
|
||||
you're working on if you want to change or add to the Go repositories.
|
||||
you're working on if you want it to become part of the main repository.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Before undertaking to write something new for the Go project,
|
||||
please <a href="https://golang.org/issue/new">file an issue</a>
|
||||
(or claim an <a href="https://golang.org/issues">existing issue</a>).
|
||||
Significant changes must go through the
|
||||
<a href="https://golang.org/s/proposal-process">change proposal process</a>
|
||||
before they can be accepted.
|
||||
Before undertaking to write something new for the Go project, send
|
||||
mail to the <a href="https://groups.google.com/group/golang-nuts">mailing
|
||||
list</a> to discuss what you plan to do. This gives everyone a
|
||||
chance to validate the design, helps prevent duplication of effort,
|
||||
and ensures that the idea fits inside the goals for the language
|
||||
and tools. It also guarantees that the design is sound before code
|
||||
is written; the code review tool is not the place for high-level
|
||||
discussions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This process gives everyone a chance to validate the design,
|
||||
helps prevent duplication of effort,
|
||||
and ensures that the idea fits inside the goals for the language and tools.
|
||||
It also checks that the design is sound before code is written;
|
||||
the code review tool is not the place for high-level discussions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When planning work, please note that the Go project follows a
|
||||
<a href="https://golang.org/wiki/Go-Release-Cycle">six-month
|
||||
development cycle</a>. The latter half of each cycle is a three-month
|
||||
feature freeze during which only bug fixes and doc updates are accepted.
|
||||
New work cannot be submitted during a feature freeze.
|
||||
In short, send mail before you code.
|
||||
And don't start the discussion by mailing a change list!
|
||||
</p>
|
||||
|
||||
<h2 id="Testing">Testing redux</h2>
|
||||
@@ -77,115 +64,73 @@ After running for a while, the command should print
|
||||
<h2 id="Code_review">Code review</h2>
|
||||
|
||||
<p>
|
||||
Changes to Go must be reviewed before they are accepted,
|
||||
Changes to Go must be reviewed before they are submitted,
|
||||
no matter who makes the change.
|
||||
(In exceptional cases, such as fixing a build, the review can
|
||||
follow shortly after submitting.)
|
||||
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
|
||||
a Google Account, you can create an account which
|
||||
<a href="https://www.google.com/accounts/NewAccount">includes
|
||||
a new Gmail email account</a> or create an account associated
|
||||
<a href="https://accounts.google.com/SignUpWithoutGmail">with your existing
|
||||
email address</a>.
|
||||
The Git code hosting server and Gerrit code review server both use a Google
|
||||
Account to authenticate. You therefore need a Google Account to proceed.
|
||||
(If you can use the account to
|
||||
<a href="https://www.google.com/accounts/Login">sign in at google.com</a>,
|
||||
you can use it to sign in to the code review server.)
|
||||
The email address you use with the code review system
|
||||
will be recorded in the <a href="https://go.googlesource.com/go">change log</a>
|
||||
and in the <a href="/CONTRIBUTORS"><code>CONTRIBUTORS</code></a> file.
|
||||
You can <a href="https://www.google.com/accounts/NewAccount">create a Google Account</a>
|
||||
associated with any address where you receive email.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The email address associated with the Google Account you use will be recorded in
|
||||
the <a href="https://go.googlesource.com/go/+log/">change log</a>
|
||||
and in the <a href="/CONTRIBUTORS">contributors file</a>.
|
||||
Visit the site <a href="https://go.googlesource.com">go.googlesource.com</a>
|
||||
and log in using your Google Account.
|
||||
Click on the "Generate Password" link that appears at the top of the page.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To set up your account in Gerrit, visit
|
||||
<a href="https://go.googlesource.com">go.googlesource.com</a>
|
||||
and click on "Generate Password" in the page's top right menu bar.
|
||||
Click the radio button that says "Only <code>go.googlesource.com</code>"
|
||||
to use this authentication token only for the Go project.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You will be redirected to accounts.google.com to sign in.
|
||||
Further down the page is a box containing commands to install
|
||||
the authentication cookie in file called <code>.gitcookies</code> in your home
|
||||
directory.
|
||||
Copy the text for the commands into a Unix shell window to execute it.
|
||||
That will install the authentication token.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once signed in, you are returned back to go.googlesource.com to "Configure Git".
|
||||
Follow the instructions on the page.
|
||||
(If you are on a Windows computer, you should instead follow the instructions
|
||||
in the yellow box to run the command.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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,
|
||||
you need to register your account with Gerrit.
|
||||
To do this, visit
|
||||
<a href="https://go-review.googlesource.com/login/">
|
||||
go-review.googlesource.com/login/</a>. You will immediately be redirected
|
||||
to Google Accounts. Sign in using the same Google Account you used above.
|
||||
Now that you have a Google account and the authentication token,
|
||||
you need to register your account with Gerrit, the code review system.
|
||||
To do this, visit <a href="https://golang.org/cl">golang.org/cl</a>
|
||||
and log in using the same Google Account you used above.
|
||||
That is all that is required.
|
||||
</p>
|
||||
|
||||
<h3 id="cla">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,
|
||||
you must have completed one of the contributor license agreements:
|
||||
<ul>
|
||||
<li>
|
||||
If you are the copyright holder, you will need to agree to the
|
||||
<a href="https://developers.google.com/open-source/cla/individual">individual
|
||||
contributor license agreement</a>, which can be completed online.
|
||||
</li>
|
||||
<li>
|
||||
If your organization is the copyright holder, the organization
|
||||
will need to agree to the
|
||||
<a href="https://developers.google.com/open-source/cla/corporate">corporate
|
||||
contributor license agreement</a>.
|
||||
(If the copyright holder for your code has already completed the
|
||||
agreement in connection with another Google open source project,
|
||||
it does not need to be completed again.)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
You can use the links above to create and sign the contributor license agreement
|
||||
or you can show your current agreements and create new ones through the Gerrit
|
||||
interface. <a href="https://go-review.googlesource.com/login/">Log into Gerrit</a>,
|
||||
click your name in the upper-right, choose "Settings", then select "Agreements"
|
||||
from the topics on the left. If you do not have a signed agreement listed here,
|
||||
you can create one by clicking "New Contributor Agreement" and following the steps.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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,
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ go get -u golang.org/x/review/git-codereview
|
||||
go get -u golang.org/x/review/git-codereview
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -202,13 +147,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 +157,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 +199,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 +212,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 +232,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 +288,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 +299,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 +361,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:
|
||||
@@ -454,8 +386,7 @@ Unless explicitly told otherwise, such as in the discussion leading
|
||||
up to sending in the change list, it's better not to specify a reviewer.
|
||||
All changes are automatically CC'ed to the
|
||||
<a href="https://groups.google.com/group/golang-codereviews">golang-codereviews@googlegroups.com</a>
|
||||
mailing list. If this is your first ever change, there may be a moderation
|
||||
delay before it appears on the mailing list, to prevent spam.
|
||||
mailing list.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -479,7 +410,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 +422,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 +449,7 @@ You can see a list of your pending changes by running <code>git</code>
|
||||
<code>change</code> <code><i><branch></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.
|
||||
@@ -551,7 +482,7 @@ $ git sync
|
||||
Failed to merge in the changes.
|
||||
Patch failed at 0023 math: improved Sin, Cos and Tan precision for very large arguments
|
||||
The copy of the patch that failed is found in:
|
||||
/home/you/repo/.git/rebase-apply/patch
|
||||
/home/you/repo/.git/rebase-apply/patch
|
||||
|
||||
When you have resolved this problem, run "git rebase --continue".
|
||||
If you prefer to skip this patch, run "git rebase --skip" instead.
|
||||
@@ -574,15 +505,15 @@ The output will look something like this:
|
||||
<pre>
|
||||
rebase in progress; onto a24c3eb
|
||||
You are currently rebasing branch 'mcgillicutty' on 'a24c3eb'.
|
||||
(fix conflicts and then run "git rebase --continue")
|
||||
(use "git rebase --skip" to skip this patch)
|
||||
(use "git rebase --abort" to check out the original branch)
|
||||
(fix conflicts and then run "git rebase --continue")
|
||||
(use "git rebase --skip" to skip this patch)
|
||||
(use "git rebase --abort" to check out the original branch)
|
||||
|
||||
Unmerged paths:
|
||||
(use "git reset HEAD <file>..." to unstage)
|
||||
(use "git add <file>..." to mark resolution)
|
||||
(use "git reset HEAD <file>..." to unstage)
|
||||
(use "git add <file>..." to mark resolution)
|
||||
|
||||
<i>both modified: sin.go</i>
|
||||
<i>both modified: sin.go</i>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -599,9 +530,9 @@ might turn up:
|
||||
<pre>
|
||||
arg = scale(arg)
|
||||
<<<<<<< HEAD
|
||||
if arg < 1e9 {
|
||||
if arg > 1e9 {
|
||||
=======
|
||||
if arg < 1e10 {
|
||||
if arg > 1e10 {
|
||||
>>>>>>> mcgillicutty
|
||||
largeReduce(arg)
|
||||
</pre>
|
||||
@@ -615,7 +546,7 @@ to remove the markers and leave the correct code:
|
||||
|
||||
<pre>
|
||||
arg = scale(arg)
|
||||
if arg < 1e10 {
|
||||
if arg > 1e10 {
|
||||
largeReduce(arg)
|
||||
</pre>
|
||||
|
||||
@@ -636,7 +567,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.
|
||||
@@ -646,14 +577,14 @@ It should look something like this:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ git fetch https://go.googlesource.com/review refs/changes/21/1221/1 && git checkout FETCH_HEAD
|
||||
$ git fetch https://go.googlesource.com/review refs/changes/21/1221/1 && git checkout FETCH_HEAD
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
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 +603,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.
|
||||
@@ -693,12 +624,35 @@ and perhaps the <a href="/AUTHORS"><code>AUTHORS</code></a> file.
|
||||
defines who the Go contributors—the people—are;
|
||||
the <a href="/AUTHORS"><code>AUTHORS</code></a> file defines
|
||||
who “The Go Authors”—the copyright holders—are.
|
||||
These files will be periodically updated based on the commit logs.
|
||||
The Go developers at Google will update these files when submitting
|
||||
your first change.
|
||||
In order for them to do that, you need to have completed one of the
|
||||
contributor license agreements:
|
||||
<ul>
|
||||
<li>
|
||||
If you are the copyright holder, you will need to agree to the
|
||||
<a href="https://developers.google.com/open-source/cla/individual">individual
|
||||
contributor license agreement</a>, which can be completed online.
|
||||
</li>
|
||||
<li>
|
||||
If your organization is the copyright holder, the organization
|
||||
will need to agree to the
|
||||
<a href="https://developers.google.com/open-source/cla/corporate">corporate
|
||||
contributor license agreement</a>.
|
||||
(If the copyright holder for your code has already completed the
|
||||
agreement in connection with another Google open source project,
|
||||
it does not need to be completed again.)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
This rigmarole needs to be done only for your first submission.
|
||||
</p>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -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<T,U></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>
|
||||
|
||||
|
||||
@@ -1,455 +0,0 @@
|
||||
<!--{
|
||||
"Title": "Pre-Go 1 Release History"
|
||||
}-->
|
||||
|
||||
<p>
|
||||
This page summarizes the changes between stable releases of Go prior to Go 1.
|
||||
See the <a href="release.html">Release History</a> page for notes on recent releases.
|
||||
</p>
|
||||
|
||||
<h2 id="r60">r60 (released 2011/09/07)</h2>
|
||||
|
||||
<p>
|
||||
The r60 release corresponds to
|
||||
<code><a href="weekly.html#2011-08-17">weekly.2011-08-17</a></code>.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-08-17">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r60">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
An "else" block is now required to have braces except if the body of the "else"
|
||||
is another "if". Since gofmt always puts those braces in anyway,
|
||||
gofmt-formatted programs will not be affected.
|
||||
To fix other programs, run gofmt.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a>'s URL parsing and query escaping code
|
||||
(such as <code>ParseURL</code> and <code>URLEscape</code>) has been moved to
|
||||
the new <a href="/pkg/url/">url package</a>, with several simplifications to
|
||||
the names. Client code can be updated automatically with gofix.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/image/">Package image</a> has had significant changes made to the
|
||||
<code>Pix</code> field of struct types such as
|
||||
<a href="/pkg/image/#RGBA">image.RGBA</a> and
|
||||
<a href="/pkg/image/#NRGBA">image.NRGBA</a>.
|
||||
The <a href="/pkg/image/#Image">image.Image</a> interface type has not changed,
|
||||
though, and you should not need to change your code if you don't explicitly
|
||||
refer to <code>Pix</code> fields. For example, if you decode a number of images
|
||||
using the <a href="/pkg/image/jpeg/">image/jpeg</a> package, compose them using
|
||||
<a href="/pkg/image/draw/">image/draw</a>, and then encode the result using
|
||||
<a href="/pkg/img/png">image/png</a>, then your code should still work as
|
||||
before.
|
||||
If your code <i>does</i> refer to <code>Pix</code> fields see the
|
||||
<a href="/doc/devel/weekly.html#2011-07-19">weekly.2011-07-19</a>
|
||||
snapshot notes for how to update your code.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/template/">Package template</a> has been replaced with a new
|
||||
templating package (formerly <code>exp/template</code>). The original template
|
||||
package is still available as <a href="/pkg/old/template/">old/template</a>.
|
||||
The <code>old/template</code> package is deprecated and will be removed.
|
||||
The Go tree has been updated to use the new template package. We encourage
|
||||
users of the old template package to switch to the new one. Code that uses
|
||||
<code>template</code> or <code>exp/template</code> will need to change its
|
||||
import lines to <code>"old/template"</code> or <code>"template"</code>,
|
||||
respectively.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now uses a new tag selection scheme.
|
||||
When downloading or updating, goinstall looks for a tag or branch with the
|
||||
<code>"go."</code> prefix that corresponds to the local Go version. For Go
|
||||
<code>release.r58</code> it looks for <code>go.r58</code>. For
|
||||
<code>weekly.2011-06-03</code> it looks for <code>go.weekly.2011-06-03</code>.
|
||||
If the specific <code>go.X</code> tag or branch is not found, it chooses the
|
||||
closest earlier version. If an appropriate tag or branch is found, goinstall
|
||||
uses that version of the code. Otherwise it uses the default version selected
|
||||
by the version control system. Library authors are encouraged to use the
|
||||
appropriate tag or branch names in their repositories to make their libraries
|
||||
more accessible.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.minor">Minor revisions</h3>
|
||||
|
||||
<p>
|
||||
r60.1 includes a
|
||||
<a href="//golang.org/change/1824581bf62d">linker
|
||||
fix</a>, a pair of
|
||||
<a href="//golang.org/change/9ef4429c2c64">goplay</a>
|
||||
<a href="//golang.org/change/d42ed8c3098e">fixes</a>,
|
||||
and a <code>json</code> package
|
||||
<a href="//golang.org/change/d5e97874fe84">fix</a> and
|
||||
a new
|
||||
<a href="//golang.org/change/4f0e6269213f">struct tag
|
||||
option</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
r60.2
|
||||
<a href="//golang.org/change/ff19536042ac">fixes</a>
|
||||
a memory leak involving maps.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
r60.3 fixes a
|
||||
<a href="//golang.org/change/01fa62f5e4e5">reflect bug</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="r59">r59 (released 2011/08/01)</h2>
|
||||
|
||||
<p>
|
||||
The r59 release corresponds to
|
||||
<code><a href="weekly.html#2011-07-07">weekly.2011-07-07</a></code>.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-07-07">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r59">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
This release includes a language change that restricts the use of
|
||||
<code>goto</code>. In essence, a <code>goto</code> statement outside a block
|
||||
cannot jump to a label inside that block. Your code may require changes if it
|
||||
uses <code>goto</code>.
|
||||
See <a href="//golang.org/change/dc6d3cf9279d">this
|
||||
changeset</a> for how the new rule affected the Go tree.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http">Package http</a> has a new
|
||||
<a href="/pkg/http/#FileSystem">FileSystem</a> interface that provides access
|
||||
to files. The <a href="/pkg/http/#FileServer">FileServer</a> helper now takes a
|
||||
<code>FileSystem</code> argument instead of an explicit file system root. By
|
||||
implementing your own <code>FileSystem</code> you can use the
|
||||
<code>FileServer</code> to serve arbitrary data.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/">Package os</a>'s <code>ErrorString</code> type has been
|
||||
hidden. Most uses of <code>os.ErrorString</code> can be replaced with
|
||||
<a href="/pkg/os/#NewError">os.NewError</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/reflect/">Package reflect</a> supports a new struct tag scheme
|
||||
that enables sharing of struct tags between multiple packages.
|
||||
In this scheme, the tags must be of the form:
|
||||
</p>
|
||||
<pre>
|
||||
`key:"value" key2:"value2"`
|
||||
</pre>
|
||||
<p>
|
||||
The <a href="/pkg/reflect/#StructField">StructField</a> type's Tag field now
|
||||
has type <a href="/pkg/reflect/#StructTag">StructTag</a>, which has a
|
||||
<code>Get</code> method. Clients of <a href="/pkg/json">json</a> and
|
||||
<a href="/pkg/xml">xml</a> will need to be updated. Code that says
|
||||
</p>
|
||||
<pre>
|
||||
type T struct {
|
||||
X int "name"
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
should become
|
||||
</p>
|
||||
<pre>
|
||||
type T struct {
|
||||
X int `json:"name"` // or `xml:"name"`
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
Use <a href="/cmd/govet/">govet</a> to identify struct tags that need to be
|
||||
changed to use the new syntax.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/sort/">Package sort</a>'s <code>IntArray</code> type has been
|
||||
renamed to <a href="/pkg/sort/#IntSlice">IntSlice</a>, and similarly for
|
||||
<a href="/pkg/sort/#Float64Slice">Float64Slice</a> and
|
||||
<a href="/pkg/sort/#StringSlice">StringSlice</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/strings/">Package strings</a>'s <code>Split</code> function has
|
||||
itself been split into <a href="/pkg/strings/#Split">Split</a> and
|
||||
<a href="/pkg/strings/#SplitN">SplitN</a>.
|
||||
<code>SplitN</code> is the same as the old <code>Split</code>.
|
||||
The new <code>Split</code> is equivalent to <code>SplitN</code> with a final
|
||||
argument of -1.
|
||||
</p>
|
||||
|
||||
<a href="/pkg/image/draw/">Package image/draw</a>'s
|
||||
<a href="/pkg/image/draw/#Draw">Draw</a> function now takes an additional
|
||||
argument, a compositing operator.
|
||||
If in doubt, use <a href="/pkg/image/draw/#Op">draw.Over</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now installs packages and commands from
|
||||
arbitrary remote repositories (not just Google Code, Github, and so on).
|
||||
See the <a href="/cmd/goinstall/">goinstall documentation</a> for details.
|
||||
</p>
|
||||
|
||||
<h2 id="r58">r58 (released 2011/06/29)</h2>
|
||||
|
||||
<p>
|
||||
The r58 release corresponds to
|
||||
<code><a href="weekly.html#2011-06-09">weekly.2011-06-09</a></code>
|
||||
with additional bug fixes.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-06-09">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r58">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
This release fixes a <a href="//golang.org/change/b720749486e1">use of uninitialized memory in programs that misuse <code>goto</code></a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a> drops the <code>finalURL</code> return
|
||||
value from the <a href="/pkg/http/#Client.Get">Client.Get</a> method. The value
|
||||
is now available via the new <code>Request</code> field on <a
|
||||
href="/pkg/http/#Response">http.Response</a>.
|
||||
Most instances of the type map[string][]string in have been
|
||||
replaced with the new <a href="/pkg/http/#Values">Values</a> type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/exec/">Package exec</a> has been redesigned with a more
|
||||
convenient and succinct API.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/strconv/">Package strconv</a>'s <a href="/pkg/strconv/#Quote">Quote</a>
|
||||
function now escapes only those Unicode code points not classified as printable
|
||||
by <a href="/pkg/unicode/#IsPrint">unicode.IsPrint</a>.
|
||||
Previously Quote would escape all non-ASCII characters.
|
||||
This also affects the <a href="/pkg/fmt/">fmt</a> package's <code>"%q"</code>
|
||||
formatting directive. The previous quoting behavior is still available via
|
||||
strconv's new <a href="/pkg/strconv/#QuoteToASCII">QuoteToASCII</a> function.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/signal/">Package os/signal</a>'s
|
||||
<a href="/pkg/os/#Signal">Signal</a> and
|
||||
<a href="/pkg/os/#UnixSignal">UnixSignal</a> types have been moved to the
|
||||
<a href="/pkg/os/">os</a> package.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/image/draw/">Package image/draw</a> is the new name for
|
||||
<code>exp/draw</code>. The GUI-related code from <code>exp/draw</code> is now
|
||||
located in the <a href="/pkg/exp/gui/">exp/gui</a> package.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now observes the GOPATH environment
|
||||
variable to build and install your own code and external libraries outside of
|
||||
the Go tree (and avoid writing Makefiles).
|
||||
</p>
|
||||
|
||||
|
||||
<h3 id="r58.minor">Minor revisions</h3>
|
||||
|
||||
<p>r58.1 adds
|
||||
<a href="//golang.org/change/293c25943586">build</a> and
|
||||
<a href="//golang.org/change/bf17e96b6582">runtime</a>
|
||||
changes to make Go run on OS X 10.7 Lion.
|
||||
</p>
|
||||
|
||||
<h2 id="r57">r57 (released 2011/05/03)</h2>
|
||||
|
||||
<p>
|
||||
The r57 release corresponds to
|
||||
<code><a href="weekly.html#2011-04-27">weekly.2011-04-27</a></code>
|
||||
with additional bug fixes.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-04-27">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r57">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<p>The new <a href="/cmd/gofix">gofix</a> tool finds Go programs that use old APIs and rewrites them to use
|
||||
newer ones. After you update to a new Go release, gofix helps make the
|
||||
necessary changes to your programs. Gofix will handle the http, os, and syscall
|
||||
package changes described below, and we will update the program to keep up with
|
||||
future changes to the libraries.
|
||||
Gofix can’t
|
||||
handle all situations perfectly, so read and test the changes it makes before
|
||||
committing them.
|
||||
See <a href="//blog.golang.org/2011/04/introducing-gofix.html">the gofix blog post</a> for more
|
||||
information.</p>
|
||||
|
||||
<h3 id="r57.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
<a href="/doc/go_spec.html#Receive_operator">Multiple assignment syntax</a> replaces the <code>closed</code> function.
|
||||
The syntax for channel
|
||||
receives allows an optional second assigned value, a boolean value
|
||||
indicating whether the channel is closed. This code:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
v := <-ch
|
||||
if closed(ch) {
|
||||
// channel is closed
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>should now be written as:</p>
|
||||
|
||||
<pre>
|
||||
v, ok := <-ch
|
||||
if !ok {
|
||||
// channel is closed
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p><a href="/doc/go_spec.html#Label_scopes">Unused labels are now illegal</a>, just as unused local variables are.</p>
|
||||
|
||||
<h3 id="r57.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/gob/">Package gob</a> will now encode and decode values of types that implement the
|
||||
<a href="/pkg/gob/#GobEncoder">GobEncoder</a> and
|
||||
<a href="/pkg/gob/#GobDecoder">GobDecoder</a> interfaces. This allows types with unexported
|
||||
fields to transmit self-consistent descriptions; examples include
|
||||
<a href="/pkg/big/#Int.GobDecode">big.Int</a> and <a href="/pkg/big/#Rat.GobDecode">big.Rat</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a> has been redesigned.
|
||||
For clients, there are new
|
||||
<a href="/pkg/http/#Client">Client</a> and <a href="/pkg/http/#Transport">Transport</a>
|
||||
abstractions that give more control over HTTP details such as headers sent
|
||||
and redirections followed. These abstractions make it easy to implement
|
||||
custom clients that add functionality such as <a href="//code.google.com/p/goauth2/source/browse/oauth/oauth.go">OAuth2</a>.
|
||||
For servers, <a href="/pkg/http/#ResponseWriter">ResponseWriter</a>
|
||||
has dropped its non-essential methods.
|
||||
The Hijack and Flush methods are no longer required;
|
||||
code can test for them by checking whether a specific value implements
|
||||
<a href="/pkg/http/#Hijacker">Hijacker</a> or <a href="/pkg/http/#Flusher">Flusher</a>.
|
||||
The RemoteAddr and UsingTLS methods are replaced by <a href="/pkg/http/#Request">Request</a>'s
|
||||
RemoteAddr and TLS fields.
|
||||
The SetHeader method is replaced by a Header method;
|
||||
its result, of type <a href="/pkg/http/#Header">Header</a>,
|
||||
implements Set and other methods.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/net/">Package net</a>
|
||||
drops the <code>laddr</code> argument from <a href="/pkg/net/#Conn.Dial">Dial</a>
|
||||
and drops the <code>cname</code> return value
|
||||
from <a href="/pkg/net/#LookupHost">LookupHost</a>.
|
||||
The implementation now uses <a href="/cmd/cgo/">cgo</a> to implement
|
||||
network name lookups using the C library getaddrinfo(3)
|
||||
function when possible. This ensures that Go and C programs
|
||||
resolve names the same way and also avoids the OS X
|
||||
application-level firewall.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/">Package os</a>
|
||||
introduces simplified <a href="/pkg/os/#File.Open">Open</a>
|
||||
and <a href="/pkg/os/#File.Create">Create</a> functions.
|
||||
The original Open is now available as <a href="/pkg/os/#File.OpenFile">OpenFile</a>.
|
||||
The final three arguments to <a href="/pkg/os/#Process.StartProcess">StartProcess</a>
|
||||
have been replaced by a pointer to a <a href="/pkg/os/#ProcAttr">ProcAttr</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/reflect/">Package reflect</a> has been redesigned.
|
||||
<a href="/pkg/reflect/#Type">Type</a> is now an interface that implements
|
||||
all the possible type methods.
|
||||
Instead of a type switch on a Type <code>t</code>, switch on <code>t.Kind()</code>.
|
||||
<a href="/pkg/reflect/#Value">Value</a> is now a struct value that
|
||||
implements all the possible value methods.
|
||||
Instead of a type switch on a Value <code>v</code>, switch on <code>v.Kind()</code>.
|
||||
Typeof and NewValue are now called <a href="/pkg/reflect/#Type.TypeOf">TypeOf</a> and <a href="/pkg/reflect/#Value.ValueOf">ValueOf</a>
|
||||
To create a writable Value, use <code>New(t).Elem()</code> instead of <code>Zero(t)</code>.
|
||||
See <a href="//golang.org/change/843855f3c026">the change description</a>
|
||||
for the full details.
|
||||
The new API allows a more efficient implementation of Value
|
||||
that avoids many of the allocations required by the previous API.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Remember that gofix will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<h3 id="r57.cmd">Tools</h3>
|
||||
|
||||
<p><a href="/cmd/gofix/">Gofix</a>, a new command, is described above.</p>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/gotest/">Gotest</a> is now a Go program instead of a shell script.
|
||||
The new <code>-test.short</code> flag in combination with package testing's Short function
|
||||
allows you to write tests that can be run in normal or “short” mode;
|
||||
all.bash runs tests in short mode to reduce installation time.
|
||||
The Makefiles know about the flag: use <code>make testshort</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The run-time support now implements CPU and memory profiling.
|
||||
Gotest's new
|
||||
<a href="/cmd/gotest/"><code>-test.cpuprofile</code> and
|
||||
<code>-test.memprofile</code> flags</a> make it easy to
|
||||
profile tests.
|
||||
To add profiling to your web server, see the <a href="/pkg/http/pprof/">http/pprof</a>
|
||||
documentation.
|
||||
For other uses, see the <a href="/pkg/runtime/pprof/">runtime/pprof</a> documentation.
|
||||
</p>
|
||||
|
||||
<h3 id="r57.minor">Minor revisions</h3>
|
||||
|
||||
<p>r57.1 fixes a <a href="//golang.org/change/ff2bc62726e7145eb2ecc1e0f076998e4a8f86f0">nil pointer dereference in http.FormFile</a>.</p>
|
||||
<p>r57.2 fixes a <a href="//golang.org/change/063b0ff67d8277df03c956208abc068076818dae">use of uninitialized memory in programs that misuse <code>goto</code></a>.</p>
|
||||
|
||||
<h2 id="r56">r56 (released 2011/03/16)</h2>
|
||||
|
||||
<p>
|
||||
The r56 release was the first stable release and corresponds to
|
||||
<code><a href="weekly.html#2011-03-07">weekly.2011-03-07.1</a></code>.
|
||||
The numbering starts at 56 because before this release,
|
||||
what we now consider weekly snapshots were called releases.
|
||||
</p>
|
||||
@@ -8,97 +8,10 @@ The <a href="//golang.org/change">change log</a> has the full details.</p>
|
||||
<p>To update to a specific release, use:</p>
|
||||
|
||||
<pre>
|
||||
git pull
|
||||
git checkout <i>release-branch</i>
|
||||
hg pull
|
||||
hg update <i>tag</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.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. This release also adds support for macOS Sierra.
|
||||
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>
|
||||
|
||||
<h2 id="go1.5">go1.5 (released 2015/08/19)</h2>
|
||||
|
||||
<p>
|
||||
Go 1.5 is a major release of Go.
|
||||
Read the <a href="/doc/go1.5">Go 1.5 Release Notes</a> for more information.
|
||||
</p>
|
||||
|
||||
<h3 id="go1.5.minor">Minor revisions</h3>
|
||||
|
||||
<p>
|
||||
go1.5.1 (released 2015/09/08) includes bug fixes to the compiler, assembler, and
|
||||
the <code>fmt</code>, <code>net/textproto</code>, <code>net/http</code>, and
|
||||
<code>runtime</code> packages.
|
||||
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.5.1">Go
|
||||
1.5.1 milestone</a> on our issue tracker for details.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
go1.5.2 (released 2015/12/02) includes bug fixes to the compiler, linker, and
|
||||
the <code>mime/multipart</code>, <code>net</code>, and <code>runtime</code>
|
||||
packages.
|
||||
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.5.2">Go
|
||||
1.5.2 milestone</a> on our issue tracker for details.
|
||||
</p>
|
||||
|
||||
<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.
|
||||
</p>
|
||||
|
||||
<h2 id="go1.4">go1.4 (released 2014/12/10)</h2>
|
||||
|
||||
<p>
|
||||
@@ -134,17 +47,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>
|
||||
@@ -158,12 +71,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>
|
||||
|
||||
@@ -178,17 +91,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>
|
||||
|
||||
@@ -215,7 +128,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.
|
||||
@@ -234,13 +147,452 @@ 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>
|
||||
<h2 id="r60">r60 (released 2011/09/07)</h2>
|
||||
|
||||
<p>
|
||||
See the <a href="pre_go1.html">Pre-Go 1 Release History</a> page for notes
|
||||
on earlier releases.
|
||||
The r60 release corresponds to
|
||||
<code><a href="weekly.html#2011-08-17">weekly.2011-08-17</a></code>.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-08-17">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r60">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
An "else" block is now required to have braces except if the body of the "else"
|
||||
is another "if". Since gofmt always puts those braces in anyway,
|
||||
gofmt-formatted programs will not be affected.
|
||||
To fix other programs, run gofmt.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a>'s URL parsing and query escaping code
|
||||
(such as <code>ParseURL</code> and <code>URLEscape</code>) has been moved to
|
||||
the new <a href="/pkg/url/">url package</a>, with several simplifications to
|
||||
the names. Client code can be updated automatically with gofix.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/image/">Package image</a> has had significant changes made to the
|
||||
<code>Pix</code> field of struct types such as
|
||||
<a href="/pkg/image/#RGBA">image.RGBA</a> and
|
||||
<a href="/pkg/image/#NRGBA">image.NRGBA</a>.
|
||||
The <a href="/pkg/image/#Image">image.Image</a> interface type has not changed,
|
||||
though, and you should not need to change your code if you don't explicitly
|
||||
refer to <code>Pix</code> fields. For example, if you decode a number of images
|
||||
using the <a href="/pkg/image/jpeg/">image/jpeg</a> package, compose them using
|
||||
<a href="/pkg/image/draw/">image/draw</a>, and then encode the result using
|
||||
<a href="/pkg/img/png">image/png</a>, then your code should still work as
|
||||
before.
|
||||
If your code <i>does</i> refer to <code>Pix</code> fields see the
|
||||
<a href="/doc/devel/weekly.html#2011-07-19">weekly.2011-07-19</a>
|
||||
snapshot notes for how to update your code.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/template/">Package template</a> has been replaced with a new
|
||||
templating package (formerly <code>exp/template</code>). The original template
|
||||
package is still available as <a href="/pkg/old/template/">old/template</a>.
|
||||
The <code>old/template</code> package is deprecated and will be removed.
|
||||
The Go tree has been updated to use the new template package. We encourage
|
||||
users of the old template package to switch to the new one. Code that uses
|
||||
<code>template</code> or <code>exp/template</code> will need to change its
|
||||
import lines to <code>"old/template"</code> or <code>"template"</code>,
|
||||
respectively.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now uses a new tag selection scheme.
|
||||
When downloading or updating, goinstall looks for a tag or branch with the
|
||||
<code>"go."</code> prefix that corresponds to the local Go version. For Go
|
||||
<code>release.r58</code> it looks for <code>go.r58</code>. For
|
||||
<code>weekly.2011-06-03</code> it looks for <code>go.weekly.2011-06-03</code>.
|
||||
If the specific <code>go.X</code> tag or branch is not found, it chooses the
|
||||
closest earlier version. If an appropriate tag or branch is found, goinstall
|
||||
uses that version of the code. Otherwise it uses the default version selected
|
||||
by the version control system. Library authors are encouraged to use the
|
||||
appropriate tag or branch names in their repositories to make their libraries
|
||||
more accessible.
|
||||
</p>
|
||||
|
||||
<h3 id="r60.minor">Minor revisions</h3>
|
||||
|
||||
<p>
|
||||
r60.1 includes a
|
||||
<a href="//golang.org/change/1824581bf62d">linker
|
||||
fix</a>, a pair of
|
||||
<a href="//golang.org/change/9ef4429c2c64">goplay</a>
|
||||
<a href="//golang.org/change/d42ed8c3098e">fixes</a>,
|
||||
and a <code>json</code> package
|
||||
<a href="//golang.org/change/d5e97874fe84">fix</a> and
|
||||
a new
|
||||
<a href="//golang.org/change/4f0e6269213f">struct tag
|
||||
option</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
r60.2
|
||||
<a href="//golang.org/change/ff19536042ac">fixes</a>
|
||||
a memory leak involving maps.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
r60.3 fixes a
|
||||
<a href="//golang.org/change/01fa62f5e4e5">reflect bug</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="r59">r59 (released 2011/08/01)</h2>
|
||||
|
||||
<p>
|
||||
The r59 release corresponds to
|
||||
<code><a href="weekly.html#2011-07-07">weekly.2011-07-07</a></code>.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-07-07">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r59">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
This release includes a language change that restricts the use of
|
||||
<code>goto</code>. In essence, a <code>goto</code> statement outside a block
|
||||
cannot jump to a label inside that block. Your code may require changes if it
|
||||
uses <code>goto</code>.
|
||||
See <a href="//golang.org/change/dc6d3cf9279d">this
|
||||
changeset</a> for how the new rule affected the Go tree.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http">Package http</a> has a new
|
||||
<a href="/pkg/http/#FileSystem">FileSystem</a> interface that provides access
|
||||
to files. The <a href="/pkg/http/#FileServer">FileServer</a> helper now takes a
|
||||
<code>FileSystem</code> argument instead of an explicit file system root. By
|
||||
implementing your own <code>FileSystem</code> you can use the
|
||||
<code>FileServer</code> to serve arbitrary data.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/">Package os</a>'s <code>ErrorString</code> type has been
|
||||
hidden. Most uses of <code>os.ErrorString</code> can be replaced with
|
||||
<a href="/pkg/os/#NewError">os.NewError</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/reflect/">Package reflect</a> supports a new struct tag scheme
|
||||
that enables sharing of struct tags between multiple packages.
|
||||
In this scheme, the tags must be of the form:
|
||||
</p>
|
||||
<pre>
|
||||
`key:"value" key2:"value2"`
|
||||
</pre>
|
||||
<p>
|
||||
The <a href="/pkg/reflect/#StructField">StructField</a> type's Tag field now
|
||||
has type <a href="/pkg/reflect/#StructTag">StructTag</a>, which has a
|
||||
<code>Get</code> method. Clients of <a href="/pkg/json">json</a> and
|
||||
<a href="/pkg/xml">xml</a> will need to be updated. Code that says
|
||||
</p>
|
||||
<pre>
|
||||
type T struct {
|
||||
X int "name"
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
should become
|
||||
</p>
|
||||
<pre>
|
||||
type T struct {
|
||||
X int `json:"name"` // or `xml:"name"`
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
Use <a href="/cmd/govet/">govet</a> to identify struct tags that need to be
|
||||
changed to use the new syntax.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/sort/">Package sort</a>'s <code>IntArray</code> type has been
|
||||
renamed to <a href="/pkg/sort/#IntSlice">IntSlice</a>, and similarly for
|
||||
<a href="/pkg/sort/#Float64Slice">Float64Slice</a> and
|
||||
<a href="/pkg/sort/#StringSlice">StringSlice</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/strings/">Package strings</a>'s <code>Split</code> function has
|
||||
itself been split into <a href="/pkg/strings/#Split">Split</a> and
|
||||
<a href="/pkg/strings/#SplitN">SplitN</a>.
|
||||
<code>SplitN</code> is the same as the old <code>Split</code>.
|
||||
The new <code>Split</code> is equivalent to <code>SplitN</code> with a final
|
||||
argument of -1.
|
||||
</p>
|
||||
|
||||
<a href="/pkg/image/draw/">Package image/draw</a>'s
|
||||
<a href="/pkg/image/draw/#Draw">Draw</a> function now takes an additional
|
||||
argument, a compositing operator.
|
||||
If in doubt, use <a href="/pkg/image/draw/#Op">draw.Over</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r59.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now installs packages and commands from
|
||||
arbitrary remote repositories (not just Google Code, Github, and so on).
|
||||
See the <a href="/cmd/goinstall/">goinstall documentation</a> for details.
|
||||
</p>
|
||||
|
||||
<h2 id="r58">r58 (released 2011/06/29)</h2>
|
||||
|
||||
<p>
|
||||
The r58 release corresponds to
|
||||
<code><a href="weekly.html#2011-06-09">weekly.2011-06-09</a></code>
|
||||
with additional bug fixes.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-06-09">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r58">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
This release fixes a <a href="//golang.org/change/b720749486e1">use of uninitialized memory in programs that misuse <code>goto</code></a>.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
As usual, <a href="/cmd/gofix/">gofix</a> will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a> drops the <code>finalURL</code> return
|
||||
value from the <a href="/pkg/http/#Client.Get">Client.Get</a> method. The value
|
||||
is now available via the new <code>Request</code> field on <a
|
||||
href="/pkg/http/#Response">http.Response</a>.
|
||||
Most instances of the type map[string][]string in have been
|
||||
replaced with the new <a href="/pkg/http/#Values">Values</a> type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/exec/">Package exec</a> has been redesigned with a more
|
||||
convenient and succinct API.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/strconv/">Package strconv</a>'s <a href="/pkg/strconv/#Quote">Quote</a>
|
||||
function now escapes only those Unicode code points not classified as printable
|
||||
by <a href="/pkg/unicode/#IsPrint">unicode.IsPrint</a>.
|
||||
Previously Quote would escape all non-ASCII characters.
|
||||
This also affects the <a href="/pkg/fmt/">fmt</a> package's <code>"%q"</code>
|
||||
formatting directive. The previous quoting behavior is still available via
|
||||
strconv's new <a href="/pkg/strconv/#QuoteToASCII">QuoteToASCII</a> function.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/signal/">Package os/signal</a>'s
|
||||
<a href="/pkg/os/#Signal">Signal</a> and
|
||||
<a href="/pkg/os/#UnixSignal">UnixSignal</a> types have been moved to the
|
||||
<a href="/pkg/os/">os</a> package.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/image/draw/">Package image/draw</a> is the new name for
|
||||
<code>exp/draw</code>. The GUI-related code from <code>exp/draw</code> is now
|
||||
located in the <a href="/pkg/exp/gui/">exp/gui</a> package.
|
||||
</p>
|
||||
|
||||
<h3 id="r58.cmd">Tools</h3>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/goinstall/">Goinstall</a> now observes the GOPATH environment
|
||||
variable to build and install your own code and external libraries outside of
|
||||
the Go tree (and avoid writing Makefiles).
|
||||
</p>
|
||||
|
||||
|
||||
<h3 id="r58.minor">Minor revisions</h3>
|
||||
|
||||
<p>r58.1 adds
|
||||
<a href="//golang.org/change/293c25943586">build</a> and
|
||||
<a href="//golang.org/change/bf17e96b6582">runtime</a>
|
||||
changes to make Go run on OS X 10.7 Lion.
|
||||
</p>
|
||||
|
||||
<h2 id="r57">r57 (released 2011/05/03)</h2>
|
||||
|
||||
<p>
|
||||
The r57 release corresponds to
|
||||
<code><a href="weekly.html#2011-04-27">weekly.2011-04-27</a></code>
|
||||
with additional bug fixes.
|
||||
This section highlights the most significant changes in this release.
|
||||
For a more detailed summary, see the
|
||||
<a href="weekly.html#2011-04-27">weekly release notes</a>.
|
||||
For complete information, see the
|
||||
<a href="//code.google.com/p/go/source/list?r=release-branch.r57">Mercurial change list</a>.
|
||||
</p>
|
||||
|
||||
<p>The new <a href="/cmd/gofix">gofix</a> tool finds Go programs that use old APIs and rewrites them to use
|
||||
newer ones. After you update to a new Go release, gofix helps make the
|
||||
necessary changes to your programs. Gofix will handle the http, os, and syscall
|
||||
package changes described below, and we will update the program to keep up with
|
||||
future changes to the libraries.
|
||||
Gofix can’t
|
||||
handle all situations perfectly, so read and test the changes it makes before
|
||||
committing them.
|
||||
See <a href="//blog.golang.org/2011/04/introducing-gofix.html">the gofix blog post</a> for more
|
||||
information.</p>
|
||||
|
||||
<h3 id="r57.lang">Language</h3>
|
||||
|
||||
<p>
|
||||
<a href="/doc/go_spec.html#Receive_operator">Multiple assignment syntax</a> replaces the <code>closed</code> function.
|
||||
The syntax for channel
|
||||
receives allows an optional second assigned value, a boolean value
|
||||
indicating whether the channel is closed. This code:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
v := <-ch
|
||||
if closed(ch) {
|
||||
// channel is closed
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>should now be written as:</p>
|
||||
|
||||
<pre>
|
||||
v, ok := <-ch
|
||||
if !ok {
|
||||
// channel is closed
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p><a href="/doc/go_spec.html#Label_scopes">Unused labels are now illegal</a>, just as unused local variables are.</p>
|
||||
|
||||
<h3 id="r57.pkg">Packages</h3>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/gob/">Package gob</a> will now encode and decode values of types that implement the
|
||||
<a href="/pkg/gob/#GobEncoder">GobEncoder</a> and
|
||||
<a href="/pkg/gob/#GobDecoder">GobDecoder</a> interfaces. This allows types with unexported
|
||||
fields to transmit self-consistent descriptions; examples include
|
||||
<a href="/pkg/big/#Int.GobDecode">big.Int</a> and <a href="/pkg/big/#Rat.GobDecode">big.Rat</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/http/">Package http</a> has been redesigned.
|
||||
For clients, there are new
|
||||
<a href="/pkg/http/#Client">Client</a> and <a href="/pkg/http/#Transport">Transport</a>
|
||||
abstractions that give more control over HTTP details such as headers sent
|
||||
and redirections followed. These abstractions make it easy to implement
|
||||
custom clients that add functionality such as <a href="//code.google.com/p/goauth2/source/browse/oauth/oauth.go">OAuth2</a>.
|
||||
For servers, <a href="/pkg/http/#ResponseWriter">ResponseWriter</a>
|
||||
has dropped its non-essential methods.
|
||||
The Hijack and Flush methods are no longer required;
|
||||
code can test for them by checking whether a specific value implements
|
||||
<a href="/pkg/http/#Hijacker">Hijacker</a> or <a href="/pkg/http/#Flusher">Flusher</a>.
|
||||
The RemoteAddr and UsingTLS methods are replaced by <a href="/pkg/http/#Request">Request</a>'s
|
||||
RemoteAddr and TLS fields.
|
||||
The SetHeader method is replaced by a Header method;
|
||||
its result, of type <a href="/pkg/http/#Header">Header</a>,
|
||||
implements Set and other methods.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/net/">Package net</a>
|
||||
drops the <code>laddr</code> argument from <a href="/pkg/net/#Conn.Dial">Dial</a>
|
||||
and drops the <code>cname</code> return value
|
||||
from <a href="/pkg/net/#LookupHost">LookupHost</a>.
|
||||
The implementation now uses <a href="/cmd/cgo/">cgo</a> to implement
|
||||
network name lookups using the C library getaddrinfo(3)
|
||||
function when possible. This ensures that Go and C programs
|
||||
resolve names the same way and also avoids the OS X
|
||||
application-level firewall.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/os/">Package os</a>
|
||||
introduces simplified <a href="/pkg/os/#File.Open">Open</a>
|
||||
and <a href="/pkg/os/#File.Create">Create</a> functions.
|
||||
The original Open is now available as <a href="/pkg/os/#File.OpenFile">OpenFile</a>.
|
||||
The final three arguments to <a href="/pkg/os/#Process.StartProcess">StartProcess</a>
|
||||
have been replaced by a pointer to a <a href="/pkg/os/#ProcAttr">ProcAttr</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/pkg/reflect/">Package reflect</a> has been redesigned.
|
||||
<a href="/pkg/reflect/#Type">Type</a> is now an interface that implements
|
||||
all the possible type methods.
|
||||
Instead of a type switch on a Type <code>t</code>, switch on <code>t.Kind()</code>.
|
||||
<a href="/pkg/reflect/#Value">Value</a> is now a struct value that
|
||||
implements all the possible value methods.
|
||||
Instead of a type switch on a Value <code>v</code>, switch on <code>v.Kind()</code>.
|
||||
Typeof and NewValue are now called <a href="/pkg/reflect/#Type.TypeOf">TypeOf</a> and <a href="/pkg/reflect/#Value.ValueOf">ValueOf</a>
|
||||
To create a writable Value, use <code>New(t).Elem()</code> instead of <code>Zero(t)</code>.
|
||||
See <a href="//golang.org/change/843855f3c026">the change description</a>
|
||||
for the full details.
|
||||
The new API allows a more efficient implementation of Value
|
||||
that avoids many of the allocations required by the previous API.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Remember that gofix will handle the bulk of the rewrites
|
||||
necessary for these changes to package APIs.
|
||||
</p>
|
||||
|
||||
<h3 id="r57.cmd">Tools</h3>
|
||||
|
||||
<p><a href="/cmd/gofix/">Gofix</a>, a new command, is described above.</p>
|
||||
|
||||
<p>
|
||||
<a href="/cmd/gotest/">Gotest</a> is now a Go program instead of a shell script.
|
||||
The new <code>-test.short</code> flag in combination with package testing's Short function
|
||||
allows you to write tests that can be run in normal or “short” mode;
|
||||
all.bash runs tests in short mode to reduce installation time.
|
||||
The Makefiles know about the flag: use <code>make testshort</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The run-time support now implements CPU and memory profiling.
|
||||
Gotest's new
|
||||
<a href="/cmd/gotest/"><code>-test.cpuprofile</code> and
|
||||
<code>-test.memprofile</code> flags</a> make it easy to
|
||||
profile tests.
|
||||
To add profiling to your web server, see the <a href="/pkg/http/pprof/">http/pprof</a>
|
||||
documentation.
|
||||
For other uses, see the <a href="/pkg/runtime/pprof/">runtime/pprof</a> documentation.
|
||||
</p>
|
||||
|
||||
<h3 id="r57.minor">Minor revisions</h3>
|
||||
|
||||
<p>r57.1 fixes a <a href="//golang.org/change/ff2bc62726e7145eb2ecc1e0f076998e4a8f86f0">nil pointer dereference in http.FormFile</a>.</p>
|
||||
<p>r57.2 fixes a <a href="//golang.org/change/063b0ff67d8277df03c956208abc068076818dae">use of uninitialized memory in programs that misuse <code>goto</code></a>.</p>
|
||||
|
||||
<h2 id="r56">r56 (released 2011/03/16)</h2>
|
||||
|
||||
<p>
|
||||
The r56 release was the first stable release and corresponds to
|
||||
<code><a href="weekly.html#2011-03-07">weekly.2011-03-07.1</a></code>.
|
||||
The numbering starts at 56 because before this release,
|
||||
what we now consider weekly snapshots were called releases.
|
||||
</p>
|
||||
|
||||
@@ -5971,7 +5971,7 @@ You can now check build status on various platforms at the Go Dashboard:
|
||||
* runtime: add SetFinalizer
|
||||
* time: Sleep through interruptions (thanks Chris Wedgwood)
|
||||
add RFC822 formats
|
||||
experimental implementation of Ticker using two goroutines for all tickers
|
||||
experimental implemenation of Ticker using two goroutines for all tickers
|
||||
* xml: allow underscores in XML element names (thanks Michael Hoisie)
|
||||
allow any scalar type in xml.Unmarshal
|
||||
</pre>
|
||||
|
||||
@@ -239,9 +239,9 @@ 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>
|
||||
@@ -866,7 +866,7 @@ var t interface{}
|
||||
t = functionOfSomeType()
|
||||
switch t := t.(type) {
|
||||
default:
|
||||
fmt.Printf("unexpected type %T\n", t) // %T prints whatever type t has
|
||||
fmt.Printf("unexpected type %T", t) // %T prints whatever type t has
|
||||
case bool:
|
||||
fmt.Printf("boolean %t\n", t) // t has type bool
|
||||
case int:
|
||||
@@ -1382,7 +1382,7 @@ limit of how much data to read. Here is the signature of the
|
||||
<code>os</code>:
|
||||
</p>
|
||||
<pre>
|
||||
func (f *File) Read(buf []byte) (n int, err error)
|
||||
func (file *File) Read(buf []byte) (n int, err error)
|
||||
</pre>
|
||||
<p>
|
||||
The method returns the number of bytes read and an error value, if
|
||||
@@ -1421,7 +1421,7 @@ resulting slice is returned. The function uses the fact that
|
||||
<code>nil</code> slice, and return 0.
|
||||
</p>
|
||||
<pre>
|
||||
func Append(slice, data []byte) []byte {
|
||||
func Append(slice, data[]byte) []byte {
|
||||
l := len(slice)
|
||||
if l + len(data) > cap(slice) { // reallocate
|
||||
// Allocate double what's needed, for future growth.
|
||||
@@ -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>
|
||||
@@ -3053,7 +3054,7 @@ req := req
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
but it's legal and idiomatic in Go to do this.
|
||||
but it's a legal and idiomatic in Go to do this.
|
||||
You get a fresh version of the variable with the same name, deliberately
|
||||
shadowing the loop variable locally but unique to each goroutine.
|
||||
</p>
|
||||
@@ -3171,44 +3172,40 @@ count the completion signals by draining the channel after
|
||||
launching all the goroutines.
|
||||
</p>
|
||||
<pre>
|
||||
const numCPU = 4 // number of CPU cores
|
||||
const NCPU = 4 // number of CPU cores
|
||||
|
||||
func (v Vector) DoAll(u Vector) {
|
||||
c := make(chan int, numCPU) // Buffering optional but sensible.
|
||||
for i := 0; i < numCPU; i++ {
|
||||
go v.DoSome(i*len(v)/numCPU, (i+1)*len(v)/numCPU, u, c)
|
||||
c := make(chan int, NCPU) // Buffering optional but sensible.
|
||||
for i := 0; i < NCPU; i++ {
|
||||
go v.DoSome(i*len(v)/NCPU, (i+1)*len(v)/NCPU, u, c)
|
||||
}
|
||||
// Drain the channel.
|
||||
for i := 0; i < numCPU; i++ {
|
||||
for i := 0; i < NCPU; i++ {
|
||||
<-c // wait for one task to complete
|
||||
}
|
||||
// All done.
|
||||
}
|
||||
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Rather than create a constant value for numCPU, we can ask the runtime what
|
||||
value is appropriate.
|
||||
The function <code><a href="/pkg/runtime#NumCPU">runtime.NumCPU</a></code>
|
||||
returns the number of hardware CPU cores in the machine, so we could write
|
||||
The current implementation of the Go runtime
|
||||
will not parallelize this code by default.
|
||||
It dedicates only a single core to user-level processing. An
|
||||
arbitrary number of goroutines can be blocked in system calls, but
|
||||
by default only one can be executing user-level code at any time.
|
||||
It should be smarter and one day it will be smarter, but until it
|
||||
is if you want CPU parallelism you must tell the run-time
|
||||
how many goroutines you want executing code simultaneously. There
|
||||
are two related ways to do this. Either run your job with environment
|
||||
variable <code>GOMAXPROCS</code> set to the number of cores to use
|
||||
or import the <code>runtime</code> package and call
|
||||
<code>runtime.GOMAXPROCS(NCPU)</code>.
|
||||
A helpful value might be <code>runtime.NumCPU()</code>, which reports the number
|
||||
of logical CPUs on the local machine.
|
||||
Again, this requirement is expected to be retired as the scheduling and run-time improve.
|
||||
</p>
|
||||
<pre>
|
||||
var numCPU = runtime.NumCPU()
|
||||
</pre>
|
||||
<p>
|
||||
There is also a function
|
||||
<code><a href="/pkg/runtime#GOMAXPROCS">runtime.GOMAXPROCS</a></code>,
|
||||
which reports (or sets)
|
||||
the user-specified number of cores that a Go program can have running
|
||||
simultaneously.
|
||||
It defaults to the value of <code>runtime.NumCPU</code> but can be
|
||||
overridden by setting the similarly named shell environment variable
|
||||
or by calling the function with a positive number. Calling it with
|
||||
zero just queries the value.
|
||||
Therefore if we want to honor the user's resource request, we should write
|
||||
</p>
|
||||
<pre>
|
||||
var numCPU = runtime.GOMAXPROCS(0)
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Be sure not to confuse the ideas of concurrency—structuring a program
|
||||
as independently executing components—and parallelism—executing
|
||||
@@ -3664,3 +3661,4 @@ var _ image.Color = Black
|
||||
var _ image.Image = Black
|
||||
</pre>
|
||||
-->
|
||||
|
||||
|
||||
@@ -30,9 +30,7 @@ contribution rules</a>.
|
||||
|
||||
<p>
|
||||
The master sources for the gccgo frontend may be found at
|
||||
<a href="http://go.googlesource.com/gofrontend">http://go.googlesource.com/gofrontend</a>.
|
||||
They are mirrored
|
||||
at <a href="http://github.com/golang/gofrontend">http://github.com/golang/gofrontend</a>.
|
||||
<a href="//code.google.com/p/gofrontend">http://code.google.com/p/gofrontend</a>.
|
||||
The master sources are not buildable by themselves, but only in
|
||||
conjunction with GCC (in the future, other compilers may be
|
||||
supported). Changes made to the gccgo frontend are also applied to
|
||||
@@ -42,7 +40,7 @@ is mirrored to the <code>gcc/go/gofrontend</code> directory in the GCC
|
||||
repository, and the <code>gofrontend</code> <code>libgo</code>
|
||||
directory is mirrored to the GCC <code>libgo</code> directory. In
|
||||
addition, the <code>test</code> directory
|
||||
from <a href="//go.googlesource.com/go">the main Go repository</a>
|
||||
from <a href="//code.google.com/p/go">the main Go repository</a>
|
||||
is mirrored to the <code>gcc/testsuite/go.test/test</code> directory
|
||||
in the GCC repository.
|
||||
</p>
|
||||
@@ -55,17 +53,19 @@ them.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The gccgo frontend is written in C++.
|
||||
It follows the GNU and GCC coding standards for C++.
|
||||
In writing code for the frontend, follow the formatting of the
|
||||
surrounding code.
|
||||
Almost all GCC-specific code is not in the frontend proper and is
|
||||
instead in the GCC sources in the <code>gcc/go</code> directory.
|
||||
The gccgo frontend is written in C++. It follows the GNU coding
|
||||
standards to the extent that they apply to C++. In writing code for
|
||||
the frontend, follow the formatting of the surrounding code. Although
|
||||
the frontend is currently tied to the rest of the GCC codebase, we
|
||||
plan to make it more independent. Eventually all GCC-specific code
|
||||
will migrate out of the frontend proper and into GCC proper. In the
|
||||
GCC sources this will generally mean moving code
|
||||
from <code>gcc/go/gofrontend</code> to <code>gcc/go</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The run-time library for gccgo is mostly the same as the library
|
||||
in <a href="//go.googlesource.com/go">the main Go repository</a>.
|
||||
in <a href="//code.google.com/p/go">the main Go repository</a>.
|
||||
The library code in the Go repository is periodically merged into
|
||||
the <code>libgo/go</code> directory of the <code>gofrontend</code> and
|
||||
then the GCC repositories, using the shell
|
||||
@@ -105,7 +105,7 @@ or <code>gcc/testsuite/go.dg</code> directories in the GCC repository.
|
||||
<p>
|
||||
Changes to the Go frontend should follow the same process as for the
|
||||
main Go repository, only for the <code>gofrontend</code> project and
|
||||
the <code>gofrontend-dev@googlegroups.com</code> mailing list
|
||||
the<code>gofrontend-dev@googlegroups.com</code> mailing list
|
||||
rather than the <code>go</code> project and the
|
||||
<code>golang-dev@googlegroups.com</code> mailing list. Those changes
|
||||
will then be merged into the GCC sources.
|
||||
|
||||
@@ -46,12 +46,6 @@ identical to Go 1.1. The GCC 4.8.2 release includes a complete Go
|
||||
The GCC 4.9 releases include a complete Go 1.2 implementation.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The GCC 5 releases include a complete implementation of the Go 1.4
|
||||
user libraries. The Go 1.4 runtime is not fully merged, but that
|
||||
should not be visible to Go programs.
|
||||
</p>
|
||||
|
||||
<h2 id="Source_code">Source code</h2>
|
||||
|
||||
<p>
|
||||
@@ -180,10 +174,13 @@ export LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH
|
||||
<h2 id="Using_gccgo">Using gccgo</h2>
|
||||
|
||||
<p>
|
||||
The gccgo compiler works like other gcc frontends. As of GCC 5 the gccgo
|
||||
installation also includes a version of the <code>go</code> command,
|
||||
which may be used to build Go programs as described at
|
||||
<a href="https://golang.org/cmd/go">https://golang.org/cmd/go</a>.
|
||||
The gccgo compiler works like other gcc frontends. The gccgo
|
||||
installation does not currently include a version of
|
||||
the <code>go</code> command. However if you have the <code>go</code>
|
||||
command from an installation of the <code>gc</code> compiler, you can
|
||||
use it with gccgo by passing the option <code>-compiler gccgo</code>
|
||||
to <code>go build</code> or <code>go install</code> or <code>go
|
||||
test</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -235,14 +232,13 @@ name the directory where <code>libgo.so</code> is found.
|
||||
|
||||
<li>
|
||||
<p>
|
||||
Passing a <code>-Wl,-R</code> option when you link (replace lib with
|
||||
lib64 if appropriate for your system):
|
||||
Passing a <code>-Wl,-R</code> option when you link:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
go build -gccgoflags -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
|
||||
[or]
|
||||
gccgo -o file file.o -Wl,-R,${prefix}/lib/gcc/MACHINE/VERSION
|
||||
[or]
|
||||
gccgo -o file file.o -Wl,-R,${prefix}/lib64/gcc/MACHINE/VERSION
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
@@ -270,33 +266,27 @@ and <code>-g</code> options.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>-fgo-pkgpath=PKGPATH</code> option may be used to set a
|
||||
unique prefix for the package being compiled.
|
||||
This option is automatically used by the go command, but you may want
|
||||
to use it if you invoke gccgo directly.
|
||||
This option is intended for use with large
|
||||
programs that contain many packages, in order to allow multiple
|
||||
packages to use the same identifier as the package name.
|
||||
The <code>PKGPATH</code> may be any string; a good choice for the
|
||||
string is the path used to import the package.
|
||||
The <code>-fgo-prefix=PREFIX</code> option may be used to set a unique
|
||||
prefix for the package being compiled. This option is intended for
|
||||
use with large programs that contain many packages, in order to allow
|
||||
multiple packages to use the same identifier as the package name.
|
||||
The <code>PREFIX</code> may be any string; a good choice for the
|
||||
string is the directory where the package will be installed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>-I</code> and <code>-L</code> options, which are synonyms
|
||||
for the compiler, may be used to set the search path for finding
|
||||
imports.
|
||||
These options are not needed if you build with the go command.
|
||||
</p>
|
||||
|
||||
<h2 id="Imports">Imports</h2>
|
||||
|
||||
<p>
|
||||
When you compile a file that exports something, the export
|
||||
information will be stored directly in the object file.
|
||||
If you build with gccgo directly, rather than with the go command,
|
||||
then when you import a package, you must tell gccgo how to find the
|
||||
file.
|
||||
</p>
|
||||
information will be stored directly in the object file. When
|
||||
you import a package, you must tell gccgo how to
|
||||
find the file.
|
||||
|
||||
<p>
|
||||
When you import the package <var>FILE</var> with gccgo,
|
||||
@@ -329,10 +319,9 @@ gccgo. Both options take directories to search. The
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The gccgo compiler does not currently (2015-06-15) record
|
||||
The gccgo compiler does not currently (2013-06-20) record
|
||||
the file name of imported packages in the object file. You must
|
||||
arrange for the imported data to be linked into the program.
|
||||
Again, this is not necessary when building with the go command.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
|
||||
@@ -160,7 +160,7 @@ The GCC release schedule does not coincide with the Go release schedule, so some
|
||||
The 4.8.0 version of GCC shipped in March, 2013 and includes a nearly-Go 1.1 version of <code>gccgo</code>.
|
||||
Its library is a little behind the release, but the biggest difference is that method values are not implemented.
|
||||
Sometime around July 2013, we expect 4.8.2 of GCC to ship with a <code>gccgo</code>
|
||||
providing a complete Go 1.1 implementation.
|
||||
providing a complete Go 1.1 implementaiton.
|
||||
</p>
|
||||
|
||||
<h3 id="gc_flag">Command-line flag parsing</h3>
|
||||
|
||||
@@ -677,7 +677,7 @@ now supports ALPN as defined in <a href="http://tools.ietf.org/html/rfc7301">RFC
|
||||
The <a href="/pkg/crypto/tls/"><code>crypto/tls</code></a> package
|
||||
now supports programmatic selection of server certificates
|
||||
through the new <a href="/pkg/crypto/tls/#Config.CertificateForName"><code>CertificateForName</code></a> function
|
||||
of the <a href="/pkg/crypto/tls/#Config"><code>Config</code></a> struct.
|
||||
of the <a href="/pkg/crypo/tls/#Config"><code>Config</code></a> struct.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
1310
doc/go1.5.html
1310
doc/go1.5.html
File diff suppressed because it is too large
Load Diff
923
doc/go1.6.html
923
doc/go1.6.html
@@ -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 != "" && !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 -}}
|
||||
<
|
||||
{{"{{"}}- 45}}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
formats as <code>23<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><![CDATA[ ... ]]></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 “..” (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>
|
||||
|
||||
1292
doc/go1.7.html
1292
doc/go1.7.html
File diff suppressed because it is too large
Load Diff
@@ -95,18 +95,6 @@ We therefore recommend that composite literals whose type is defined
|
||||
in a separate package should use the keyed notation.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Methods. As with struct fields, it may be necessary to add methods
|
||||
to types.
|
||||
Under some circumstances, such as when the type is embedded in
|
||||
a struct along with another type,
|
||||
the addition of the new method may break
|
||||
the struct by creating a conflict with an existing method of the other
|
||||
embedded type.
|
||||
We cannot protect against this rare case and do not guarantee compatibility
|
||||
should it arise.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Dot imports. If a program imports a standard package
|
||||
using <code>import . "path"</code>, additional names defined in the
|
||||
|
||||
265
doc/go_faq.html
265
doc/go_faq.html
@@ -92,16 +92,22 @@ portability and the addition of new functionality such as improved support for i
|
||||
There may well be a Go 2 one day, but not for a few years and it will be influenced by what we learn using Go 1 as it is today.
|
||||
</p>
|
||||
|
||||
<h3 id="What_is_the_origin_of_the_name">
|
||||
What is the origin of the name?</h3>
|
||||
|
||||
<p>
|
||||
“Ogle” would be a good name for a Go debugger.
|
||||
</p>
|
||||
|
||||
<h3 id="Whats_the_origin_of_the_mascot">
|
||||
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>
|
||||
The gopher is derived from one she used for an <a href="http://wfmu.org/">WFMU</a>
|
||||
T-shirt design some years ago.
|
||||
The logo and mascot are covered by the
|
||||
<a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a>
|
||||
@@ -147,7 +153,7 @@ Go is an attempt to combine the ease of programming of an interpreted,
|
||||
dynamically typed
|
||||
language with the efficiency and safety of a statically typed, compiled language.
|
||||
It also aims to be modern, with support for networked and multicore
|
||||
computing. Finally, working with Go is intended to be <i>fast</i>: it should take
|
||||
computing. Finally, it is intended to be <i>fast</i>: it should take
|
||||
at most a few seconds to build a large executable on a single computer.
|
||||
To meet these goals required addressing a number of
|
||||
linguistic issues: an expressive but lightweight type system;
|
||||
@@ -222,7 +228,7 @@ document server running in a production configuration on
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Other examples include the <a href="//github.com/youtube/vitess/">Vitess</a>
|
||||
Other examples include the <a href="//code.google.com/p/vitess/">Vitess</a>
|
||||
system for large-scale SQL installations and Google's download server, <code>dl.google.com</code>,
|
||||
which delivers Chrome binaries and other large installables such as <code>apt-get</code>
|
||||
packages.
|
||||
@@ -233,7 +239,7 @@ Do Go programs link with C/C++ programs?</h3>
|
||||
|
||||
<p>
|
||||
There are two Go compiler implementations, <code>gc</code>
|
||||
and <code>gccgo</code>.
|
||||
(the <code>6g</code> program and friends) and <code>gccgo</code>.
|
||||
<code>Gc</code> uses a different calling convention and linker and can
|
||||
therefore only be linked with C programs using the same convention.
|
||||
There is such a C compiler but no C++ compiler.
|
||||
@@ -254,7 +260,7 @@ Does Go support Google's protocol buffers?</h3>
|
||||
<p>
|
||||
A separate open source project provides the necessary compiler plugin and library.
|
||||
It is available at
|
||||
<a href="//github.com/golang/protobuf">github.com/golang/protobuf/</a>
|
||||
<a href="//code.google.com/p/goprotobuf/">code.google.com/p/goprotobuf/</a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -335,10 +341,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">
|
||||
@@ -505,7 +508,7 @@ They are not restricted to structs (classes).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Also, the lack of a type hierarchy makes “objects” in Go feel much more
|
||||
Also, the lack of type hierarchy makes “objects” in Go feel much more
|
||||
lightweight than in languages such as C++ or Java.
|
||||
</p>
|
||||
|
||||
@@ -605,19 +608,17 @@ How can I guarantee my type satisfies an interface?</h3>
|
||||
|
||||
<p>
|
||||
You can ask the compiler to check that the type <code>T</code> implements the
|
||||
interface <code>I</code> by attempting an assignment using the zero value for
|
||||
<code>T</code> or pointer to <code>T</code>, as appropriate:
|
||||
interface <code>I</code> by attempting an assignment:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
type T struct{}
|
||||
var _ I = T{} // Verify that T implements I.
|
||||
var _ I = (*T)(nil) // Verify that *T implements I.
|
||||
var _ I = T{} // Verify that T implements I.
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If <code>T</code> (or <code>*T</code>, accordingly) doesn't implement
|
||||
<code>I</code>, the mistake will be caught at compile time.
|
||||
If <code>T</code> doesn't implement <code>I</code>, the mistake will be caught
|
||||
at compile time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -725,7 +726,7 @@ interface satisfaction very easy to state: are the function's names
|
||||
and signatures exactly those of the interface?
|
||||
Go's rule is also easy to implement efficiently.
|
||||
We feel these benefits offset the lack of
|
||||
automatic type promotion. Should Go one day adopt some form of polymorphic
|
||||
automatic type promotion. Should Go one day adopt some form of generic
|
||||
typing, we expect there would be a way to express the idea of these
|
||||
examples and also have them be statically checked.
|
||||
</p>
|
||||
@@ -764,7 +765,7 @@ schematically, (<code>int</code>, <code>3</code>).
|
||||
An interface value is <code>nil</code> only if the inner value and type are both unset,
|
||||
(<code>nil</code>, <code>nil</code>).
|
||||
In particular, a <code>nil</code> interface will always hold a <code>nil</code> type.
|
||||
If we store a <code>nil</code> pointer of type <code>*int</code> inside
|
||||
If we store a pointer of type <code>*int</code> inside
|
||||
an interface value, the inner type will be <code>*int</code> regardless of the value of the pointer:
|
||||
(<code>*int</code>, <code>nil</code>).
|
||||
Such an interface value will therefore be non-<code>nil</code>
|
||||
@@ -772,7 +773,7 @@ Such an interface value will therefore be non-<code>nil</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This situation can be confusing, and arises when a <code>nil</code> value is
|
||||
This situation can be confusing, and often arises when a <code>nil</code> value is
|
||||
stored inside an interface value such as an <code>error</code> return:
|
||||
</p>
|
||||
|
||||
@@ -863,36 +864,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
|
||||
|
||||
<pre>
|
||||
type Copyable interface {
|
||||
Copy() interface{}
|
||||
}
|
||||
</pre>
|
||||
|
||||
would be satisfied by the method
|
||||
|
||||
<pre>
|
||||
func (v Value) Copy() Value
|
||||
</pre>
|
||||
|
||||
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—its methods—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">
|
||||
@@ -919,7 +890,7 @@ encourages you to be explicit.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A blog post titled <a href="https://blog.golang.org/constants">Constants</a>
|
||||
A blog post, title <a href="http://blog.golang.org/constants">Constants</a>,
|
||||
explores this topic in more detail.
|
||||
</p>
|
||||
|
||||
@@ -979,19 +950,6 @@ In fact, <code>godoc</code> implements the full site at
|
||||
<a href="/">golang.org/</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A <code>godoc</code> instance may be configured to provide rich,
|
||||
interactive static analyses of symbols in the programs it displays; details are
|
||||
listed <a href="https://golang.org/lib/godoc/analysis/help.html">here</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For access to documentation from the command line, the
|
||||
<a href="https://golang.org/pkg/cmd/go/">go</a> tool has a
|
||||
<a href="https://golang.org/pkg/cmd/go/#hdr-Show_documentation_for_package_or_symbol">doc</a>
|
||||
subcommand that provides a textual interface to the same information.
|
||||
</p>
|
||||
|
||||
<h3 id="Is_there_a_Go_programming_style_guide">
|
||||
Is there a Go programming style guide?</h3>
|
||||
|
||||
@@ -1088,17 +1046,7 @@ unexpected ways, the simplest solution is to copy it to your local repository.
|
||||
(This is the approach Google takes internally.)
|
||||
Store the copy under a new import path that identifies it as a local copy.
|
||||
For example, you might copy "original.com/pkg" to "you.com/external/original.com/pkg".
|
||||
The <a href="https://godoc.org/golang.org/x/tools/cmd/gomvpkg">gomvpkg</a>
|
||||
program is one tool to help automate this process.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Go 1.5 release includes an experimental facility to the
|
||||
<a href="https://golang.org/cmd/go">go</a> command
|
||||
that makes it easier to manage external dependencies by "vendoring"
|
||||
them into a special directory near the package that depends upon them.
|
||||
See the <a href="https://golang.org/s/go15vendor">design
|
||||
document</a> for details.
|
||||
Keith Rarick's <a href="https://github.com/kr/goven">goven</a> is one tool to help automate this process.
|
||||
</p>
|
||||
|
||||
<h2 id="Pointers">Pointers and Allocation</h2>
|
||||
@@ -1113,8 +1061,7 @@ thing being passed, as if there were an assignment statement assigning the
|
||||
value to the parameter. For instance, passing an <code>int</code> value
|
||||
to a function makes a copy of the <code>int</code>, and passing a pointer
|
||||
value makes a copy of the pointer, but not the data it points to.
|
||||
(See a <a href="/doc/faq#methods_on_values_or_pointers">later
|
||||
section</a> for a discussion of how this affects method receivers.)
|
||||
(See the next section for a discussion of how this affects method receivers.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -1343,20 +1290,14 @@ See the <a href="/doc/codewalk/sharemem/">Share Memory By Communicating</a> code
|
||||
Why doesn't my multi-goroutine program use multiple CPUs?</h3>
|
||||
|
||||
<p>
|
||||
The number of CPUs available simultaneously to executing goroutines is
|
||||
controlled by the <code>GOMAXPROCS</code> shell environment variable.
|
||||
In earlier releases of Go, the default value was 1, but as of Go 1.5 the default
|
||||
value is the number of cores available.
|
||||
Therefore programs compiled after 1.5 should demonstrate parallel execution
|
||||
of multiple goroutines.
|
||||
To change the behavior, set the environment variable or use the similarly-named
|
||||
<a href="/pkg/runtime/#GOMAXPROCS">function</a>
|
||||
of the runtime package to configure the
|
||||
run-time support to utilize a different number of threads.
|
||||
You must set the <code>GOMAXPROCS</code> shell environment variable
|
||||
or use the similarly-named <a href="/pkg/runtime/#GOMAXPROCS"><code>function</code></a>
|
||||
of the runtime package to allow the
|
||||
run-time support to utilize more than one OS thread.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Programs that perform parallel computation might benefit from a further increase in
|
||||
Programs that perform parallel computation should benefit from an increase in
|
||||
<code>GOMAXPROCS</code>.
|
||||
However, be aware that
|
||||
<a href="//blog.golang.org/2013/01/concurrency-is-not-parallelism.html">concurrency
|
||||
@@ -1378,7 +1319,7 @@ intrinsically parallel.
|
||||
<p>
|
||||
In practical terms, programs that spend more time
|
||||
communicating on channels than doing computation
|
||||
may experience performance degradation when using
|
||||
will experience performance degradation when using
|
||||
multiple OS threads.
|
||||
This is because sending data between threads involves switching
|
||||
contexts, which has significant cost.
|
||||
@@ -1389,11 +1330,9 @@ to speed it up.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Go's goroutine scheduler is not as good as it needs to be, although it
|
||||
has improved in recent releases.
|
||||
In the future, it may better optimize its use of OS threads.
|
||||
For now, if there are performance issues,
|
||||
setting <code>GOMAXPROCS</code> on a per-application basis may help.
|
||||
Go's goroutine scheduler is not as good as it needs to be. In the future, it
|
||||
should recognize such cases and optimize its use of OS threads. For now,
|
||||
<code>GOMAXPROCS</code> should be set on a per-application basis.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -1428,10 +1367,7 @@ there is no useful way for a method call to obtain a pointer.
|
||||
Even in cases where the compiler could take the address of a value
|
||||
to pass to the method, if the method modifies the value the changes
|
||||
will be lost in the caller.
|
||||
As an example, if the <code>Write</code> method of
|
||||
<a href="/pkg/bytes/#Buffer"><code>bytes.Buffer</code></a>
|
||||
used a value receiver rather than a pointer,
|
||||
this code:
|
||||
As a common example, this code:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -1525,7 +1461,7 @@ seem odd but works fine in Go:
|
||||
Does Go have the <code>?:</code> operator?</h3>
|
||||
|
||||
<p>
|
||||
There is no ternary testing operation in Go. You may use the following to achieve the same
|
||||
There is no ternary form in Go. You may use the following to achieve the same
|
||||
result:
|
||||
</p>
|
||||
|
||||
@@ -1617,51 +1553,6 @@ test cases. The standard Go library is full of illustrative examples, such as in
|
||||
<a href="/src/fmt/fmt_test.go">the formatting tests for the <code>fmt</code> package</a>.
|
||||
</p>
|
||||
|
||||
<h3 id="x_in_std">
|
||||
Why isn't <i>X</i> in the standard library?</h3>
|
||||
|
||||
<p>
|
||||
The standard library's purpose is to support the runtime, connect to
|
||||
the operating system, and provide key functionality that many Go
|
||||
programs require, such as formatted I/O and networking.
|
||||
It also contains elements important for web programming, including
|
||||
cryptography and support for standards like HTTP, JSON, and XML.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There is no clear criterion that defines what is included because for
|
||||
a long time, this was the <i>only</i> Go library.
|
||||
There are criteria that define what gets added today, however.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
New additions to the standard library are rare and the bar for
|
||||
inclusion is high.
|
||||
Code included in the standard library bears a large ongoing maintenance cost
|
||||
(often borne by those other than the original author),
|
||||
is subject to the <a href="/doc/go1compat.html">Go 1 compatibility promise</a>
|
||||
(blocking fixes to any flaws in the API),
|
||||
and is subject to the Go
|
||||
<a href="https://golang.org/s/releasesched">release schedule</a>,
|
||||
preventing bug fixes from being available to users quickly.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Most new code should live outside of the standard library and be accessible
|
||||
via the <a href="/cmd/go/"><code>go</code> tool</a>'s
|
||||
<code>go get</code> command.
|
||||
Such code can have its own maintainers, release cycle,
|
||||
and compatibility guarantees.
|
||||
Users can find packages and read their documentation at
|
||||
<a href="https://godoc.org/">godoc.org</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Although there are pieces in the standard library that don't really belong,
|
||||
such as <code>log/syslog</code>, we continue to maintain everything in the
|
||||
library because of the Go 1 compatibility promise.
|
||||
But we encourage most new code to live elsewhere.
|
||||
</p>
|
||||
|
||||
<h2 id="Implementation">Implementation</h2>
|
||||
|
||||
@@ -1670,10 +1561,11 @@ 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 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.
|
||||
standard GCC back end. <code>Gc</code> is written in C using
|
||||
<code>yacc</code>/<code>bison</code> for the parser.
|
||||
Although it's a new program, it fits in the Plan 9 C compiler suite
|
||||
(<a href="http://plan9.bell-labs.com/sys/doc/compiler.html">http://plan9.bell-labs.com/sys/doc/compiler.html</a>)
|
||||
and uses a variant of the Plan 9 loader to generate ELF/Mach-O/PE binaries.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -1682,26 +1574,24 @@ slow to meet our performance goals.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The original <code>gc</code>, the Go compiler, was written in C
|
||||
because of the difficulties of bootstrapping—you'd need a Go compiler to
|
||||
set up a Go environment.
|
||||
But things have advanced and as of Go 1.5 the compiler is written in Go.
|
||||
It was converted from C to Go using automatic translation tools, as
|
||||
described in <a href="/s/go13compiler">this design document</a>
|
||||
and <a href="https://talks.golang.org/2015/gogo.slide#1">a recent talk</a>.
|
||||
Thus the compiler is now "self-hosting", which means we must face
|
||||
the bootstrapping problem.
|
||||
The solution, naturally, is to have a working Go installation already,
|
||||
just as one normally has a working C installation in place.
|
||||
The story of how to bring up a new Go installation from source
|
||||
is described <a href="/s/go15bootstrap">separately</a>.
|
||||
We also considered writing <code>gc</code>, the original Go compiler, in Go itself but
|
||||
elected not to do so because of the difficulties of bootstrapping and
|
||||
especially of open source distribution—you'd need a Go compiler to
|
||||
set up a Go environment. <code>Gccgo</code>, which came later, makes it possible to
|
||||
consider writing a compiler in Go.
|
||||
A plan to do that by machine translation of the existing compiler is under development.
|
||||
<a href="http://golang.org/s/go13compiler">A separate document</a>
|
||||
explains the reason for this approach.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Go is a fine language in which to implement a Go compiler.
|
||||
Although <code>gc</code> does not use them (yet?), a native lexer and
|
||||
parser are available in the <a href="/pkg/go/"><code>go</code></a> package
|
||||
and there is also a <a href="/pkg/go/types">type checker</a>.
|
||||
That plan aside,
|
||||
Go is a
|
||||
fine language in which to implement a self-hosting compiler: a native lexer and
|
||||
parser are already available in the <a href="/pkg/go/"><code>go</code></a> package
|
||||
and a separate type checking
|
||||
<a href="http://godoc.org/golang.org/x/tools/go/types">package</a>
|
||||
has also been written.
|
||||
</p>
|
||||
|
||||
<h3 id="How_is_the_run_time_support_implemented">
|
||||
@@ -1709,11 +1599,15 @@ How is the run-time support implemented?</h3>
|
||||
|
||||
<p>
|
||||
Again due to bootstrapping issues, the run-time code was originally written mostly in C (with a
|
||||
tiny bit of assembler) but it has since been translated to Go
|
||||
(except for some assembler bits).
|
||||
tiny bit of assembler) although much of it has been translated to Go since then
|
||||
and one day all of it might be (except for the assembler bits).
|
||||
<code>Gccgo</code>'s run-time support uses <code>glibc</code>.
|
||||
The <code>gccgo</code> compiler implements goroutines using
|
||||
a technique called segmented stacks,
|
||||
<code>Gc</code> uses a custom C library to keep the footprint under
|
||||
control; it is
|
||||
compiled with a version of the Plan 9 C compiler that supports
|
||||
resizable stacks for goroutines.
|
||||
The <code>gccgo</code> compiler implements these on Linux only,
|
||||
using a technique called segmented stacks,
|
||||
supported by recent modifications to the gold linker.
|
||||
</p>
|
||||
|
||||
@@ -1721,8 +1615,8 @@ supported by recent modifications to the gold linker.
|
||||
Why is my trivial program such a large binary?</h3>
|
||||
|
||||
<p>
|
||||
The linker in the <code>gc</code> tool chain
|
||||
creates statically-linked binaries by default. All Go binaries therefore include the Go
|
||||
The linkers in the gc tool chain (<code>5l</code>, <code>6l</code>, and <code>8l</code>)
|
||||
do static linking. All Go binaries therefore include the Go
|
||||
run-time, along with the run-time type information necessary to support dynamic
|
||||
type checks, reflection, and even panic-time stack traces.
|
||||
</p>
|
||||
@@ -1732,7 +1626,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 2.3 MB, but
|
||||
is around 1.9 MB, but
|
||||
that includes more powerful run-time support and type information.
|
||||
</p>
|
||||
|
||||
@@ -1809,16 +1703,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>
|
||||
|
||||
@@ -1826,9 +1719,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>
|
||||
@@ -1992,12 +1885,8 @@ simpler because they don't need to specify how memory is managed across them.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The current implementation is a parallel mark-and-sweep collector.
|
||||
Recent improvements, documented in
|
||||
<a href="/s/go14gc">this design document</a>,
|
||||
have introduced bounded pause times and improved the
|
||||
parallelism.
|
||||
Future versions might attempt new approaches.
|
||||
The current implementation is a parallel mark-and-sweep
|
||||
collector but a future version might take a different approach.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -322,11 +322,11 @@ var limit = make(chan int, 3)
|
||||
|
||||
func main() {
|
||||
for _, w := range work {
|
||||
go func(w func()) {
|
||||
limit <- 1
|
||||
go func() {
|
||||
limit <- 1
|
||||
w()
|
||||
<-limit
|
||||
}(w)
|
||||
<-limit
|
||||
}()
|
||||
}
|
||||
select{}
|
||||
}
|
||||
|
||||
375
doc/go_spec.html
375
doc/go_spec.html
@@ -1,9 +1,24 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of May 31, 2016",
|
||||
"Subtitle": "Version of November 11, 2014",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
<!--
|
||||
TODO
|
||||
[ ] need language about function/method calls and parameter passing rules
|
||||
[ ] last paragraph of #Assignments (constant promotion) should be elsewhere
|
||||
and mention assignment to empty interface.
|
||||
[ ] need to say something about "scope" of selectors?
|
||||
[ ] clarify what a field name is in struct declarations
|
||||
(struct{T} vs struct {T T} vs struct {t T})
|
||||
[ ] need explicit language about the result type of operations
|
||||
[ ] should probably write something about evaluation order of statements even
|
||||
though obvious
|
||||
[ ] in Selectors section, clarify what receiver value is passed in method invocations
|
||||
-->
|
||||
|
||||
|
||||
<h2 id="Introduction">Introduction</h2>
|
||||
|
||||
<p>
|
||||
@@ -101,14 +116,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>
|
||||
@@ -128,27 +144,27 @@ hex_digit = "0" … "9" | "A" … "F" | "a" … "f" .
|
||||
<h3 id="Comments">Comments</h3>
|
||||
|
||||
<p>
|
||||
Comments serve as program documentation. There are two forms:
|
||||
There are two forms of comments:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<i>Line comments</i> start with the character sequence <code>//</code>
|
||||
and stop at the end of the line.
|
||||
and stop at the end of the line. A line comment acts like a newline.
|
||||
</li>
|
||||
<li>
|
||||
<i>General comments</i> start with the character sequence <code>/*</code>
|
||||
and stop with the first subsequent character sequence <code>*/</code>.
|
||||
and continue through the character sequence <code>*/</code>. A general
|
||||
comment containing one or more newlines acts like a newline, otherwise it acts
|
||||
like a space.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
A comment cannot start inside a <a href="#Rune_literals">rune</a> or
|
||||
<a href="#String_literals">string literal</a>, or inside a comment.
|
||||
A general comment containing no newlines acts like a space.
|
||||
Any other comment acts like a newline.
|
||||
Comments do not nest.
|
||||
</p>
|
||||
|
||||
|
||||
<h3 id="Tokens">Tokens</h3>
|
||||
|
||||
<p>
|
||||
@@ -175,8 +191,11 @@ using the following two rules:
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>
|
||||
When the input is broken into tokens, a semicolon is automatically inserted
|
||||
into the token stream immediately after a line's final token if that token is
|
||||
into the token stream at the end of a non-blank line if the line's final
|
||||
token is
|
||||
</p>
|
||||
<ul>
|
||||
<li>an
|
||||
<a href="#Identifiers">identifier</a>
|
||||
@@ -353,10 +372,9 @@ imaginary_lit = (decimals | float_lit) "i" .
|
||||
<p>
|
||||
A rune literal represents a <a href="#Constants">rune constant</a>,
|
||||
an integer value identifying a Unicode code point.
|
||||
A rune literal is expressed as one or more characters enclosed in single quotes,
|
||||
as in <code>'x'</code> or <code>'\n'</code>.
|
||||
Within the quotes, any character may appear except newline and unescaped single
|
||||
quote. A single quoted character represents the Unicode value
|
||||
A rune literal is expressed as one or more characters enclosed in single quotes.
|
||||
Within the quotes, any character may appear except single
|
||||
quote and newline. A single quoted character represents the Unicode value
|
||||
of the character itself,
|
||||
while multi-character sequences beginning with a backslash encode
|
||||
values in various formats.
|
||||
@@ -430,7 +448,6 @@ escaped_char = `\` ( "a" | "b" | "f" | "n" | "r" | "t" | "v" | `\` | "'" | `
|
||||
'\xff'
|
||||
'\u12e4'
|
||||
'\U00101234'
|
||||
'\'' // rune literal containing single quote character
|
||||
'aa' // illegal: too many characters
|
||||
'\xa' // illegal: too few hexadecimal digits
|
||||
'\0' // illegal: too few octal digits
|
||||
@@ -447,8 +464,8 @@ obtained from concatenating a sequence of characters. There are two forms:
|
||||
raw string literals and interpreted string literals.
|
||||
</p>
|
||||
<p>
|
||||
Raw string literals are character sequences between back quotes, as in
|
||||
<code>`foo`</code>. Within the quotes, any character may appear except
|
||||
Raw string literals are character sequences between back quotes
|
||||
<code>``</code>. Within the quotes, any character is legal except
|
||||
back quote. The value of a raw string literal is the
|
||||
string composed of the uninterpreted (implicitly UTF-8-encoded) characters
|
||||
between the quotes;
|
||||
@@ -459,9 +476,8 @@ are discarded from the raw string value.
|
||||
</p>
|
||||
<p>
|
||||
Interpreted string literals are character sequences between double
|
||||
quotes, as in <code>"bar"</code>.
|
||||
Within the quotes, any character may appear except newline and unescaped double quote.
|
||||
The text between the quotes forms the
|
||||
quotes <code>""</code>. The text between the quotes,
|
||||
which may not contain newlines, forms the
|
||||
value of the literal, with backslash escapes interpreted as they
|
||||
are in <a href="#Rune_literals">rune literals</a> (except that <code>\'</code> is illegal and
|
||||
<code>\"</code> is legal), with the same restrictions.
|
||||
@@ -483,17 +499,17 @@ interpreted_string_lit = `"` { unicode_value | byte_value } `"` .
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
`abc` // same as "abc"
|
||||
`abc` // same as "abc"
|
||||
`\n
|
||||
\n` // same as "\\n\n\\n"
|
||||
\n` // same as "\\n\n\\n"
|
||||
"\n"
|
||||
"\"" // same as `"`
|
||||
""
|
||||
"Hello, world!\n"
|
||||
"日本語"
|
||||
"\u65e5本\U00008a9e"
|
||||
"\xff\u00FF"
|
||||
"\uD800" // illegal: surrogate half
|
||||
"\U00110000" // illegal: invalid Unicode code point
|
||||
"\uD800" // illegal: surrogate half
|
||||
"\U00110000" // illegal: invalid Unicode code point
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -557,9 +573,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 +608,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
|
||||
@@ -653,7 +677,7 @@ acts like a variable.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <i>static type</i> (or just <i>type</i>) of a variable is the
|
||||
The <i>static type</i> (or just <i>type</i>) of a variable is the
|
||||
type given in its declaration, the type provided in the
|
||||
<code>new</code> call or composite literal, or the type of
|
||||
an element of a structured variable.
|
||||
@@ -663,8 +687,8 @@ which is the concrete type of the value assigned to the variable at run time
|
||||
which has no type).
|
||||
The dynamic type may vary during execution but values stored in interface
|
||||
variables are always <a href="#Assignability">assignable</a>
|
||||
to the static type of the variable.
|
||||
</p>
|
||||
to the static type of the variable.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
var x interface{} // x is nil and has static type interface{}
|
||||
@@ -1043,25 +1067,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 +1131,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 +1812,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 << iota // a == 1
|
||||
const (
|
||||
a = 1 << iota // a == 1 (iota has been reset)
|
||||
b = 1 << iota // b == 2
|
||||
c = 3 // c == 3 (iota is not used but still incremented)
|
||||
d = 1 << iota // d == 8
|
||||
c = 1 << 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>
|
||||
@@ -1916,7 +1933,7 @@ const (
|
||||
)
|
||||
|
||||
func (tz TimeZone) String() string {
|
||||
return fmt.Sprintf("GMT%+dh", tz)
|
||||
return fmt.Sprintf("GMT+%dh", tz)
|
||||
}
|
||||
</pre>
|
||||
|
||||
@@ -1964,7 +1981,7 @@ with no explicit type.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
var d = math.Sin(0.5) // d is float64
|
||||
var d = math.Sin(0.5) // d is int64
|
||||
var i = 42 // i is int
|
||||
var t, ok = x.(T) // t is T, ok is bool
|
||||
var n = nil // illegal
|
||||
@@ -2004,12 +2021,12 @@ _, y, _ := coord(p) // coord() returns three values; only interested in y coord
|
||||
</pre>
|
||||
|
||||
<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,
|
||||
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.
|
||||
Unlike regular variable declarations, a short variable declaration may redeclare variables provided they
|
||||
were originally declared earlier in the same block 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.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -2048,13 +2065,13 @@ a <a href="#Terminating_statements">terminating statement</a>.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
func IndexRune(s string, r rune) int {
|
||||
for i, c := range s {
|
||||
if c == r {
|
||||
return i
|
||||
func findMarker(c <-chan int) int {
|
||||
for i := range c {
|
||||
if x := <-c; isMarker(x) {
|
||||
return x
|
||||
}
|
||||
}
|
||||
// invalid: missing return statement
|
||||
// invalid: missing return statement.
|
||||
}
|
||||
</pre>
|
||||
|
||||
@@ -2088,15 +2105,14 @@ Receiver = Parameters .
|
||||
</pre>
|
||||
|
||||
<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.
|
||||
The receiver is specified via an extra parameter section preceeding the method
|
||||
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
|
||||
it must be declared in the same package as the method.
|
||||
The method is said to be <i>bound</i> to the base type and the method name
|
||||
is visible only within <a href="#Selectors">selectors</a> for type <code>T</code>
|
||||
or <code>*T</code>.
|
||||
is visible only within selectors for that type.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -2208,8 +2224,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 +2234,20 @@ CompositeLit = LiteralType LiteralValue .
|
||||
LiteralType = StructType | ArrayType | "[" "..." "]" ElementType |
|
||||
SliceType | MapType | TypeName .
|
||||
LiteralValue = "{" [ ElementList [ "," ] ] "}" .
|
||||
ElementList = KeyedElement { "," KeyedElement } .
|
||||
KeyedElement = [ Key ":" ] Element .
|
||||
Key = FieldName | Expression | LiteralValue .
|
||||
ElementList = Element { "," Element } .
|
||||
Element = [ Key ":" ] Value .
|
||||
Key = FieldName | ElementIndex .
|
||||
FieldName = identifier .
|
||||
Element = Expression | LiteralValue .
|
||||
ElementIndex = Expression .
|
||||
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 +2260,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
|
||||
@@ -2304,7 +2322,7 @@ var pointer *Point3D = &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
|
||||
@@ -2339,21 +2357,17 @@ tmp[0 : n]
|
||||
|
||||
<p>
|
||||
Within a composite literal of array, slice, or map type <code>T</code>,
|
||||
elements or map keys that are themselves composite literals may elide the respective
|
||||
literal type if it is identical to the element or key type of <code>T</code>.
|
||||
Similarly, elements or keys that are addresses of composite literals may elide
|
||||
the <code>&T</code> when the element or key type is <code>*T</code>.
|
||||
elements that are themselves composite literals may elide the respective
|
||||
literal type if it is identical to the element type of <code>T</code>.
|
||||
Similarly, elements that are addresses of composite literals may elide
|
||||
the <code>&T</code> when the element type is <code>*T</code>.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
[...]Point{{1.5, -3.5}, {0, 0}} // same as [...]Point{Point{1.5, -3.5}, Point{0, 0}}
|
||||
[][]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}}
|
||||
[...]Point{{1.5, -3.5}, {0, 0}} // same as [...]Point{Point{1.5, -3.5}, Point{0, 0}}
|
||||
[][]int{{1, 2, 3}, {4, 5}} // same as [][]int{[]int{1, 2, 3}, []int{4, 5}}
|
||||
|
||||
[...]*Point{{1.5, -3.5}, {0, 0}} // same as [...]*Point{&Point{1.5, -3.5}, &Point{0, 0}}
|
||||
|
||||
map[Point]string{{0, 0}: "orig"} // same as map[Point]string{Point{0, 0}: "orig"}
|
||||
[...]*Point{{1.5, -3.5}, {0, 0}} // same as [...]*Point{&Point{1.5, -3.5}, &Point{0, 0}}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -2443,8 +2457,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>
|
||||
@@ -2587,7 +2602,7 @@ one may write:
|
||||
<pre>
|
||||
t.z // t.z
|
||||
t.y // t.T1.y
|
||||
t.x // (*t.T0).x
|
||||
t.x // (*t.TO).x
|
||||
|
||||
p.z // (*p).z
|
||||
p.y // (*p).T1.y
|
||||
@@ -2595,10 +2610,9 @@ p.x // (*(*p).T0).x
|
||||
|
||||
q.x // (*(*q).T0).x (*q).x is a valid field selector
|
||||
|
||||
p.M0() // ((*p).T0).M0() M0 expects *T0 receiver
|
||||
p.M1() // ((*p).T1).M1() M1 expects T1 receiver
|
||||
p.M2() // p.M2() M2 expects *T2 receiver
|
||||
t.M2() // (&t).M2() M2 expects *T2 receiver, see section on Calls
|
||||
p.M1() // ((*p).T1).M1() M1 expects T1 receiver
|
||||
p.M0() // ((&(*p).T0)).M0() M0 expects *T0 receiver, see section on Calls
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -3288,7 +3302,7 @@ Operators combine operands into expressions.
|
||||
</p>
|
||||
|
||||
<pre class="ebnf">
|
||||
Expression = UnaryExpr | Expression binary_op Expression .
|
||||
Expression = UnaryExpr | Expression binary_op UnaryExpr .
|
||||
UnaryExpr = PrimaryExpr | unary_op UnaryExpr .
|
||||
|
||||
binary_op = "||" | "&&" | rel_op | add_op | mul_op .
|
||||
@@ -3317,7 +3331,7 @@ to the type of the other operand.
|
||||
The right operand in a shift expression must have unsigned integer type
|
||||
or be an untyped constant that can be converted to unsigned integer type.
|
||||
If the left operand of a non-constant shift expression is an untyped constant,
|
||||
it is first converted to the type it would assume if the shift expression were
|
||||
the type of the constant is what it would be if the shift expression were
|
||||
replaced by its left operand alone.
|
||||
</p>
|
||||
|
||||
@@ -3326,8 +3340,8 @@ var s uint = 33
|
||||
var i = 1<<s // 1 has type int
|
||||
var j int32 = 1<<s // 1 has type int32; j == 0
|
||||
var k = uint64(1<<s) // 1 has type uint64; k == 1<<33
|
||||
var m int = 1.0<<s // 1.0 has type int; m == 0 if ints are 32bits in size
|
||||
var n = 1.0<<s == j // 1.0 has type int32; n == true
|
||||
var m int = 1.0<<s // 1.0 has type int
|
||||
var n = 1.0<<s != i // 1.0 has type int; n == false if ints are 32bits in size
|
||||
var o = 1<<s == 2<<s // 1 and 2 have type int; o == true if ints are 32bits in size
|
||||
var p = 1<<s == 1<<33 // illegal if ints are 32bits in size: 1 has type int, but 1<<33 overflows int
|
||||
var u = 1.0<<s // illegal: 1.0 has type float64, cannot shift
|
||||
@@ -3337,8 +3351,7 @@ var v float32 = 1<<s // illegal: 1 has type float32, cannot shift
|
||||
var w int64 = 1.0<<33 // 1.0<<33 is a constant shift expression
|
||||
</pre>
|
||||
|
||||
|
||||
<h4 id="Operator_precedence">Operator precedence</h4>
|
||||
<h3 id="Operator_precedence">Operator precedence</h3>
|
||||
<p>
|
||||
Unary operators have the highest precedence.
|
||||
As the <code>++</code> and <code>--</code> operators form
|
||||
@@ -3380,9 +3393,9 @@ x == y+1 && <-chanPtr > 0
|
||||
<p>
|
||||
Arithmetic operators apply to numeric values and yield a result of the same
|
||||
type as the first operand. The four standard arithmetic operators (<code>+</code>,
|
||||
<code>-</code>, <code>*</code>, <code>/</code>) apply to integer,
|
||||
floating-point, and complex types; <code>+</code> also applies to strings.
|
||||
The bitwise logical and shift operators apply to integers only.
|
||||
<code>-</code>, <code>*</code>, <code>/</code>) apply to integer,
|
||||
floating-point, and complex types; <code>+</code> also applies
|
||||
to strings. All other arithmetic operators apply to integers only.
|
||||
</p>
|
||||
|
||||
<pre class="grammar">
|
||||
@@ -3401,9 +3414,19 @@ The bitwise logical and shift operators apply to integers only.
|
||||
>> right shift integer >> unsigned integer
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Strings can be concatenated using the <code>+</code> operator
|
||||
or the <code>+=</code> assignment operator:
|
||||
</p>
|
||||
|
||||
<h4 id="Integer_operators">Integer operators</h4>
|
||||
<pre>
|
||||
s := "hi" + string(c)
|
||||
s += " and good bye"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
String addition creates a new string by concatenating the operands.
|
||||
</p>
|
||||
<p>
|
||||
For two integer values <code>x</code> and <code>y</code>, the integer quotient
|
||||
<code>q = x / y</code> and remainder <code>r = x % y</code> satisfy the following
|
||||
@@ -3480,8 +3503,16 @@ follows:
|
||||
and m = -1 for signed x
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
For floating-point and complex numbers,
|
||||
<code>+x</code> is the same as <code>x</code>,
|
||||
while <code>-x</code> is the negation of <code>x</code>.
|
||||
The result of a floating-point or complex division by zero is not specified beyond the
|
||||
IEEE-754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
|
||||
occurs is implementation-specific.
|
||||
</p>
|
||||
|
||||
<h4 id="Integer_overflow">Integer overflow</h4>
|
||||
<h3 id="Integer_overflow">Integer overflow</h3>
|
||||
|
||||
<p>
|
||||
For unsigned integer values, the operations <code>+</code>,
|
||||
@@ -3502,35 +3533,6 @@ not occur. For instance, it may not assume that <code>x < x + 1</code> is alw
|
||||
</p>
|
||||
|
||||
|
||||
<h4 id="Floating_point_operators">Floating-point operators</h4>
|
||||
|
||||
<p>
|
||||
For floating-point and complex numbers,
|
||||
<code>+x</code> is the same as <code>x</code>,
|
||||
while <code>-x</code> is the negation of <code>x</code>.
|
||||
The result of a floating-point or complex division by zero is not specified beyond the
|
||||
IEEE-754 standard; whether a <a href="#Run_time_panics">run-time panic</a>
|
||||
occurs is implementation-specific.
|
||||
</p>
|
||||
|
||||
|
||||
<h4 id="String_concatenation">String concatenation</h4>
|
||||
|
||||
<p>
|
||||
Strings can be concatenated using the <code>+</code> operator
|
||||
or the <code>+=</code> assignment operator:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
s := "hi" + string(c)
|
||||
s += " and good bye"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
String addition creates a new string by concatenating the operands.
|
||||
</p>
|
||||
|
||||
|
||||
<h3 id="Comparison_operators">Comparison operators</h3>
|
||||
|
||||
<p>
|
||||
@@ -3643,12 +3645,12 @@ is also allowed and follows from the general rules above.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
const c = 3 < 4 // c is the untyped boolean constant true
|
||||
const c = 3 < 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
|
||||
@@ -3792,8 +3794,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>
|
||||
@@ -3813,7 +3814,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
|
||||
@@ -4095,7 +4095,7 @@ the implementation restriction in the section
|
||||
on <a href="#Constants">constants</a>. This rounding may cause a
|
||||
floating-point constant expression to be invalid in an integer
|
||||
context, even if it would be integral when calculated using infinite
|
||||
precision, and vice versa.
|
||||
precision.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -4257,7 +4257,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>
|
||||
|
||||
|
||||
@@ -4400,7 +4400,7 @@ a[i] = 23
|
||||
An <i>assignment operation</i> <code>x</code> <i>op</i><code>=</code>
|
||||
<code>y</code> where <i>op</i> is a binary arithmetic operation is equivalent
|
||||
to <code>x</code> <code>=</code> <code>x</code> <i>op</i>
|
||||
<code>(y)</code> but evaluates <code>x</code>
|
||||
<code>y</code> but evaluates <code>x</code>
|
||||
only once. The <i>op</i><code>=</code> construct is a single token.
|
||||
In assignment operations, both the left- and right-hand expression lists
|
||||
must contain exactly one single-valued expression, and the left-hand
|
||||
@@ -4562,7 +4562,6 @@ In an expression switch, the cases contain expressions that are compared
|
||||
against the value of the switch expression.
|
||||
In a type switch, the cases contain types that are compared against the
|
||||
type of a specially annotated switch expression.
|
||||
The switch expression is evaluated exactly once in a switch statement.
|
||||
</p>
|
||||
|
||||
<h4 id="Expression_switches">Expression switches</h4>
|
||||
@@ -4589,27 +4588,6 @@ ExprCaseClause = ExprSwitchCase ":" StatementList .
|
||||
ExprSwitchCase = "case" ExpressionList | "default" .
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
If the switch expression evaluates to an untyped constant, it is first
|
||||
<a href="#Conversions">converted</a> to its <a href="#Constants">default type</a>;
|
||||
if it is an untyped boolean value, it is first converted to type <code>bool</code>.
|
||||
The predeclared untyped value <code>nil</code> cannot be used as a switch expression.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If a case expression is untyped, it is first <a href="#Conversions">converted</a>
|
||||
to the type of the switch expression.
|
||||
For each (possibly converted) case expression <code>x</code> and the value <code>t</code>
|
||||
of the switch expression, <code>x == t</code> must be a valid <a href="#Comparison_operators">comparison</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In other words, the switch expression is treated as if it were used to declare and
|
||||
initialize a temporary variable <code>t</code> without explicit type; it is that
|
||||
value of <code>t</code> against which each case expression <code>x</code> is tested
|
||||
for equality.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In a case or default clause, the last non-empty statement
|
||||
may be a (possibly <a href="#Labeled_statements">labeled</a>)
|
||||
@@ -4622,7 +4600,7 @@ but the last clause of an expression switch.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The switch expression may be preceded by a simple statement, which
|
||||
The expression may be preceded by a simple statement, which
|
||||
executes before the expression is evaluated.
|
||||
</p>
|
||||
|
||||
@@ -4645,13 +4623,6 @@ case x == 4: f3()
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Implementation restriction: A compiler may disallow multiple case
|
||||
expressions evaluating to the same constant.
|
||||
For instance, the current compilers disallow duplicate integer,
|
||||
floating point, or string constants in case expressions.
|
||||
</p>
|
||||
|
||||
<h4 id="Type_switches">Type switches</h4>
|
||||
|
||||
<p>
|
||||
@@ -4672,8 +4643,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">
|
||||
@@ -4698,7 +4667,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>
|
||||
@@ -5331,7 +5299,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>
|
||||
|
||||
@@ -5487,7 +5455,7 @@ const (
|
||||
c2 = len([10]float64{2}) // [10]float64{2} contains no function calls
|
||||
c3 = len([10]float64{c1}) // [10]float64{c1} contains no function calls
|
||||
c4 = len([10]float64{imag(2i)}) // imag(2i) is a constant and no function call is issued
|
||||
c5 = len([10]float64{imag(z)}) // invalid: imag(z) is a (non-constant) function call
|
||||
c5 = len([10]float64{imag(z)}) // invalid: imag(x) is a (non-constant) function call
|
||||
)
|
||||
var z complex128
|
||||
</pre>
|
||||
@@ -5611,7 +5579,7 @@ s3 := append(s2, s0...) // append a slice s3 == []int{0,
|
||||
s4 := append(s3[3:6], s3[2:]...) // append overlapping slice s4 == []int{3, 5, 7, 2, 3, 5, 7, 0, 0}
|
||||
|
||||
var t []interface{}
|
||||
t = append(t, 42, 3.1415, "foo") // t == []interface{}{42, 3.1415, "foo"}
|
||||
t = append(t, 42, 3.1415, "foo") t == []interface{}{42, 3.1415, "foo"}
|
||||
|
||||
var b []byte
|
||||
b = append(b, "bar"...) // append string contents b == []byte{'b', 'a', 'r' }
|
||||
@@ -5689,28 +5657,11 @@ The type of the arguments and return value correspond.
|
||||
For <code>complex</code>, the two arguments must be of the same
|
||||
floating-point type and the return type is the complex type
|
||||
with the corresponding floating-point constituents:
|
||||
<code>complex64</code> for <code>float32</code> arguments, and
|
||||
<code>complex128</code> for <code>float64</code> arguments.
|
||||
If one of the arguments evaluates to an untyped constant, it is first
|
||||
<a href="#Conversions">converted</a> to the type of the other argument.
|
||||
If both arguments evaluate to untyped constants, they must be non-complex
|
||||
numbers or their imaginary parts must be zero, and the return value of
|
||||
the function is an untyped complex constant.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For <code>real</code> and <code>imag</code>, the argument must be
|
||||
of complex type, and the return type is the corresponding floating-point
|
||||
type: <code>float32</code> for a <code>complex64</code> argument, and
|
||||
<code>float64</code> for a <code>complex128</code> argument.
|
||||
If the argument evaluates to an untyped constant, it must be a number,
|
||||
and the return value of the function is an untyped floating-point constant.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>real</code> and <code>imag</code> functions together form the inverse of
|
||||
<code>complex</code>, so for a value <code>z</code> of a complex type <code>Z</code>,
|
||||
<code>z == Z(complex(real(z), imag(z)))</code>.
|
||||
<code>complex64</code> for <code>float32</code>,
|
||||
<code>complex128</code> for <code>float64</code>.
|
||||
The <code>real</code> and <code>imag</code> functions
|
||||
together form the inverse, so for a complex value <code>z</code>,
|
||||
<code>z</code> <code>==</code> <code>complex(real(z),</code> <code>imag(z))</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -5720,15 +5671,11 @@ value is a constant.
|
||||
|
||||
<pre>
|
||||
var a = complex(2, -2) // complex128
|
||||
const b = complex(1.0, -1.4) // untyped complex constant 1 - 1.4i
|
||||
var b = complex(1.0, -1.4) // complex128
|
||||
x := float32(math.Cos(math.Pi/2)) // float32
|
||||
var c64 = complex(5, -x) // complex64
|
||||
const s uint = complex(1, 0) // untyped complex constant 1 + 0i can be converted to uint
|
||||
_ = complex(1, 2<<s) // illegal: 2 has floating-point type, cannot shift
|
||||
var im = imag(b) // float64
|
||||
var rl = real(c64) // float32
|
||||
var im = imag(a) // float64
|
||||
const c = imag(b) // untyped constant -1.4
|
||||
_ = imag(3 << s) // illegal: 3 has complex type, cannot shift
|
||||
</pre>
|
||||
|
||||
<h3 id="Handling_panics">Handling panics</h3>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
|
||||
The design is licensed under the Creative Commons 3.0 Attributions license.
|
||||
Read this article for more details: https://blog.golang.org/gopher
|
||||
Read this article for more details: http://blog.golang.org/gopher
|
||||
|
||||
@@ -1,62 +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>
|
||||
Search the <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a>
|
||||
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="//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 an alternate 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 the official 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>
|
||||
@@ -64,15 +48,3 @@ 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
|
||||
and a reporting process for handling issues.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -26,64 +26,38 @@ packages, though, read on.
|
||||
<p>
|
||||
There are two official Go compiler tool chains.
|
||||
This document focuses on the <code>gc</code> Go
|
||||
compiler and tools.
|
||||
compiler and tools (<code>6g</code>, <code>8g</code> etc.).
|
||||
For information on how to work on <code>gccgo</code>, a more traditional
|
||||
compiler using the GCC back end, see
|
||||
<a href="/doc/install/gccgo">Setting up and using gccgo</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Go compilers support seven instruction sets.
|
||||
The Go compilers support three instruction sets.
|
||||
There are important differences in the quality of the compilers for the different
|
||||
architectures.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<code>amd64</code> (also known as <code>x86-64</code>)
|
||||
<code>amd64</code> (a.k.a. <code>x86-64</code>); <code>6g,6l,6c,6a</code>
|
||||
</dt>
|
||||
<dd>
|
||||
A mature implementation. New in 1.7 is its SSA-based back end
|
||||
that generates compact, efficient code.
|
||||
</dd>
|
||||
<dt>
|
||||
<code>386</code> (<code>x86</code> or <code>x86-32</code>)
|
||||
</dt>
|
||||
<dd>
|
||||
Comparable to the <code>amd64</code> port, but does
|
||||
not yet use the SSA-based back end. It has an effective
|
||||
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>arm</code> (<code>ARM</code>)
|
||||
<code>386</code> (a.k.a. <code>x86</code> or <code>x86-32</code>); <code>8g,8l,8c,8a</code>
|
||||
</dt>
|
||||
<dd>
|
||||
Supports Linux, FreeBSD, NetBSD and Darwin binaries. Less widely used than the other ports.
|
||||
Comparable to the <code>amd64</code> port.
|
||||
</dd>
|
||||
<dt>
|
||||
<code>arm64</code> (<code>AArch64</code>)
|
||||
<code>arm</code> (a.k.a. <code>ARM</code>); <code>5g,5l,5c,5a</code>
|
||||
</dt>
|
||||
<dd>
|
||||
Supports Linux and Darwin binaries. New in 1.5 and not as well exercised 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>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, FreeBSD and NetBSD binaries. Less widely used than the other ports.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@@ -101,73 +75,16 @@ 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>
|
||||
<h2 id="ctools">Install C tools, if needed</h2>
|
||||
|
||||
<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>$HOME/go1.4</code>.
|
||||
(This path may be overridden by setting the <code>GOROOT_BOOTSTRAP</code>
|
||||
environment variable.)
|
||||
The Go tool chain is written in C. To build it, you need a C compiler installed.
|
||||
Please refer to the <a href="//golang.org/wiki/InstallFromSource#install-c-tools">InstallFromSource</a>
|
||||
page on the Go community Wiki for operating system specific instructions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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>
|
||||
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>
|
||||
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> and <code>linux/mips64le</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>
|
||||
When run as (for example)
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ GOOS=linux GOARCH=ppc64 ./bootstrap.bash
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<code>bootstrap.bash</code> cross-compiles a toolchain for that <code>GOOS/GOARCH</code>
|
||||
combination, leaving the resulting tree in <code>../../go-${GOOS}-${GOARCH}-bootstrap</code>.
|
||||
That tree can be copied to a machine of the given target type
|
||||
and used as <code>GOROOT_BOOTSTRAP</code> to bootstrap a local build.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To use gccgo, 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:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ sudo apt-get install gccgo-5
|
||||
$ sudo update-alternatives --set go /usr/bin/go-5
|
||||
$ GOROOT_BOOTSTRAP=/usr ./make.bash
|
||||
</pre>
|
||||
|
||||
<h2 id="git">Install Git, if needed</h2>
|
||||
|
||||
<p>
|
||||
@@ -181,40 +98,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.6</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><tag></i></span>
|
||||
$ git checkout go1.4.1
|
||||
</pre>
|
||||
|
||||
<p class="whereTag">
|
||||
Where <code><tag></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
|
||||
@@ -234,7 +131,7 @@ To build the Go distribution, run
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
$ cd src
|
||||
$ cd go/src
|
||||
$ ./all.bash
|
||||
</pre>
|
||||
|
||||
@@ -391,7 +288,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.6</code>.
|
||||
<code>go1.4</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -401,13 +298,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><tag></i></psan>
|
||||
$ git checkout <i><tag></i>
|
||||
$ ./all.bash
|
||||
</pre>
|
||||
|
||||
<p class="whereTag">
|
||||
Where <code><tag></code> is the version string of the release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="environment">Optional environment variables</h2>
|
||||
@@ -446,33 +341,25 @@ These default to the values of <code>$GOHOSTOS</code> and
|
||||
|
||||
<p>
|
||||
Choices for <code>$GOOS</code> are
|
||||
<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>darwin</code> (Mac OS X 10.6 and above), <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>386</code> (32-bit x86), and <code>arm</code> (32-bit ARM).
|
||||
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>
|
||||
<td></td><td><code>darwin</code></td> <td><code>amd64</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>darwin</code></td> <td><code>arm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>darwin</code></td> <td><code>arm64</code></td>
|
||||
<td></td><td><code>dragonfly</code></td> <td><code>386</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>dragonfly</code></td> <td><code>amd64</code></td>
|
||||
@@ -496,21 +383,6 @@ The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
|
||||
<td></td><td><code>linux</code></td> <td><code>arm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>linux</code></td> <td><code>arm64</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>linux</code></td> <td><code>ppc64</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>linux</code></td> <td><code>ppc64le</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>
|
||||
@@ -526,9 +398,6 @@ The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
|
||||
<td></td><td><code>openbsd</code></td> <td><code>amd64</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>openbsd</code></td> <td><code>arm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td><code>plan9</code></td> <td><code>386</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -544,7 +413,6 @@ The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
|
||||
<td></td><td><code>windows</code></td> <td><code>amd64</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<li><code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code>
|
||||
<p>
|
||||
@@ -574,7 +442,7 @@ installs all commands there.
|
||||
<li><code>$GO386</code> (for <code>386</code> only, default is auto-detected
|
||||
if built on either <code>386</code> or <code>amd64</code>, <code>387</code> otherwise)
|
||||
<p>
|
||||
This controls the code generated by gc to use either the 387 floating-point unit
|
||||
This controls the code generated by 8g to use either the 387 floating-point unit
|
||||
(set to <code>387</code>) or SSE2 instructions (set to <code>sse2</code>) for
|
||||
floating point computations.
|
||||
</p>
|
||||
|
||||
128
doc/install.html
128
doc/install.html
@@ -3,12 +3,10 @@
|
||||
"Path": "/doc/install"
|
||||
}-->
|
||||
|
||||
<div class="hideFromDownload">
|
||||
|
||||
<h2 id="download">Download the Go distribution</h2>
|
||||
|
||||
<p>
|
||||
<a href="https://golang.org/dl/" id="start" class="download">
|
||||
<a href="https://golang.org/dl/" id="start" class="download" target="_blank">
|
||||
<span class="big">Download Go</span>
|
||||
<span class="desc">Click here to visit the downloads page</span>
|
||||
</a>
|
||||
@@ -16,10 +14,9 @@
|
||||
|
||||
<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.7 and above), and Windows operating systems and
|
||||
the 32-bit (<code>386</code>) and 64-bit (<code>amd64</code>) x86 processor
|
||||
architectures.
|
||||
distributions</a> are available for the FreeBSD (release 8 and above), Linux, Mac OS X (Snow Leopard
|
||||
and above), and Windows operating systems and the 32-bit (<code>386</code>) and
|
||||
64-bit (<code>amd64</code>) x86 processor architectures.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -33,11 +30,11 @@ system and architecture, try
|
||||
<h2 id="requirements">System requirements</h2>
|
||||
|
||||
<p>
|
||||
Go binary distributions are available for these supported operating systems and architectures.
|
||||
Please ensure your system meets these requirements before proceeding.
|
||||
If your OS or architecture is not on the list, you may be able to
|
||||
<a href="/doc/install/source">install from source</a> or
|
||||
<a href="/doc/install/gccgo">use gccgo instead</a>.
|
||||
The <code>gc</code> compiler supports the following operating systems and
|
||||
architectures. Please ensure your system meets these requirements before
|
||||
proceeding. If your OS or architecture is not on the list, it's possible that
|
||||
<code>gccgo</code> might support your setup; see
|
||||
<a href="/doc/install/gccgo">Setting up and using gccgo</a> for details.
|
||||
</p>
|
||||
|
||||
<table class="codetable" frame="border" summary="requirements">
|
||||
@@ -47,9 +44,9 @@ 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</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</td></tr>
|
||||
<tr><td>Mac OS X 10.7 or later</td> <td>amd64</td> <td>use the clang or gcc<sup>†</sup> that comes with Xcode<sup>‡</sup></td></tr>
|
||||
<tr><td>FreeBSD 8 or later</td> <td>amd64, 386, arm</td> <td>Debian GNU/kFreeBSD not supported; FreeBSD/ARM needs FreeBSD 10 or later</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; no binary distribution for ARM yet</td></tr>
|
||||
<tr><td>Mac OS X 10.6 or later</td> <td>amd64, 386</td> <td>use the gcc<sup>†</sup> that comes with Xcode<sup>‡</sup></td></tr>
|
||||
<tr><td>Windows XP or later</td> <td>amd64, 386</td> <td>use MinGW gcc<sup>†</sup>. No need for cygwin or msys.</td></tr>
|
||||
</table>
|
||||
|
||||
@@ -62,8 +59,6 @@ installed Xcode 4.3+, you can install it from the Components tab of the
|
||||
Downloads preferences panel.
|
||||
</p>
|
||||
|
||||
</div><!-- hideFromDownload -->
|
||||
|
||||
|
||||
<h2 id="install">Install the Go tools</h2>
|
||||
|
||||
@@ -72,8 +67,6 @@ If you are upgrading from an older version of Go you must
|
||||
first <a href="#uninstall">remove the existing version</a>.
|
||||
</p>
|
||||
|
||||
<div id="tarballInstructions">
|
||||
|
||||
<h3 id="tarball">Linux, Mac OS X, and FreeBSD tarballs</h3>
|
||||
|
||||
<p>
|
||||
@@ -83,10 +76,10 @@ and extract it into <code>/usr/local</code>, creating a Go tree in
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
tar -C /usr/local -xzf <span class="downloadFilename">go$VERSION.$OS-$ARCH.tar.gz</span>
|
||||
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
|
||||
</pre>
|
||||
|
||||
<p class="hideFromDownload">
|
||||
<p>
|
||||
Choose the archive file appropriate for your installation.
|
||||
For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux,
|
||||
the archive you want is called <code>go1.2.1.linux-amd64.tar.gz</code>.
|
||||
@@ -131,10 +124,6 @@ export PATH=$PATH:$GOROOT/bin
|
||||
location.
|
||||
</p>
|
||||
|
||||
</div><!-- tarballInstructions -->
|
||||
|
||||
<div id="darwinPackageInstructions">
|
||||
|
||||
<h3 id="osx">Mac OS X package installer</h3>
|
||||
|
||||
<p>
|
||||
@@ -149,21 +138,15 @@ The package should put the <code>/usr/local/go/bin</code> directory in your
|
||||
Terminal sessions for the change to take effect.
|
||||
</p>
|
||||
|
||||
</div><!-- darwinPackageInstructions -->
|
||||
|
||||
<div id="windowsInstructions">
|
||||
|
||||
<h3 id="windows">Windows</h3>
|
||||
|
||||
<p class="hideFromDownload">
|
||||
<p>
|
||||
The Go project provides two installation options for Windows users
|
||||
(besides <a href="/doc/install/source">installing from source</a>):
|
||||
a zip archive that requires you to set some environment variables and an
|
||||
MSI installer that configures your installation automatically.
|
||||
</p>
|
||||
|
||||
<div id="windowsInstallerInstructions">
|
||||
|
||||
<h4 id="windows_msi">MSI installer</h4>
|
||||
|
||||
<p>
|
||||
@@ -178,10 +161,6 @@ The installer should put the <code>c:\Go\bin</code> directory in your
|
||||
command prompts for the change to take effect.
|
||||
</p>
|
||||
|
||||
</div><!-- windowsInstallerInstructions -->
|
||||
|
||||
<div id="windowsZipInstructions">
|
||||
|
||||
<h4 id="windows_zip">Zip archive</h4>
|
||||
|
||||
<p>
|
||||
@@ -197,8 +176,6 @@ you must set the <code>GOROOT</code> environment variable to your chosen path.
|
||||
Add the <code>bin</code> subdirectory of your Go root (for example, <code>c:\Go\bin</code>) to your <code>PATH</code> environment variable.
|
||||
</p>
|
||||
|
||||
</div><!-- windowsZipInstructions -->
|
||||
|
||||
<h4 id="windows_env">Setting environment variables under Windows</h4>
|
||||
|
||||
<p>
|
||||
@@ -208,48 +185,15 @@ versions of Windows provide this control panel through the "Advanced System
|
||||
Settings" option inside the "System" control panel.
|
||||
</p>
|
||||
|
||||
</div><!-- windowsInstructions -->
|
||||
|
||||
|
||||
<h2 id="testing">Test your installation</h2>
|
||||
|
||||
<p>
|
||||
Check that Go is installed correctly by setting up a workspace
|
||||
and building a simple program, as follows.
|
||||
Check that Go is installed correctly by building a simple program, as follows.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Create a directory to contain your <a href="code.html#Workspaces">workspace</a>,
|
||||
<code class="testUnix">$HOME/work</code>
|
||||
<code class="testWindows" style="display: none">C:\work</code>
|
||||
for example, and set the <code>GOPATH</code> environment
|
||||
variable to point to that location.
|
||||
</p>
|
||||
|
||||
<pre class="testUnix">
|
||||
$ <b>export GOPATH=$HOME/work</b>
|
||||
</pre>
|
||||
|
||||
<pre class="testWindows" style="display: none">
|
||||
C:\> <b>set GOPATH=C:\work</b>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
<span class="testUnix">
|
||||
You should put the above command in your shell startup script
|
||||
(<code>$HOME/.profile</code> for example).
|
||||
</span>
|
||||
<span class="testWindows">
|
||||
On Windows, follow the <a href="#windows_env">instructions above</a> to set the
|
||||
<code>GOPATH</code> environment variable on your system.
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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:
|
||||
Create a file named <code>hello.go</code> and put the following program in it:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -263,30 +207,11 @@ func main() {
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Then compile it with the <code>go</code> tool:
|
||||
Then run it with the <code>go</code> tool:
|
||||
</p>
|
||||
|
||||
<pre class="testUnix">
|
||||
$ <b>go install github.com/user/hello</b>
|
||||
</pre>
|
||||
|
||||
<pre class="testWindows" style="display: none">
|
||||
C:\> <b>go install github.com/user/hello</b>
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The command above 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>$GOPATH/bin/hello</b>
|
||||
hello, world
|
||||
</pre>
|
||||
|
||||
<pre class="testWindows" style="display: none">
|
||||
C:\> <b>%GOPATH%\bin\hello</b>
|
||||
<pre>
|
||||
$ go run hello.go
|
||||
hello, world
|
||||
</pre>
|
||||
|
||||
@@ -294,10 +219,17 @@ hello, world
|
||||
If you see the "hello, world" message then your Go installation is working.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 id="gopath">Set up your work environment</h2>
|
||||
|
||||
<p>
|
||||
Before rushing off to write Go code please read the
|
||||
<a href="/doc/code.html">How to Write Go Code</a> document,
|
||||
which describes some essential concepts about using the Go tools.
|
||||
You're almost done.
|
||||
You just need to set up your environment.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Read the <a href="/doc/code.html">How to Write Go Code</a> document,
|
||||
which provides <b>essential setup instructions</b> for using the Go tools.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
BIN
doc/logo-153x55.png
Normal file
BIN
doc/logo-153x55.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -3,9 +3,9 @@
|
||||
// (the nodes are the data).
|
||||
// http://en.wikipedia.org/wiki/Peano_axioms
|
||||
|
||||
// This program demonstrates that Go's automatic
|
||||
// stack management can handle heavily recursive
|
||||
// computations.
|
||||
// This program demonstrates the power of Go's
|
||||
// segmented stacks when doing massively
|
||||
// recursive computations.
|
||||
|
||||
package main
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// skip
|
||||
|
||||
// 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 rand
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// skip
|
||||
|
||||
// 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 rand2
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// skip
|
||||
|
||||
// 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 print
|
||||
|
||||
// #include <stdio.h>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// skip
|
||||
|
||||
// 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 print
|
||||
|
||||
// #include <stdio.h>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
3
doc/progs/defer.out
Normal file
3
doc/progs/defer.out
Normal file
@@ -0,0 +1,3 @@
|
||||
0
|
||||
3210
|
||||
2
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
12
doc/progs/defer2.out
Normal file
12
doc/progs/defer2.out
Normal file
@@ -0,0 +1,12 @@
|
||||
Calling g.
|
||||
Printing in g 0
|
||||
Printing in g 1
|
||||
Printing in g 2
|
||||
Printing in g 3
|
||||
Panicking!
|
||||
Defer in g 3
|
||||
Defer in g 2
|
||||
Defer in g 1
|
||||
Defer in g 0
|
||||
Recovered in f 4
|
||||
Returned normally from f.
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/eff_bytesize.out
Normal file
1
doc/progs/eff_bytesize.out
Normal file
@@ -0,0 +1 @@
|
||||
1.00YB 9.09TB
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/eff_sequence.out
Normal file
1
doc/progs/eff_sequence.out
Normal file
@@ -0,0 +1 @@
|
||||
[-1 2 6 16 44]
|
||||
@@ -1,3 +1,5 @@
|
||||
// skip
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// compile
|
||||
// this file will output a list of filenames in cwd, not suitable for cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/image_package1.out
Normal file
1
doc/progs/image_package1.out
Normal file
@@ -0,0 +1 @@
|
||||
X is 2 Y is 1
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/image_package2.out
Normal file
1
doc/progs/image_package2.out
Normal file
@@ -0,0 +1 @@
|
||||
3 4 false
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/image_package3.out
Normal file
1
doc/progs/image_package3.out
Normal file
@@ -0,0 +1 @@
|
||||
3 4 true
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/image_package4.out
Normal file
1
doc/progs/image_package4.out
Normal file
@@ -0,0 +1 @@
|
||||
image.Point{X:2, Y:1}
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/image_package5.out
Normal file
1
doc/progs/image_package5.out
Normal file
@@ -0,0 +1 @@
|
||||
{255 0 0 255}
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
2
doc/progs/image_package6.out
Normal file
2
doc/progs/image_package6.out
Normal file
@@ -0,0 +1,2 @@
|
||||
8 4
|
||||
true
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
1
doc/progs/interface2.out
Normal file
1
doc/progs/interface2.out
Normal file
@@ -0,0 +1 @@
|
||||
type: float64
|
||||
@@ -1,3 +1,5 @@
|
||||
// run
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// cmpout
|
||||
|
||||
// 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.
|
||||
|
||||
2
doc/progs/json2.out
Normal file
2
doc/progs/json2.out
Normal file
@@ -0,0 +1,2 @@
|
||||
the circle's area 24.227111172875365
|
||||
the reciprocal of i is 0.3601008282319049
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// run
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// compile
|
||||
|
||||
// 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.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user