├── VERSION ├── api └── next.txt ├── test ├── fixedbugs │ ├── bug328.out │ ├── bug191.out │ ├── bug206.out │ ├── bug409.out │ ├── issue4326.dir │ │ ├── p2.go │ │ ├── z.go │ │ ├── q1.go │ │ ├── q2.go │ │ └── p1.go │ ├── bug467.dir │ │ ├── p3.go │ │ ├── p2.go │ │ └── p1.go │ ├── issue4879.dir │ │ └── b.go │ ├── bug088.go │ ├── bug106.go │ ├── bug222.go │ ├── bug282.go │ ├── bug306.go │ ├── bug160.go │ ├── bug392.go │ ├── bug396.go │ ├── bug404.go │ ├── bug407.go │ ├── bug083.go │ ├── bug133.go │ ├── bug448.go │ ├── issue4510.dir │ │ ├── f2.go │ │ └── f1.go │ ├── bug106.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug222.dir │ │ ├── chanbug2.go │ │ └── chanbug.go │ ├── bug282.dir │ │ ├── p2.go │ │ └── p1.go │ ├── bug306.dir │ │ ├── p2.go │ │ └── p1.go │ ├── issue4510.go │ ├── issue4932.dir │ │ ├── foo.go │ │ └── state2.go │ ├── issue5260.dir │ │ ├── a.go │ │ └── b.go │ ├── bug377.dir │ │ ├── two.go │ │ └── one.go │ ├── bug382.dir │ │ ├── pkg.go │ │ └── prog.go │ ├── bug063.go │ ├── bug133.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug468.dir │ │ └── p1.go │ ├── bug050.go │ ├── bug160.dir │ │ └── x.go │ ├── issue5105.dir │ │ └── a.go │ ├── bug322.go │ ├── bug460.dir │ │ ├── a.go │ │ └── b.go │ ├── bug232.go │ ├── bug335.dir │ │ ├── b.go │ │ └── a.go │ ├── bug335.go │ ├── bug377.go │ ├── bug382.go │ ├── issue5291.go │ ├── bug083.dir │ │ └── bug0.go │ ├── bug415.dir │ │ ├── prog.go │ │ └── p.go │ ├── bug169.go │ ├── bug191.go │ ├── bug224.go │ ├── issue5125.dir │ │ └── main.go │ ├── bug191.dir │ │ ├── b.go │ │ ├── a.go │ │ └── main.go │ ├── bug313.dir │ │ ├── b.go │ │ └── a.go │ ├── bug233.go │ ├── bug437.dir │ │ ├── two.go │ │ └── one.go │ ├── issue3705.go │ ├── bug163.go │ ├── bug174.go │ ├── bug181.go │ ├── bug037.go │ ├── bug065.go │ ├── bug072.go │ ├── bug088.dir │ │ └── bug0.go │ ├── bug104.go │ ├── bug132.go │ ├── bug241.go │ ├── bug422.go │ ├── bug472.dir │ │ └── z.go │ ├── issue4517a.go │ ├── issue4517b.go │ ├── issue4517c.go │ ├── bug021.go │ ├── bug248.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug396.dir │ │ ├── one.go │ │ └── two.go │ ├── bug415.go │ ├── issue3783.go │ ├── issue4326.go │ ├── issue4932.go │ ├── bug414.go │ ├── bug048.go │ ├── bug077.go │ ├── bug182.go │ ├── bug448.dir │ │ ├── pkg1.go │ │ └── pkg2.go │ ├── issue5259.go │ ├── bug108.go │ ├── bug129.go │ ├── bug318.go │ ├── bug367.go │ ├── issue4370.dir │ │ ├── p3.go │ │ └── p2.go │ ├── issue4370.go │ ├── bug030.go │ ├── bug172.go │ ├── bug328.go │ ├── bug376.go │ ├── bug380.go │ ├── bug432.go │ ├── bug465.go │ ├── issue4097.go │ ├── bug062.go │ ├── bug074.go │ ├── bug115.go │ ├── bug192.go │ ├── bug445.go │ ├── bug451.go │ ├── bug460.go │ ├── bug472.go │ ├── issue5105.go │ ├── bug039.go │ ├── bug171.go │ ├── bug198.go │ ├── bug466.go │ ├── issue3552.go │ ├── issue4590.go │ ├── issue4964.go │ ├── bug002.go │ ├── bug015.go │ ├── bug040.go │ ├── bug053.go │ ├── bug078.go │ ├── bug202.go │ ├── bug420.go │ ├── bug426.go │ ├── issue4879.go │ ├── bug051.go │ ├── bug067.go │ ├── bug118.go │ ├── bug351.go │ ├── bug391.go │ ├── bug399.go │ ├── issue5125.go │ ├── issue5260.go │ ├── bug131.go │ ├── bug287.go │ ├── bug298.go │ ├── bug322.dir │ │ └── lib.go │ ├── bug394.go │ ├── bug467.go │ ├── bug468.go │ ├── bug122.go │ ├── bug123.go │ ├── bug188.go │ ├── bug004.go │ ├── bug235.go │ ├── issue5259.dir │ │ └── main.go │ ├── bug103.go │ ├── bug145.go │ ├── bug175.go │ ├── bug280.go │ ├── bug345.dir │ │ └── io.go │ ├── bug081.go │ ├── bug165.go │ ├── bug186.go │ ├── bug419.go │ ├── issue4429.go │ ├── bug164.go │ └── bug369.dir │ │ └── pkg.go ├── helloworld.out ├── sigchld.out ├── bench │ └── shootout │ │ ├── threadring.txt │ │ ├── spectral-norm.txt │ │ ├── nbody.txt │ │ ├── pidigits.txt │ │ ├── mandelbrot.txt │ │ ├── regex-dna.txt │ │ ├── binary-tree.txt │ │ ├── regex-dna-parallel.txt │ │ └── binary-tree-freelist.txt ├── printbig.out ├── ken │ ├── string.out │ └── cplx0.out ├── dwarf │ ├── dwarf.dir │ │ ├── z11.go │ │ ├── z12.go │ │ ├── z13.go │ │ ├── z14.go │ │ ├── z15.go │ │ ├── z16.go │ │ ├── z17.go │ │ ├── z19.go │ │ ├── z2.go │ │ ├── z20.go │ │ ├── z3.go │ │ ├── z4.go │ │ ├── z5.go │ │ ├── z6.go │ │ ├── z7.go │ │ ├── z8.go │ │ ├── z9.go │ │ ├── z1.go │ │ ├── z18.go │ │ └── z10.go │ └── dwarf.go ├── goprint.out ├── bugs │ └── placeholder ├── deferprint.out ├── method4.go ├── import4.dir │ └── empty.go ├── import2.go ├── ddd2.go ├── interface │ ├── embed1.go │ ├── recursive1.go │ └── private.go ├── safe │ ├── usesafe.go │ └── nousesafe.go ├── syntax │ ├── import.go │ ├── semi5.go │ ├── semi6.go │ ├── composite.go │ ├── forvar.go │ ├── interface.go │ ├── semi2.go │ ├── typesw.go │ ├── else.go │ ├── vareq.go │ └── vareq1.go ├── helloworld.go ├── rotate0.go ├── rotate1.go ├── rotate2.go ├── rotate3.go ├── golden.out ├── eof.go ├── index0.go ├── import4.go ├── index1.go └── index2.go ├── misc ├── goplay │ ├── README │ └── Makefile ├── cgo │ ├── stdio │ │ ├── hello.out │ │ └── hello.go │ ├── test │ │ ├── backdoor │ │ │ └── backdoor.go │ │ ├── cgo_linux_test.go │ │ ├── issue4029w.go │ │ ├── exports.go │ │ └── issue4273.c │ ├── testso │ │ ├── main.go │ │ ├── test.bash │ │ └── cgoso.c │ ├── life │ │ ├── life.h │ │ └── main.out │ └── testtls │ │ ├── tls_test.go │ │ └── tls_unix.c ├── dist │ ├── darwin │ │ ├── etc │ │ │ └── paths.d │ │ │ │ └── go │ │ ├── Resources │ │ │ └── bg.png │ │ └── scripts │ │ │ └── preinstall │ └── windows │ │ └── images │ │ ├── Banner.jpg │ │ ├── Dialog.jpg │ │ ├── gopher.ico │ │ └── DialogLeft.jpg ├── dashboard │ ├── codereview │ │ ├── queue.yaml │ │ ├── cron.yaml │ │ └── static │ │ │ ├── icon.png │ │ │ └── gopherstamp.jpg │ ├── app │ │ ├── static │ │ │ ├── status_alert.gif │ │ │ └── status_good.gif │ │ └── build │ │ │ └── notify.txt │ └── builder │ │ └── Makefile ├── chrome │ └── gophertool │ │ ├── gopher.png │ │ ├── README.txt │ │ ├── background.js │ │ └── background.html ├── xcode │ ├── 3 │ │ └── README │ └── 4 │ │ └── README ├── notepadplus │ └── README └── swig │ └── callback │ └── callback.go ├── doc ├── progs │ ├── defer.out │ ├── image_package2.out │ ├── image_package3.out │ ├── interface2.out │ ├── eff_bytesize.out │ ├── eff_sequence.out │ ├── image_package1.out │ ├── image_package5.out │ ├── image_package6.out │ ├── image_package4.out │ ├── json2.out │ ├── defer2.out │ └── eff_unused1.go ├── articles │ ├── wiki │ │ ├── test_Test.txt.good │ │ ├── test_view.good │ │ ├── view.html │ │ ├── test_edit.good │ │ ├── edit.html │ │ └── http-sample.go │ ├── image-20.png │ ├── image-2a.png │ ├── image-2b.png │ ├── image-2c.png │ ├── image-2d.png │ ├── image-2e.png │ ├── image-2f.png │ ├── slice-1.png │ ├── slice-2.png │ ├── slice-3.png │ ├── slice-array.png │ ├── slice-struct.png │ ├── image-package-01.png │ ├── image-package-02.png │ ├── image-package-03.png │ ├── image-package-04.png │ ├── image-package-05.png │ └── index.html ├── ie.css ├── share.png ├── sieve.gif ├── gopher │ ├── doc.png │ ├── pkg.png │ ├── ref.png │ ├── run.png │ ├── help.png │ ├── talks.png │ ├── bumper.png │ ├── gopherbw.png │ ├── project.png │ ├── frontpage.png │ ├── appenginelogo.gif │ ├── bumper192x108.png │ ├── bumper320x180.png │ ├── bumper480x270.png │ ├── bumper640x360.png │ ├── gophercolor.png │ ├── appenginegopher.jpg │ ├── gophercolor16x16.png │ ├── pencil │ │ ├── gopherhat.jpg │ │ ├── gophermega.jpg │ │ ├── gopherswim.jpg │ │ ├── gopherhelmet.jpg │ │ ├── gopherrunning.jpg │ │ └── gopherswrench.jpg │ └── appenginegophercolor.jpg ├── go-logo-blue.png ├── logo-153x55.png ├── codewalk │ └── popout.png ├── go-logo-black.png ├── go-logo-white.png └── play │ └── hello.go ├── src ├── pkg │ ├── archive │ │ ├── tar │ │ │ └── testdata │ │ │ │ ├── small.txt │ │ │ │ ├── small2.txt │ │ │ │ ├── v7.tar │ │ │ │ └── writer-big.tar │ │ └── zip │ │ │ └── testdata │ │ │ ├── dd.zip │ │ │ ├── test.zip │ │ │ ├── unix.zip │ │ │ ├── winxp.zip │ │ │ ├── zip64.zip │ │ │ ├── readme.zip │ │ │ ├── symlink.zip │ │ │ ├── readme.notzip │ │ │ ├── gophercolor16x16.png │ │ │ ├── crc32-not-streamed.zip │ │ │ ├── go-no-datadesc-sig.zip │ │ │ ├── go-with-datadesc-sig.zip │ │ │ └── test-trailing-junk.zip │ ├── net │ │ ├── http │ │ │ └── testdata │ │ │ │ ├── file │ │ │ │ ├── style.css │ │ │ │ └── index.html │ │ ├── dial_gen_test.go │ │ ├── cgo_netbsd.go │ │ ├── cgo_openbsd.go │ │ └── empty.c │ ├── syscall │ │ ├── zsysnum_windows_386.go │ │ ├── zsysnum_windows_amd64.go │ │ ├── syscall_windows_386.go │ │ ├── syscall_windows_amd64.go │ │ ├── zerrors_windows_386.go │ │ ├── zerrors_windows_amd64.go │ │ ├── asm_windows_386.s │ │ └── asm_windows_amd64.s │ ├── text │ │ └── template │ │ │ └── testdata │ │ │ ├── tmpl1.tmpl │ │ │ ├── tmpl2.tmpl │ │ │ ├── file1.tmpl │ │ │ └── file2.tmpl │ ├── go │ │ ├── build │ │ │ ├── testdata │ │ │ │ └── other │ │ │ │ │ ├── file │ │ │ │ │ └── file.go │ │ │ │ │ └── main.go │ │ │ └── syslist.go │ │ ├── printer │ │ │ └── testdata │ │ │ │ ├── empty.input │ │ │ │ └── empty.golden │ │ └── doc │ │ │ ├── Makefile │ │ │ └── testdata │ │ │ ├── f.0.golden │ │ │ ├── f.2.golden │ │ │ ├── a1.go │ │ │ └── f.1.golden │ ├── runtime │ │ ├── zgoarch_386.go │ │ ├── zgoos_windows.go │ │ ├── race │ │ │ ├── race_darwin_amd64.syso │ │ │ ├── race_linux_amd64.syso │ │ │ └── race_windows_amd64.syso │ │ ├── zversion.go │ │ ├── signals_windows.h │ │ ├── Makefile │ │ ├── arch_386.h │ │ ├── arch_arm.h │ │ ├── arch_amd64.h │ │ ├── rt0_freebsd_arm.s │ │ ├── rt0_netbsd_arm.s │ │ └── cgo │ │ │ └── setenv.c │ ├── image │ │ ├── testdata │ │ │ ├── video-001.gif │ │ │ ├── video-001.jpeg │ │ │ ├── video-001.png │ │ │ ├── video-001.5bpp.gif │ │ │ ├── video-005.gray.jpeg │ │ │ ├── video-005.gray.png │ │ │ ├── video-001.q50.420.jpeg │ │ │ ├── video-001.q50.422.jpeg │ │ │ ├── video-001.q50.440.jpeg │ │ │ ├── video-001.q50.444.jpeg │ │ │ ├── video-001.interlaced.gif │ │ │ ├── video-005.gray.q50.jpeg │ │ │ ├── video-001.progressive.jpeg │ │ │ ├── video-005.gray.q50.2x2.jpeg │ │ │ ├── video-001.q50.420.progressive.jpeg │ │ │ ├── video-001.q50.422.progressive.jpeg │ │ │ ├── video-001.q50.440.progressive.jpeg │ │ │ ├── video-001.q50.444.progressive.jpeg │ │ │ ├── video-005.gray.q50.progressive.jpeg │ │ │ └── video-005.gray.q50.2x2.progressive.jpeg │ │ └── png │ │ │ └── testdata │ │ │ ├── benchGray.png │ │ │ ├── benchRGB.png │ │ │ ├── invalid-zlib.png │ │ │ ├── benchPaletted.png │ │ │ ├── invalid-crc32.png │ │ │ ├── invalid-noend.png │ │ │ ├── invalid-trunc.png │ │ │ ├── benchNRGBA-opaque.png │ │ │ ├── pngsuite │ │ │ ├── basn0g01.png │ │ │ ├── basn0g02.png │ │ │ ├── basn0g04.png │ │ │ ├── basn0g08.png │ │ │ ├── basn0g16.png │ │ │ ├── basn2c08.png │ │ │ ├── basn2c16.png │ │ │ ├── basn3p01.png │ │ │ ├── basn3p02.png │ │ │ ├── basn3p04.png │ │ │ ├── basn3p08.png │ │ │ ├── basn4a08.png │ │ │ ├── basn4a16.png │ │ │ ├── basn6a08.png │ │ │ ├── basn6a16.png │ │ │ ├── basn0g01-30.png │ │ │ ├── basn0g02-29.png │ │ │ ├── basn0g04-31.png │ │ │ └── basn3p08-trns.png │ │ │ └── benchNRGBA-gradient.png │ ├── debug │ │ ├── dwarf │ │ │ └── testdata │ │ │ │ ├── typedef.elf │ │ │ │ └── typedef.macho │ │ ├── pe │ │ │ └── testdata │ │ │ │ ├── hello.c │ │ │ │ ├── gcc-386-mingw-obj │ │ │ │ └── gcc-386-mingw-exec │ │ ├── macho │ │ │ └── testdata │ │ │ │ ├── hello.c │ │ │ │ ├── gcc-386-darwin-exec │ │ │ │ ├── gcc-amd64-darwin-exec │ │ │ │ └── gcc-amd64-darwin-exec-debug │ │ ├── gosym │ │ │ └── pclinetest.h │ │ └── elf │ │ │ └── testdata │ │ │ ├── gcc-386-freebsd-exec │ │ │ ├── gcc-amd64-linux-exec │ │ │ ├── hello-world-core.gz │ │ │ ├── go-relocation-test-gcc441-x86.obj │ │ │ ├── go-relocation-test-gcc424-x86-64.obj │ │ │ ├── go-relocation-test-gcc441-x86-64.obj │ │ │ └── gcc-amd64-openbsd-debug-with-rela.obj │ ├── encoding │ │ └── json │ │ │ └── testdata │ │ │ └── code.json.gz │ ├── crypto │ │ ├── ecdsa │ │ │ └── testdata │ │ │ │ └── SigVer.rsp.bz2 │ │ ├── md5 │ │ │ └── md5block_decl.go │ │ └── sha1 │ │ │ └── sha1block_decl.go │ ├── regexp │ │ └── testdata │ │ │ └── re2-exhaustive.txt.bz2 │ ├── math │ │ ├── exp_arm.s │ │ ├── log_arm.s │ │ ├── mod_arm.s │ │ ├── tan_arm.s │ │ ├── atan_arm.s │ │ ├── exp2_arm.s │ │ ├── mod_amd64.s │ │ ├── modf_arm.s │ │ ├── tan_amd64.s │ │ ├── atan2_amd64.s │ │ ├── atan2_arm.s │ │ ├── atan_amd64.s │ │ ├── exp2_amd64.s │ │ ├── expm1_amd64.s │ │ ├── expm1_arm.s │ │ ├── frexp_amd64.s │ │ ├── frexp_arm.s │ │ ├── hypot_arm.s │ │ ├── ldexp_amd64.s │ │ ├── ldexp_arm.s │ │ ├── log1p_amd64.s │ │ ├── log1p_arm.s │ │ ├── modf_amd64.s │ │ ├── sincos_arm.s │ │ ├── remainder_arm.s │ │ ├── remainder_amd64.s │ │ ├── sin_arm.s │ │ ├── asin_arm.s │ │ ├── sin_amd64.s │ │ ├── asin_amd64.s │ │ ├── log10_arm.s │ │ ├── log10_amd64.s │ │ ├── sqrt_amd64.s │ │ ├── dim_arm.s │ │ ├── sqrt_386.s │ │ ├── dim_386.s │ │ ├── sqrt_arm.s │ │ ├── cmplx │ │ │ └── conj.go │ │ ├── floor_arm.s │ │ ├── export_test.go │ │ ├── abs_386.s │ │ ├── abs_arm.s │ │ └── signbit.go │ ├── fmt │ │ └── export_test.go │ ├── os │ │ └── export_test.go │ ├── mime │ │ └── testdata │ │ │ └── test.types │ ├── sort │ │ └── export_test.go │ ├── sync │ │ └── export_test.go │ └── log │ │ └── syslog │ │ ├── syslog_plan9.go │ │ └── syslog_windows.go ├── cmd │ ├── gofmt │ │ └── testdata │ │ │ ├── stdin1.golden │ │ │ ├── stdin1.input │ │ │ ├── stdin1.golden.gofmt │ │ │ ├── stdin1.input.gofmt │ │ │ ├── stdin4.golden │ │ │ ├── stdin4.input │ │ │ ├── stdin4.golden.gofmt │ │ │ ├── stdin4.input.gofmt │ │ │ ├── old.input │ │ │ ├── stdin3.input │ │ │ ├── old.golden │ │ │ ├── stdin2.golden.gofmt │ │ │ ├── stdin3.golden │ │ │ ├── stdin3.golden.gofmt │ │ │ ├── stdin3.input.gofmt │ │ │ ├── comments.golden │ │ │ ├── comments.input │ │ │ ├── stdin2.input │ │ │ ├── stdin2.golden │ │ │ ├── stdin2.input.gofmt │ │ │ ├── crlf.golden │ │ │ ├── crlf.input │ │ │ ├── rewrite1.golden │ │ │ ├── rewrite1.input │ │ │ ├── rewrite8.golden │ │ │ └── rewrite8.input │ ├── go │ │ ├── testdata │ │ │ ├── testimport │ │ │ │ ├── p.go │ │ │ │ ├── p1 │ │ │ │ │ └── p1.go │ │ │ │ ├── p2 │ │ │ │ │ └── p2.go │ │ │ │ ├── p_test.go │ │ │ │ └── x_test.go │ │ │ ├── local │ │ │ │ ├── hard.go │ │ │ │ ├── easy.go │ │ │ │ ├── sub │ │ │ │ │ ├── sub │ │ │ │ │ │ └── subsub.go │ │ │ │ │ └── sub.go │ │ │ │ └── easysub │ │ │ │ │ ├── easysub.go │ │ │ │ │ └── main.go │ │ │ └── src │ │ │ │ └── go-cmd-test │ │ │ │ └── helloworld.go │ │ ├── mkdoc.sh │ │ ├── signal_notunix.go │ │ └── go11.go │ ├── api │ │ └── testdata │ │ │ └── src │ │ │ └── pkg │ │ │ ├── p3 │ │ │ ├── p3.go │ │ │ └── golden.txt │ │ │ └── p2 │ │ │ ├── p2.go │ │ │ └── golden.txt │ ├── 5c │ │ └── Makefile │ ├── 5g │ │ └── Makefile │ ├── 5l │ │ └── Makefile │ ├── 6c │ │ └── Makefile │ ├── 6g │ │ └── Makefile │ ├── 6l │ │ └── Makefile │ ├── 8c │ │ └── Makefile │ ├── 8g │ │ └── Makefile │ ├── 8l │ │ └── Makefile │ ├── nm │ │ └── Makefile │ ├── pack │ │ └── Makefile │ ├── 5a │ │ └── Makefile │ ├── 6a │ │ └── Makefile │ ├── 8a │ │ └── Makefile │ ├── cc │ │ └── Makefile │ └── yacc │ │ └── Makefile ├── lib9 │ ├── Makefile │ └── win.h ├── libbio │ └── Makefile └── libmach │ └── Makefile ├── robots.txt ├── include ├── utf.h └── plan9 │ ├── mach.h │ ├── ureg_arm.h │ ├── ureg_x86.h │ └── ureg_amd64.h ├── favicon.ico ├── lib ├── time │ └── zoneinfo.zip └── godoc │ └── error.html └── README.md /VERSION: -------------------------------------------------------------------------------- 1 | go1.1 -------------------------------------------------------------------------------- /api/next.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixedbugs/bug328.out: -------------------------------------------------------------------------------- 1 | 0x0 2 | -------------------------------------------------------------------------------- /misc/goplay/README: -------------------------------------------------------------------------------- 1 | See doc.go. 2 | -------------------------------------------------------------------------------- /test/fixedbugs/bug191.out: -------------------------------------------------------------------------------- 1 | b 2 | a 3 | -------------------------------------------------------------------------------- /test/fixedbugs/bug206.out: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | -------------------------------------------------------------------------------- /test/helloworld.out: -------------------------------------------------------------------------------- 1 | hello, world 2 | -------------------------------------------------------------------------------- /test/sigchld.out: -------------------------------------------------------------------------------- 1 | survived SIGCHLD 2 | -------------------------------------------------------------------------------- /doc/progs/defer.out: -------------------------------------------------------------------------------- 1 | 0 2 | 3210 3 | 2 4 | -------------------------------------------------------------------------------- /doc/progs/image_package2.out: -------------------------------------------------------------------------------- 1 | 3 4 false 2 | -------------------------------------------------------------------------------- /doc/progs/image_package3.out: -------------------------------------------------------------------------------- 1 | 3 4 true 2 | -------------------------------------------------------------------------------- /doc/progs/interface2.out: -------------------------------------------------------------------------------- 1 | type: float64 2 | -------------------------------------------------------------------------------- /misc/cgo/stdio/hello.out: -------------------------------------------------------------------------------- 1 | hello, world 2 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/small.txt: -------------------------------------------------------------------------------- 1 | Kilts -------------------------------------------------------------------------------- /test/bench/shootout/threadring.txt: -------------------------------------------------------------------------------- 1 | 498 2 | -------------------------------------------------------------------------------- /doc/articles/wiki/test_Test.txt.good: -------------------------------------------------------------------------------- 1 | some content -------------------------------------------------------------------------------- /doc/ie.css: -------------------------------------------------------------------------------- 1 | #nav-main li { display: inline; } 2 | -------------------------------------------------------------------------------- /doc/progs/eff_bytesize.out: -------------------------------------------------------------------------------- 1 | 1.00YB 9.09TB 2 | -------------------------------------------------------------------------------- /doc/progs/eff_sequence.out: -------------------------------------------------------------------------------- 1 | [-1 2 6 16 44] 2 | -------------------------------------------------------------------------------- /doc/progs/image_package1.out: -------------------------------------------------------------------------------- 1 | X is 2 Y is 1 2 | -------------------------------------------------------------------------------- /doc/progs/image_package5.out: -------------------------------------------------------------------------------- 1 | {255 0 0 255} 2 | -------------------------------------------------------------------------------- /doc/progs/image_package6.out: -------------------------------------------------------------------------------- 1 | 8 4 2 | true 3 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /src/pkg/net/http/testdata/file: -------------------------------------------------------------------------------- 1 | 0123456789 2 | -------------------------------------------------------------------------------- /src/pkg/net/http/testdata/style.css: -------------------------------------------------------------------------------- 1 | body {} 2 | -------------------------------------------------------------------------------- /include/utf.h: -------------------------------------------------------------------------------- 1 | #include "../src/lib9/utf/utf.h" 2 | -------------------------------------------------------------------------------- /misc/dist/darwin/etc/paths.d/go: -------------------------------------------------------------------------------- 1 | /usr/local/go/bin 2 | -------------------------------------------------------------------------------- /test/bench/shootout/spectral-norm.txt: -------------------------------------------------------------------------------- 1 | 1.274224152 2 | -------------------------------------------------------------------------------- /doc/progs/image_package4.out: -------------------------------------------------------------------------------- 1 | image.Point{X:2, Y:1} 2 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/small2.txt: -------------------------------------------------------------------------------- 1 | Google.com 2 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin1.golden: -------------------------------------------------------------------------------- 1 | if x { 2 | y 3 | } 4 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin1.input: -------------------------------------------------------------------------------- 1 | if x { 2 | y 3 | } 4 | -------------------------------------------------------------------------------- /src/pkg/net/http/testdata/index.html: -------------------------------------------------------------------------------- 1 | index.html says hello 2 | -------------------------------------------------------------------------------- /test/bench/shootout/nbody.txt: -------------------------------------------------------------------------------- 1 | -0.169075164 2 | -0.169087605 3 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin1.golden.gofmt: -------------------------------------------------------------------------------- 1 | if x { 2 | y 3 | } 4 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin1.input.gofmt: -------------------------------------------------------------------------------- 1 | if x { 2 | y 3 | } 4 | -------------------------------------------------------------------------------- /test/printbig.out: -------------------------------------------------------------------------------- 1 | -9223372036854775808 2 | 9223372036854775807 3 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin4.golden: -------------------------------------------------------------------------------- 1 | // comment 2 | 3 | i := 0 4 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin4.input: -------------------------------------------------------------------------------- 1 | // comment 2 | 3 | i := 0 4 | -------------------------------------------------------------------------------- /test/ken/string.out: -------------------------------------------------------------------------------- 1 | abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz 2 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin4.golden.gofmt: -------------------------------------------------------------------------------- 1 | // comment 2 | 3 | i := 0 4 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin4.input.gofmt: -------------------------------------------------------------------------------- 1 | // comment 2 | 3 | i := 0 4 | -------------------------------------------------------------------------------- /doc/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/share.png -------------------------------------------------------------------------------- /doc/sieve.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/sieve.gif -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/favicon.ico -------------------------------------------------------------------------------- /src/cmd/go/testdata/testimport/p.go: -------------------------------------------------------------------------------- 1 | package p 2 | 3 | func F() int { return 1 } 4 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z11.go: -------------------------------------------------------------------------------- 1 | 2 | //line x11.go:4 3 | package main 4 | func F11() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z12.go: -------------------------------------------------------------------------------- 1 | 2 | //line x12.go:4 3 | package main 4 | func F12() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z13.go: -------------------------------------------------------------------------------- 1 | 2 | //line x13.go:4 3 | package main 4 | func F13() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z14.go: -------------------------------------------------------------------------------- 1 | 2 | //line x14.go:4 3 | package main 4 | func F14() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z15.go: -------------------------------------------------------------------------------- 1 | 2 | //line x15.go:4 3 | package main 4 | func F15() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z16.go: -------------------------------------------------------------------------------- 1 | 2 | //line x16.go:4 3 | package main 4 | func F16() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z17.go: -------------------------------------------------------------------------------- 1 | 2 | //line x17.go:4 3 | package main 4 | func F17() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z19.go: -------------------------------------------------------------------------------- 1 | 2 | //line x19.go:4 3 | package main 4 | func F19() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z2.go: -------------------------------------------------------------------------------- 1 | 2 | //line x2.go:4 3 | package main 4 | func F2() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z20.go: -------------------------------------------------------------------------------- 1 | 2 | //line x20.go:4 3 | package main 4 | func F20() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z3.go: -------------------------------------------------------------------------------- 1 | 2 | //line x3.go:4 3 | package main 4 | func F3() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z4.go: -------------------------------------------------------------------------------- 1 | 2 | //line x4.go:4 3 | package main 4 | func F4() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z5.go: -------------------------------------------------------------------------------- 1 | 2 | //line x5.go:4 3 | package main 4 | func F5() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z6.go: -------------------------------------------------------------------------------- 1 | 2 | //line x6.go:4 3 | package main 4 | func F6() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z7.go: -------------------------------------------------------------------------------- 1 | 2 | //line x7.go:4 3 | package main 4 | func F7() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z8.go: -------------------------------------------------------------------------------- 1 | 2 | //line x8.go:4 3 | package main 4 | func F8() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z9.go: -------------------------------------------------------------------------------- 1 | 2 | //line x9.go:4 3 | package main 4 | func F9() {} 5 | -------------------------------------------------------------------------------- /test/goprint.out: -------------------------------------------------------------------------------- 1 | 42 true false true +1.500000e+000 world 0x0 [0/0]0x0 0x0 0x0 255 2 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/testimport/p1/p1.go: -------------------------------------------------------------------------------- 1 | package p1 2 | 3 | func F() int { return 1 } 4 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/testimport/p2/p2.go: -------------------------------------------------------------------------------- 1 | package p2 2 | 3 | func F() int { return 1 } 4 | -------------------------------------------------------------------------------- /src/pkg/syscall/zsysnum_windows_386.go: -------------------------------------------------------------------------------- 1 | // nothing to see here 2 | 3 | package syscall 4 | -------------------------------------------------------------------------------- /src/pkg/syscall/zsysnum_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // nothing to see here 2 | 3 | package syscall 4 | -------------------------------------------------------------------------------- /test/bench/shootout/pidigits.txt: -------------------------------------------------------------------------------- 1 | 3141592653 :10 2 | 5897932384 :20 3 | 6264338 :27 4 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z1.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | //line x1.go:4 4 | package main 5 | func F1() {} 6 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z18.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | //line x18.go:4 4 | package main 5 | func F18() {} 6 | -------------------------------------------------------------------------------- /test/fixedbugs/bug409.out: -------------------------------------------------------------------------------- 1 | +1.000000e+000 +2.000000e+000 +3.000000e+000 +4.000000e+000 2 | -------------------------------------------------------------------------------- /doc/gopher/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/doc.png -------------------------------------------------------------------------------- /doc/gopher/pkg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pkg.png -------------------------------------------------------------------------------- /doc/gopher/ref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/ref.png -------------------------------------------------------------------------------- /doc/gopher/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/run.png -------------------------------------------------------------------------------- /test/dwarf/dwarf.dir/z10.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | //line x10.go:4 5 | package main 6 | func F10() {} 7 | -------------------------------------------------------------------------------- /doc/go-logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/go-logo-blue.png -------------------------------------------------------------------------------- /doc/gopher/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/help.png -------------------------------------------------------------------------------- /doc/gopher/talks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/talks.png -------------------------------------------------------------------------------- /doc/logo-153x55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/logo-153x55.png -------------------------------------------------------------------------------- /src/pkg/text/template/testdata/tmpl1.tmpl: -------------------------------------------------------------------------------- 1 | template1 2 | {{define "x"}}x{{end}} 3 | {{template "y"}} 4 | -------------------------------------------------------------------------------- /src/pkg/text/template/testdata/tmpl2.tmpl: -------------------------------------------------------------------------------- 1 | template2 2 | {{define "y"}}y{{end}} 3 | {{template "x"}} 4 | -------------------------------------------------------------------------------- /doc/codewalk/popout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/codewalk/popout.png -------------------------------------------------------------------------------- /doc/go-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/go-logo-black.png -------------------------------------------------------------------------------- /doc/go-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/go-logo-white.png -------------------------------------------------------------------------------- /doc/gopher/bumper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/bumper.png -------------------------------------------------------------------------------- /doc/gopher/gopherbw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/gopherbw.png -------------------------------------------------------------------------------- /doc/gopher/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/project.png -------------------------------------------------------------------------------- /doc/progs/json2.out: -------------------------------------------------------------------------------- 1 | the circle's area 24.227111172875365 2 | the reciprocal of i is 0.3601008282319049 3 | -------------------------------------------------------------------------------- /lib/time/zoneinfo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/lib/time/zoneinfo.zip -------------------------------------------------------------------------------- /misc/dashboard/codereview/queue.yaml: -------------------------------------------------------------------------------- 1 | queue: 2 | - name: update-cl 3 | rate: 12/m 4 | bucket_size: 1 5 | -------------------------------------------------------------------------------- /src/pkg/text/template/testdata/file1.tmpl: -------------------------------------------------------------------------------- 1 | {{define "x"}}TEXT{{end}} 2 | {{define "dotV"}}{{.V}}{{end}} 3 | -------------------------------------------------------------------------------- /doc/articles/image-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-20.png -------------------------------------------------------------------------------- /doc/articles/image-2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2a.png -------------------------------------------------------------------------------- /doc/articles/image-2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2b.png -------------------------------------------------------------------------------- /doc/articles/image-2c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2c.png -------------------------------------------------------------------------------- /doc/articles/image-2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2d.png -------------------------------------------------------------------------------- /doc/articles/image-2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2e.png -------------------------------------------------------------------------------- /doc/articles/image-2f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-2f.png -------------------------------------------------------------------------------- /doc/articles/slice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/slice-1.png -------------------------------------------------------------------------------- /doc/articles/slice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/slice-2.png -------------------------------------------------------------------------------- /doc/articles/slice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/slice-3.png -------------------------------------------------------------------------------- /doc/gopher/frontpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/frontpage.png -------------------------------------------------------------------------------- /misc/dashboard/codereview/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: GC 3 | url: /gc 4 | schedule: every 6 hours 5 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/old.input: -------------------------------------------------------------------------------- 1 | package P 2 | 3 | func f() { 4 | if x { 5 | y 6 | } else 7 | z 8 | } 9 | -------------------------------------------------------------------------------- /test/bugs/placeholder: -------------------------------------------------------------------------------- 1 | This file keeps Mercurial from deleting the directory 2 | when there are no known bugs. 3 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.dir/p2.go: -------------------------------------------------------------------------------- 1 | package p2 2 | 3 | import "./p1" 4 | 5 | func NewO() p1.O { return nil } 6 | -------------------------------------------------------------------------------- /doc/articles/slice-array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/slice-array.png -------------------------------------------------------------------------------- /doc/gopher/appenginelogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/appenginelogo.gif -------------------------------------------------------------------------------- /doc/gopher/bumper192x108.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/bumper192x108.png -------------------------------------------------------------------------------- /doc/gopher/bumper320x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/bumper320x180.png -------------------------------------------------------------------------------- /doc/gopher/bumper480x270.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/bumper480x270.png -------------------------------------------------------------------------------- /doc/gopher/bumper640x360.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/bumper640x360.png -------------------------------------------------------------------------------- /doc/gopher/gophercolor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/gophercolor.png -------------------------------------------------------------------------------- /doc/play/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func main() { 6 | fmt.Println("Hello, 世界") 7 | } 8 | -------------------------------------------------------------------------------- /doc/articles/slice-struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/slice-struct.png -------------------------------------------------------------------------------- /doc/gopher/appenginegopher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/appenginegopher.jpg -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/hard.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "./sub" 4 | 5 | func main() { 6 | sub.Hello() 7 | } 8 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/src/go-cmd-test/helloworld.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() { 4 | println("hello world") 5 | } 6 | -------------------------------------------------------------------------------- /src/pkg/go/build/testdata/other/file/file.go: -------------------------------------------------------------------------------- 1 | // Test data - not compiled. 2 | 3 | package file 4 | 5 | func F() {} 6 | -------------------------------------------------------------------------------- /test/fixedbugs/bug467.dir/p3.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "./p2" 4 | 5 | func main() { 6 | _ = p2.SockUnix() 7 | } 8 | -------------------------------------------------------------------------------- /doc/articles/image-package-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-package-01.png -------------------------------------------------------------------------------- /doc/articles/image-package-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-package-02.png -------------------------------------------------------------------------------- /doc/articles/image-package-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-package-03.png -------------------------------------------------------------------------------- /doc/articles/image-package-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-package-04.png -------------------------------------------------------------------------------- /doc/articles/image-package-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/articles/image-package-05.png -------------------------------------------------------------------------------- /doc/gopher/gophercolor16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/gophercolor16x16.png -------------------------------------------------------------------------------- /doc/gopher/pencil/gopherhat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gopherhat.jpg -------------------------------------------------------------------------------- /doc/gopher/pencil/gophermega.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gophermega.jpg -------------------------------------------------------------------------------- /doc/gopher/pencil/gopherswim.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gopherswim.jpg -------------------------------------------------------------------------------- /misc/chrome/gophertool/gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/chrome/gophertool/gopher.png -------------------------------------------------------------------------------- /misc/dist/darwin/Resources/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dist/darwin/Resources/bg.png -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/easy.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "./easysub" 4 | 5 | func main() { 6 | easysub.Hello() 7 | } 8 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin3.input: -------------------------------------------------------------------------------- 1 | 2 | /* note: no newline at end of file */ 3 | for i := 0; i < 10; i++ { s += i } 4 | -------------------------------------------------------------------------------- /src/pkg/runtime/zgoarch_386.go: -------------------------------------------------------------------------------- 1 | // auto generated by go tool dist 2 | 3 | package runtime 4 | 5 | const theGoarch = `386` 6 | -------------------------------------------------------------------------------- /src/pkg/text/template/testdata/file2.tmpl: -------------------------------------------------------------------------------- 1 | {{define "dot"}}{{.}}{{end}} 2 | {{define "nested"}}{{template "dot" .}}{{end}} 3 | -------------------------------------------------------------------------------- /doc/articles/wiki/test_view.good: -------------------------------------------------------------------------------- 1 |

Test

2 | 3 |

[edit]

4 | 5 |
some content
6 | -------------------------------------------------------------------------------- /doc/gopher/appenginegophercolor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/appenginegophercolor.jpg -------------------------------------------------------------------------------- /doc/gopher/pencil/gopherhelmet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gopherhelmet.jpg -------------------------------------------------------------------------------- /doc/gopher/pencil/gopherrunning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gopherrunning.jpg -------------------------------------------------------------------------------- /doc/gopher/pencil/gopherswrench.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/doc/gopher/pencil/gopherswrench.jpg -------------------------------------------------------------------------------- /misc/dist/windows/images/Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dist/windows/images/Banner.jpg -------------------------------------------------------------------------------- /misc/dist/windows/images/Dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dist/windows/images/Dialog.jpg -------------------------------------------------------------------------------- /misc/dist/windows/images/gopher.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dist/windows/images/gopher.ico -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/old.golden: -------------------------------------------------------------------------------- 1 | package P 2 | 3 | func f() { 4 | if x { 5 | y 6 | } else { 7 | z 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin2.golden.gofmt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | var x int 5 | 6 | func f() { 7 | y := z 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/v7.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/tar/testdata/v7.tar -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/dd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/dd.zip -------------------------------------------------------------------------------- /src/pkg/runtime/zgoos_windows.go: -------------------------------------------------------------------------------- 1 | // auto generated by go tool dist 2 | 3 | package runtime 4 | 5 | const theGoos = `windows` 6 | -------------------------------------------------------------------------------- /test/bench/shootout/mandelbrot.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/test/bench/shootout/mandelbrot.txt -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/test.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/unix.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/unix.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/winxp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/winxp.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/zip64.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/zip64.zip -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.gif -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.png -------------------------------------------------------------------------------- /test/fixedbugs/bug467.dir/p2.go: -------------------------------------------------------------------------------- 1 | package p2 2 | 3 | import "./p1" 4 | 5 | func SockUnix() error { var s *p1.SockaddrUnix; return s } 6 | -------------------------------------------------------------------------------- /misc/dist/windows/images/DialogLeft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dist/windows/images/DialogLeft.jpg -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin3.golden: -------------------------------------------------------------------------------- 1 | 2 | /* note: no newline at end of file */ 3 | for i := 0; i < 10; i++ { 4 | s += i 5 | } 6 | -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/readme.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/readme.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/symlink.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/symlink.zip -------------------------------------------------------------------------------- /src/pkg/debug/dwarf/testdata/typedef.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/dwarf/testdata/typedef.elf -------------------------------------------------------------------------------- /src/pkg/debug/pe/testdata/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int 4 | main(void) 5 | { 6 | printf("hello, world\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/benchGray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/benchGray.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/benchRGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/benchRGB.png -------------------------------------------------------------------------------- /test/fixedbugs/bug467.dir/p1.go: -------------------------------------------------------------------------------- 1 | package p1 2 | 3 | type SockaddrUnix int 4 | 5 | func (s SockaddrUnix) Error() string { return "blah" } 6 | -------------------------------------------------------------------------------- /doc/articles/wiki/view.html: -------------------------------------------------------------------------------- 1 |

{{.Title}}

2 | 3 |

[edit]

4 | 5 |
{{printf "%s" .Body}}
6 | -------------------------------------------------------------------------------- /misc/dashboard/app/static/status_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dashboard/app/static/status_alert.gif -------------------------------------------------------------------------------- /misc/dashboard/app/static/status_good.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dashboard/app/static/status_good.gif -------------------------------------------------------------------------------- /misc/dashboard/codereview/static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dashboard/codereview/static/icon.png -------------------------------------------------------------------------------- /misc/xcode/4/README: -------------------------------------------------------------------------------- 1 | This directory contains files for Go syntax highlighting in Xcode 4.x. 2 | For installation, read, edit, and run go4xcode.sh . -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/sub/sub/subsub.go: -------------------------------------------------------------------------------- 1 | package subsub 2 | 3 | import "fmt" 4 | 5 | func Hello() { 6 | fmt.Println("subsub.Hello") 7 | } 8 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/writer-big.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/tar/testdata/writer-big.tar -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/readme.notzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/readme.notzip -------------------------------------------------------------------------------- /src/pkg/debug/dwarf/testdata/typedef.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/dwarf/testdata/typedef.macho -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int 4 | main(void) 5 | { 6 | printf("hello, world\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /src/pkg/debug/pe/testdata/gcc-386-mingw-obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/pe/testdata/gcc-386-mingw-obj -------------------------------------------------------------------------------- /src/pkg/encoding/json/testdata/code.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/encoding/json/testdata/code.json.gz -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-zlib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/invalid-zlib.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.5bpp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.5bpp.gif -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.png -------------------------------------------------------------------------------- /src/pkg/runtime/race/race_darwin_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/runtime/race/race_darwin_amd64.syso -------------------------------------------------------------------------------- /src/pkg/runtime/race/race_linux_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/runtime/race/race_linux_amd64.syso -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.dir/z.go: -------------------------------------------------------------------------------- 1 | package z 2 | 3 | import "./p2" 4 | 5 | func main() { 6 | p2.NewO().RemoveOption("hello", "world") 7 | } 8 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/easysub/easysub.go: -------------------------------------------------------------------------------- 1 | package easysub 2 | 3 | import "fmt" 4 | 5 | func Hello() { 6 | fmt.Println("easysub.Hello") 7 | } 8 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin3.golden.gofmt: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* note: no newline at end of file */ 4 | for i := 0; i < 10; i++ { 5 | s += i 6 | } 7 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin3.input.gofmt: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* note: no newline at end of file */ 4 | for i := 0; i < 10; i++ { 5 | s += i 6 | } 7 | -------------------------------------------------------------------------------- /src/pkg/crypto/ecdsa/testdata/SigVer.rsp.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/crypto/ecdsa/testdata/SigVer.rsp.bz2 -------------------------------------------------------------------------------- /src/pkg/debug/gosym/pclinetest.h: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | // Empty include file to generate z symbols 4 | 5 | 6 | 7 | 8 | 9 | // EOF 10 | -------------------------------------------------------------------------------- /src/pkg/debug/pe/testdata/gcc-386-mingw-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/pe/testdata/gcc-386-mingw-exec -------------------------------------------------------------------------------- /src/pkg/go/printer/testdata/empty.input: -------------------------------------------------------------------------------- 1 | // a comment at the beginning of the file 2 | 3 | package empty 4 | 5 | // a comment at the end of the file 6 | -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/benchPaletted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/benchPaletted.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-crc32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/invalid-crc32.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-noend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/invalid-noend.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/invalid-trunc.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.420.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.420.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.422.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.422.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.440.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.440.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.444.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.444.jpeg -------------------------------------------------------------------------------- /src/pkg/runtime/race/race_windows_amd64.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/runtime/race/race_windows_amd64.syso -------------------------------------------------------------------------------- /test/deferprint.out: -------------------------------------------------------------------------------- 1 | printing: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 | 42 true false true +1.500000e+000 world 0x0 [0/0]0x0 0x0 0x0 255 3 | -------------------------------------------------------------------------------- /misc/dashboard/codereview/static/gopherstamp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/misc/dashboard/codereview/static/gopherstamp.jpg -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/gcc-386-freebsd-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/gcc-386-freebsd-exec -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/gcc-amd64-linux-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/gcc-amd64-linux-exec -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/hello-world-core.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/hello-world-core.gz -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-386-darwin-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/macho/testdata/gcc-386-darwin-exec -------------------------------------------------------------------------------- /src/pkg/go/printer/testdata/empty.golden: -------------------------------------------------------------------------------- 1 | // a comment at the beginning of the file 2 | 3 | package empty 4 | 5 | // a comment at the end of the file 6 | -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/benchNRGBA-opaque.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/benchNRGBA-opaque.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g01.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g02.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g04.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn2c08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn2c16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p01.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p02.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p04.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn4a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn4a08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn4a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn4a16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn6a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn6a08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn6a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn6a16.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.interlaced.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.interlaced.gif -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.q50.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.q50.jpeg -------------------------------------------------------------------------------- /src/pkg/regexp/testdata/re2-exhaustive.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/regexp/testdata/re2-exhaustive.txt.bz2 -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/comments.golden: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() {} 4 | 5 | // comment here 6 | 7 | func f() {} 8 | 9 | //line foo.go:1 10 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/comments.input: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() {} 4 | 5 | // comment here 6 | 7 | func f() {} 8 | 9 | //line foo.go:1 10 | -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/gophercolor16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/gophercolor16x16.png -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/benchNRGBA-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/benchNRGBA-gradient.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.q50.2x2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.q50.2x2.jpeg -------------------------------------------------------------------------------- /src/pkg/runtime/zversion.go: -------------------------------------------------------------------------------- 1 | // auto generated by go tool dist 2 | 3 | package runtime 4 | 5 | const defaultGoroot = `d:\Go1.1` 6 | const theVersion = `go1.1` 7 | -------------------------------------------------------------------------------- /test/ken/cplx0.out: -------------------------------------------------------------------------------- 1 | (+5.000000e+000+6.000000e+000i) 2 | (+5.000000e+000+6.000000e+000i) 3 | (+5.000000e+000+6.000000e+000i) 4 | (+5.000000e+000+6.000000e+000i) 5 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/easysub/main.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package main 4 | 5 | import "." 6 | 7 | func main() { 8 | easysub.Hello() 9 | } 10 | -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/crc32-not-streamed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/crc32-not-streamed.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/go-no-datadesc-sig.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/go-no-datadesc-sig.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/go-with-datadesc-sig.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/go-with-datadesc-sig.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/test-trailing-junk.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/archive/zip/testdata/test-trailing-junk.zip -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g01-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g01-30.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g02-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g02-29.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g04-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g04-31.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p08-trns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p08-trns.png -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin2.input: -------------------------------------------------------------------------------- 1 | 2 | 3 | var x int 4 | 5 | 6 | func f() { y := z 7 | /* this is a comment */ 8 | // this is a comment too 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec-debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec-debug -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.420.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.420.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.422.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.422.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.440.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.440.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.q50.444.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-001.q50.444.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.q50.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.q50.progressive.jpeg -------------------------------------------------------------------------------- /misc/dist/darwin/scripts/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GOROOT=/usr/local/go 4 | 5 | echo "Removing previous installation" 6 | if [ -d $GOROOT ]; then 7 | rm -r $GOROOT 8 | fi 9 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin2.golden: -------------------------------------------------------------------------------- 1 | 2 | 3 | var x int 4 | 5 | func f() { 6 | y := z 7 | /* this is a comment */ 8 | // this is a comment too 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86.obj -------------------------------------------------------------------------------- /doc/articles/index.html: -------------------------------------------------------------------------------- 1 | 4 | 5 |

6 | See the Documents page for a complete list of Go articles. 7 |

8 | -------------------------------------------------------------------------------- /misc/xcode/3/README: -------------------------------------------------------------------------------- 1 | This directory contains files for Go syntax highlighting in Xcode 3.x. 2 | See the comments in go.pbfilespec and go.xclangspec for installation 3 | instructions. 4 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/stdin2.input.gofmt: -------------------------------------------------------------------------------- 1 | 2 | 3 | var x int 4 | 5 | func f() { 6 | y := z 7 | /* this is a comment */ 8 | // this is a comment too 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj -------------------------------------------------------------------------------- /src/pkg/go/build/testdata/other/main.go: -------------------------------------------------------------------------------- 1 | // Test data - not compiled. 2 | 3 | package main 4 | 5 | import ( 6 | "./file" 7 | ) 8 | 9 | func main() { 10 | file.F() 11 | } 12 | -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.q50.2x2.progressive.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.q50.2x2.progressive.jpeg -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Go 语言源码阅读笔记 —— 为源代码添加中文注释 2 | ============== 3 | 4 | # 进度表(完成列表) # 5 | 6 | 1、源码安装 Go 的 shell 脚本 —— src/make.bash 7 | 8 | 2、linux-x86 平台程序的入口 —— src/pkg/runtime/rt0_linux_386.s 9 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/local/sub/sub.go: -------------------------------------------------------------------------------- 1 | package sub 2 | 3 | import ( 4 | "fmt" 5 | 6 | subsub "./sub" 7 | ) 8 | 9 | func Hello() { 10 | fmt.Println("sub.Hello") 11 | subsub.Hello() 12 | } 13 | -------------------------------------------------------------------------------- /src/pkg/runtime/signals_windows.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.dir/q1.go: -------------------------------------------------------------------------------- 1 | package q1 2 | 3 | func Deref(typ interface{}) interface{} { 4 | if typ, ok := typ.(*int); ok { 5 | return *typ 6 | } 7 | return typ 8 | } 9 | -------------------------------------------------------------------------------- /src/cmd/api/testdata/src/pkg/p3/p3.go: -------------------------------------------------------------------------------- 1 | package p3 2 | 3 | type ThirdBase struct{} 4 | 5 | func (tb *ThirdBase) GoodPlayer() (i, j, k int) 6 | func BadHop(i, j, k int) (l, m bool, n, o *ThirdBase, err error) 7 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/testimport/p_test.go: -------------------------------------------------------------------------------- 1 | package p 2 | 3 | import ( 4 | "./p1" 5 | 6 | "testing" 7 | ) 8 | 9 | func TestF(t *testing.T) { 10 | if F() != p1.F() { 11 | t.Fatal(F()) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/lib9/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../Make.dist 6 | -------------------------------------------------------------------------------- /src/libbio/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../Make.dist 6 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4879.dir/b.go: -------------------------------------------------------------------------------- 1 | package b 2 | 3 | import "./a" 4 | 5 | func F() { 6 | a.MakePrivateCollection() 7 | a.MakePrivateCollection2() 8 | a.MakePrivateCollection3() 9 | } 10 | -------------------------------------------------------------------------------- /include/plan9/mach.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "../mach.h" 6 | -------------------------------------------------------------------------------- /src/cmd/5c/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/5g/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/5l/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/6c/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/6g/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/6l/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/8c/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/8g/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/8l/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/api/testdata/src/pkg/p3/golden.txt: -------------------------------------------------------------------------------- 1 | pkg p3, func BadHop(int, int, int) (bool, bool, *ThirdBase, *ThirdBase, error) 2 | pkg p3, method (*ThirdBase) GoodPlayer() (int, int, int) 3 | pkg p3, type ThirdBase struct 4 | -------------------------------------------------------------------------------- /src/cmd/nm/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/cmd/pack/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /src/libmach/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../Make.dist 6 | -------------------------------------------------------------------------------- /src/pkg/runtime/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2009 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.dir/q2.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "./q1" 4 | 5 | func main() { 6 | x := 1 7 | y := q1.Deref(&x) 8 | if y != 1 { 9 | panic("y != 1") 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /include/plan9/ureg_arm.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "/arm/include/ureg.h" 6 | -------------------------------------------------------------------------------- /include/plan9/ureg_x86.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "/386/include/ureg.h" 6 | -------------------------------------------------------------------------------- /src/cmd/api/testdata/src/pkg/p2/p2.go: -------------------------------------------------------------------------------- 1 | package p2 2 | 3 | type Twoer interface { 4 | PackageTwoMeth() 5 | } 6 | 7 | func F() string {} 8 | func G() Twoer {} 9 | func NewError(s string) error {} 10 | -------------------------------------------------------------------------------- /src/pkg/math/exp_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Exp(SB),7,$0 6 | B ·exp(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/log_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Log(SB),7,$0 6 | B ·log(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/mod_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Mod(SB),7,$0 6 | B ·mod(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/tan_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Tan(SB),7,$0 6 | B ·tan(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/syscall/syscall_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package syscall 6 | -------------------------------------------------------------------------------- /src/pkg/syscall/syscall_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package syscall 6 | -------------------------------------------------------------------------------- /src/pkg/syscall/zerrors_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package syscall 6 | -------------------------------------------------------------------------------- /src/pkg/syscall/zerrors_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package syscall 6 | -------------------------------------------------------------------------------- /test/fixedbugs/bug088.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug106.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug222.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug282.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug306.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | ignored 8 | -------------------------------------------------------------------------------- /doc/articles/wiki/test_edit.good: -------------------------------------------------------------------------------- 1 |

Editing Test

2 | 3 |
4 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /include/plan9/ureg_amd64.h: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "/amd64/include/ureg.h" 6 | -------------------------------------------------------------------------------- /misc/goplay/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2010 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | goplay: goplay.go 6 | go build goplay.go 7 | -------------------------------------------------------------------------------- /src/cmd/api/testdata/src/pkg/p2/golden.txt: -------------------------------------------------------------------------------- 1 | pkg p2, func F() string 2 | pkg p2, func G() Twoer 3 | pkg p2, func NewError(string) error 4 | pkg p2, type Twoer interface { PackageTwoMeth } 5 | pkg p2, type Twoer interface, PackageTwoMeth() 6 | -------------------------------------------------------------------------------- /src/pkg/math/atan_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Atan(SB),7,$0 6 | B ·atan(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/exp2_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Exp2(SB),7,$0 6 | B ·exp2(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/mod_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Mod(SB),7,$0 6 | JMP ·mod(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/modf_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Modf(SB),7,$0 6 | B ·modf(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/tan_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Tan(SB),7,$0 6 | JMP ·tan(SB) 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug160.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug392.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug396.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug404.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug407.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /src/pkg/math/atan2_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Atan2(SB),7,$0 6 | JMP ·atan2(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/atan2_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Atan2(SB),7,$0 6 | B ·atan2(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/atan_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Atan(SB),7,$0 6 | JMP ·atan(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/exp2_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Exp2(SB),7,$0 6 | JMP ·exp2(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/expm1_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Expm1(SB),7,$0 6 | JMP ·expm1(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/expm1_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Expm1(SB),7,$0 6 | B ·expm1(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/frexp_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Frexp(SB),7,$0 6 | JMP ·frexp(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/frexp_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Frexp(SB),7,$0 6 | B ·frexp(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/hypot_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Hypot(SB),7,$0 6 | B ·hypot(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/ldexp_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Ldexp(SB),7,$0 6 | JMP ·ldexp(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/ldexp_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Ldexp(SB),7,$0 6 | B ·ldexp(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/log1p_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Log1p(SB),7,$0 6 | JMP ·log1p(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/log1p_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Log1p(SB),7,$0 6 | B ·log1p(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/modf_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Modf(SB),7,$0 6 | JMP ·modf(SB) 7 | -------------------------------------------------------------------------------- /src/pkg/math/sincos_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Sincos(SB),7,$0 6 | B ·sincos(SB) 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug083.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug133.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug448.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4510.dir/f2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p 6 | 7 | func fmt() {} 8 | -------------------------------------------------------------------------------- /src/cmd/go/testdata/testimport/x_test.go: -------------------------------------------------------------------------------- 1 | package p_test 2 | 3 | import ( 4 | . "../testimport" 5 | 6 | "./p2" 7 | 8 | "testing" 9 | ) 10 | 11 | func TestF1(t *testing.T) { 12 | if F() != p2.F() { 13 | t.Fatal(F()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/pkg/fmt/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package fmt 6 | 7 | var IsSpace = isSpace 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug106.dir/bug0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bug0 6 | 7 | const A = -1 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug222.dir/chanbug2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package Bar 6 | import _ "chanbug" 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug282.dir/p2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p2 6 | 7 | import _ "./p1" 8 | 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug306.dir/p2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p2 6 | 7 | import _ "./p1" 8 | 9 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4510.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4932.dir/foo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package foo 6 | 7 | type Op struct{} 8 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5260.dir/a.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package a 6 | 7 | const BOM = "\uFEFF" 8 | -------------------------------------------------------------------------------- /src/pkg/math/remainder_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Remainder(SB),7,$0 6 | B ·remainder(SB) 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug377.dir/two.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package two 6 | 7 | import _ "./one" 8 | 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug382.dir/pkg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pkg 6 | type T struct {} 7 | var E T 8 | -------------------------------------------------------------------------------- /doc/progs/defer2.out: -------------------------------------------------------------------------------- 1 | Calling g. 2 | Printing in g 0 3 | Printing in g 1 4 | Printing in g 2 5 | Printing in g 3 6 | Panicking! 7 | Defer in g 3 8 | Defer in g 2 9 | Defer in g 1 10 | Defer in g 0 11 | Recovered in f 4 12 | Returned normally from f. 13 | -------------------------------------------------------------------------------- /misc/chrome/gophertool/README.txt: -------------------------------------------------------------------------------- 1 | To install: 2 | 3 | 1) chrome://extensions/ 4 | 2) click "[+] Developer Mode" in top right 5 | 3) "Load unpacked extension..." 6 | 4) pick $GOROOT/misc/chrome/gophertool 7 | 8 | Done. It'll now auto-reload from source. 9 | -------------------------------------------------------------------------------- /src/pkg/math/remainder_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Remainder(SB),7,$0 6 | JMP ·remainder(SB) 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug063.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package bug063 8 | const c = 0 ^ 0 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug106.dir/bug1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bug1 6 | 7 | import _ "./bug0" 8 | 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug133.dir/bug0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bug0 6 | 7 | type T struct { i int } 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug468.dir/p1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p1 6 | 7 | type S struct { X, Y int } 8 | -------------------------------------------------------------------------------- /doc/articles/wiki/edit.html: -------------------------------------------------------------------------------- 1 |

Editing {{.Title}}

2 | 3 |
4 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug050.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | func main() { // ERROR "package" 8 | } 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug160.dir/x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package x 6 | 7 | const Zero = 0.0 8 | const Ten = 10.0 9 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5105.dir/a.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package a 6 | 7 | var A = [2]string{"hello", "world"} 8 | -------------------------------------------------------------------------------- /misc/notepadplus/README: -------------------------------------------------------------------------------- 1 | Given a Notepad++ installation at : 2 | 3 | 1. Add the contents of userDefineLang.xml at \userDefineLang.xml 4 | between ... 5 | 6 | 2. Copy go.xml to \plugins\APIs 7 | 8 | 3. Restart Notepad++ 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug322.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test case for issue 1402. 8 | package ignored 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug460.dir/a.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package a 6 | 7 | type Foo struct { 8 | int 9 | } 10 | -------------------------------------------------------------------------------- /doc/progs/eff_unused1.go: -------------------------------------------------------------------------------- 1 | // skip 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "io" 8 | "log" 9 | "os" 10 | ) 11 | 12 | func main() { 13 | fd, err := os.Open("test.go") 14 | if err != nil { 15 | log.Fatal(err) 16 | } 17 | // TODO: use fd. 18 | } 19 | -------------------------------------------------------------------------------- /test/fixedbugs/bug232.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package bug232 8 | type I interface { X(...int) } 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug335.dir/b.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package b 6 | 7 | import "./a" 8 | 9 | var Bar = a.Foo 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug335.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1705. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug377.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1802 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug382.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file 6 | 7 | // Issue 2529. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/method4.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test method expressions with arguments. 8 | package ignored 9 | -------------------------------------------------------------------------------- /misc/cgo/test/backdoor/backdoor.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package backdoor 6 | 7 | func LockedOSThread() bool // in runtime.c 8 | -------------------------------------------------------------------------------- /src/lib9/win.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | typedef unsigned short WinRune; 6 | 7 | WinRune* torune(char*); 8 | char *toutf(WinRune*); 9 | -------------------------------------------------------------------------------- /src/pkg/os/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package os 6 | 7 | // Export for testing. 8 | 9 | var Atime = atime 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug282.dir/p1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p1 6 | 7 | type T struct { 8 | f func() "x" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5291.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 5291: GC crash 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/import4.dir/empty.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package P 6 | 7 | import ( ) 8 | const ( ) 9 | var ( ) 10 | type ( ) 11 | -------------------------------------------------------------------------------- /src/pkg/math/sin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Sin(SB),7,$0 6 | B ·sin(SB) 7 | 8 | TEXT ·Cos(SB),7,$0 9 | B ·cos(SB) 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug083.dir/bug0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bug0 6 | 7 | type t0 struct { 8 | } 9 | 10 | var V0 t0 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug306.dir/p1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p1 6 | 7 | type T <-chan int 8 | var x = make(chan T) 9 | 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug415.dir/prog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | import "./p" 7 | func main() {} 8 | var _ p.A 9 | 10 | -------------------------------------------------------------------------------- /src/pkg/go/doc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2009 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | # Script to test heading detection heuristic 6 | headscan: headscan.go 7 | go build headscan.go 8 | -------------------------------------------------------------------------------- /src/pkg/math/asin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Asin(SB),7,$0 6 | B ·asin(SB) 7 | 8 | TEXT ·Acos(SB),7,$0 9 | B ·acos(SB) 10 | -------------------------------------------------------------------------------- /src/pkg/math/sin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Sin(SB),7,$0 6 | JMP ·sin(SB) 7 | 8 | TEXT ·Cos(SB),7,$0 9 | JMP ·cos(SB) 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug133.dir/bug1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bug1 6 | 7 | import "./bug0" 8 | 9 | type T struct { t bug0.T } 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug169.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | var x = '''; // ERROR "char" 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug191.go: -------------------------------------------------------------------------------- 1 | // rundircmpout 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Tests bug with dot imports. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug224.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type T T // ERROR "recursive" 10 | 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5125.dir/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import _ "./bug" 8 | 9 | func main() { 10 | } 11 | -------------------------------------------------------------------------------- /test/import2.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Tests that export data does not corrupt type syntax. 8 | package ignored 9 | -------------------------------------------------------------------------------- /lib/godoc/error.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |

8 | {{html .}} 9 |

10 | -------------------------------------------------------------------------------- /misc/dashboard/builder/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2009 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | builder: $(shell ls *.go) 6 | go build -o $@ $^ 7 | 8 | clean: 9 | rm -f builder 10 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/crlf.golden: -------------------------------------------------------------------------------- 1 | /* 2 | Source containing CR/LF line endings. 3 | The gofmt'ed output must only have LF 4 | line endings. 5 | */ 6 | package main 7 | 8 | func main() { 9 | // line comment 10 | println("hello, world!") // another line comment 11 | println() 12 | } 13 | -------------------------------------------------------------------------------- /src/pkg/math/asin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Asin(SB),7,$0 6 | JMP ·asin(SB) 7 | 8 | TEXT ·Acos(SB),7,$0 9 | JMP ·acos(SB) 10 | -------------------------------------------------------------------------------- /src/pkg/math/log10_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Log10(SB),7,$0 6 | B ·log10(SB) 7 | 8 | TEXT ·Log2(SB),7,$0 9 | B ·log2(SB) 10 | -------------------------------------------------------------------------------- /src/pkg/mime/testdata/test.types: -------------------------------------------------------------------------------- 1 | # Copyright 2010 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | 6 | # mime package test 7 | application/test t1 # Simple test 8 | text/test t2 # Text test 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug191.dir/b.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package b 6 | 7 | func init() { 8 | println("b"); 9 | } 10 | 11 | type V int; 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug313.dir/b.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import . "fmt" 8 | 9 | func b() { 10 | Println() 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4932.dir/state2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package state2 6 | 7 | import "./state" 8 | 9 | type Foo *state.State 10 | -------------------------------------------------------------------------------- /src/pkg/math/log10_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Log10(SB),7,$0 6 | JMP ·log10(SB) 7 | 8 | TEXT ·Log2(SB),7,$0 9 | JMP ·log2(SB) 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug191.dir/a.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package a 6 | 7 | func init() { 8 | println("a"); 9 | } 10 | 11 | type T int; 12 | 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug233.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package bug233 8 | import p "fmt" 9 | var _ = p.Print 10 | var fmt = 10 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug377.dir/one.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package one 6 | 7 | func Foo() (n int64, _ *int) { 8 | return 42, nil 9 | } 10 | 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug437.dir/two.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package two 6 | 7 | import "./one" 8 | 9 | type S2 struct { 10 | one.S1 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/issue3705.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package p 8 | 9 | func init() // ERROR "missing function body" 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5260.dir/b.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "./a" 8 | 9 | func main() { 10 | _ = a.BOM 11 | } 12 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/crlf.input: -------------------------------------------------------------------------------- 1 | /* 2 | Source containing CR/LF line endings. 3 | The gofmt'ed output must only have LF 4 | line endings. 5 | */ 6 | package main 7 | 8 | func main() { 9 | // line comment 10 | println("hello, world!") // another line comment 11 | println() 12 | } 13 | -------------------------------------------------------------------------------- /src/pkg/crypto/md5/md5block_decl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64 386 6 | 7 | package md5 8 | 9 | func block(dig *digest, p []byte) 10 | -------------------------------------------------------------------------------- /src/pkg/crypto/sha1/sha1block_decl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64 386 6 | 7 | package sha1 8 | 9 | func block(dig *digest, p []byte) 10 | -------------------------------------------------------------------------------- /src/pkg/sort/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package sort 6 | 7 | func Heapsort(data Interface) { 8 | heapSort(data, 0, data.Len()) 9 | } 10 | -------------------------------------------------------------------------------- /src/pkg/syscall/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in ../runtime/syscall_windows.goc 7 | // 8 | -------------------------------------------------------------------------------- /test/ddd2.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test that variadic functions work across package boundaries. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.dir/p1.go: -------------------------------------------------------------------------------- 1 | package p1 2 | 3 | type O map[string]map[string]string 4 | 5 | func (opts O) RemoveOption(sect, opt string) bool { 6 | if _, ok := opts[sect]; !ok { 7 | return false 8 | } 9 | _, ok := opts[sect][opt] 10 | delete(opts[sect], opt) 11 | return ok 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4510.dir/f1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p 6 | 7 | import "fmt" // ERROR "fmt redeclared" 8 | 9 | var _ = fmt.Printf 10 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/f.0.golden: -------------------------------------------------------------------------------- 1 | // The package f is a go/doc test for functions and factory ... 2 | PACKAGE f 3 | 4 | IMPORTPATH 5 | testdata/f 6 | 7 | FILENAMES 8 | testdata/f.go 9 | 10 | FUNCTIONS 11 | // Exported must always be visible. Was issue 2824. 12 | func Exported() private 13 | 14 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/f.2.golden: -------------------------------------------------------------------------------- 1 | // The package f is a go/doc test for functions and factory ... 2 | PACKAGE f 3 | 4 | IMPORTPATH 5 | testdata/f 6 | 7 | FILENAMES 8 | testdata/f.go 9 | 10 | FUNCTIONS 11 | // Exported must always be visible. Was issue 2824. 12 | func Exported() private 13 | 14 | -------------------------------------------------------------------------------- /src/pkg/syscall/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in ../runtime/syscall_windows.goc 7 | // 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug163.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | x⊛y := 1; // ERROR "identifier" 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug174.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var x uint; 11 | println(1< "b" 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug472.dir/z.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | _ "./p1" 9 | _ "./p2" 10 | ) 11 | 12 | func main() { 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4517a.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package p 8 | 9 | var init = 1 // ERROR "cannot declare init - must be func" 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4517b.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package p 8 | 9 | const init = 1 // ERROR "cannot declare init - must be func" 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4517c.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package p 8 | 9 | type init byte // ERROR "cannot declare init - must be func" 10 | -------------------------------------------------------------------------------- /test/interface/embed1.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test that embedded interface types can have local methods. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /misc/cgo/testso/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | import "." 10 | 11 | func main() { 12 | cgosotest.Test() 13 | } 14 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/rewrite1.golden: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | type Bar int 8 | 9 | func main() { 10 | var a Bar 11 | println(a) 12 | } 13 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/rewrite1.input: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | type Foo int 8 | 9 | func main() { 10 | var a Foo 11 | println(a) 12 | } 13 | -------------------------------------------------------------------------------- /src/pkg/net/dial_gen_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows plan9 6 | 7 | package net 8 | 9 | func init() { 10 | testingIssue5349 = true 11 | } 12 | -------------------------------------------------------------------------------- /src/pkg/runtime/arch_amd64.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | enum { 6 | thechar = '6', 7 | BigEndian = 0, 8 | CacheLineSize = 64, 9 | appendCrossover = 16 10 | }; 11 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // FreeBSD and Linux use the same linkage to main 6 | 7 | TEXT _rt0_arm_freebsd(SB),7,$-4 8 | B _rt0_arm(SB) 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug021.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | s1 := "hi"; 11 | s2 := "ho"; 12 | s1 += s2; 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug248.dir/bug0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package p 6 | 7 | type T struct { 8 | X, Y int 9 | } 10 | 11 | type I interface { 12 | M(T) 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug248.dir/bug1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package p 6 | 7 | type T struct { 8 | X, Y int 9 | } 10 | 11 | type I interface { 12 | M(T) 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug396.dir/one.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package one 6 | 7 | // Issue 2687 8 | type T struct { int } 9 | 10 | func New(i int) T { return T{i} } 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug415.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 2716. Export metadata error made main.go not compile. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue3783.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package foo 8 | 9 | var i int 10 | 11 | func (*i) bar() // ERROR "not a type" 12 | 13 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4326.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Printing local variables in inliner shadows global names. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4932.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4932: regression in export of composite literals. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /src/cmd/5a/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | 7 | install: y.tab.h 8 | 9 | y.tab.h: a.y 10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y 11 | -------------------------------------------------------------------------------- /src/cmd/6a/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | 7 | install: y.tab.h 8 | 9 | y.tab.h: a.y 10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y 11 | -------------------------------------------------------------------------------- /src/cmd/8a/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | 7 | install: y.tab.h 8 | 9 | y.tab.h: a.y 10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y 11 | -------------------------------------------------------------------------------- /src/cmd/cc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2012 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | include ../../Make.dist 6 | 7 | install: y.tab.h 8 | 9 | y.tab.h: cc.y 10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y cc.y 11 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/a1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // comment 1 6 | package a 7 | 8 | //BUG(uid): bug1 9 | 10 | //TODO(uid): todo1 11 | 12 | //TODO(): ignored 13 | -------------------------------------------------------------------------------- /src/pkg/math/sqrt_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // func Sqrt(x float64) float64 6 | TEXT ·Sqrt(SB),7,$0 7 | SQRTSD x+0(FP), X0 8 | MOVSD X0, ret+8(FP) 9 | RET 10 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // FreeBSD/NetBSD and Linux use the same linkage to main 6 | 7 | TEXT _rt0_arm_netbsd(SB),7,$-4 8 | B _rt0_arm(SB) 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug313.dir/a.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "fmt" 8 | 9 | func a() { 10 | fmt.DoesNotExist() // ERROR "undefined" 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug414.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1743: test embedding of imported types with private methods. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /misc/cgo/test/issue4029w.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package cgotest 8 | 9 | import "testing" 10 | 11 | func test4029(t *testing.T) { 12 | } 13 | -------------------------------------------------------------------------------- /misc/chrome/gophertool/background.js: -------------------------------------------------------------------------------- 1 | chrome.omnibox.onInputEntered.addListener(function(t) { 2 | var url = urlForInput(t); 3 | if (url) { 4 | chrome.tabs.getSelected(null, function(tab) { 5 | if (!tab) return; 6 | chrome.tabs.update(tab.id, { "url": url, "selected": true }); 7 | }); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /misc/dashboard/app/build/notify.txt: -------------------------------------------------------------------------------- 1 | Change {{shortHash .Commit.Hash}} broke the {{.Builder}} build: 2 | http://{{.Hostname}}/log/{{.Result.LogHash}} 3 | 4 | {{.Commit.Desc}} 5 | 6 | http://code.google.com/p/go/source/detail?r={{shortHash .Commit.Hash}} 7 | 8 | $ tail -200 < log 9 | {{printf "%s" .Log.Text | tail 200}} 10 | -------------------------------------------------------------------------------- /test/dwarf/dwarf.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // See issue 2241 and issue 1878: dwarf include stack size 8 | // issues in linker. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug048.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | type M map[int] int; 11 | m1 := M{7 : 8}; 12 | _ = m1; 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug077.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var exit int 11 | exit: 12 | _ = exit 13 | goto exit 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug182.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | x := 0; 11 | if x { // ERROR "x.*int|bool" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug448.dir/pkg1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pkg1 6 | 7 | var x = make(chan interface{}) 8 | 9 | func Do() int { 10 | return (<-x).(int) 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5259.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 5259: Inlining of method value causes internal compiler error 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/safe/usesafe.go: -------------------------------------------------------------------------------- 1 | // $G $D/pkg.go && pack grcS pkg.a pkg.$A 2> /dev/null && rm pkg.$A && $G -I . -u $D/main.go 2 | // rm -f pkg.a 3 | 4 | // Copyright 2012 The Go Authors. All rights reserved. 5 | // Use of this source code is governed by a BSD-style 6 | // license that can be found in the LICENSE file. 7 | 8 | package ignored 9 | -------------------------------------------------------------------------------- /test/syntax/import.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | import ( 10 | "io", // ERROR "unexpected comma" 11 | "os" 12 | ) 13 | 14 | 15 | -------------------------------------------------------------------------------- /misc/cgo/life/life.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | extern void Step(int, int, int *, int *); 6 | extern void DoStep(int, int, int, int, int, int, int *, int *); 7 | extern const int MYCONST; 8 | -------------------------------------------------------------------------------- /src/pkg/go/build/syslist.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package build 6 | 7 | const goosList = "darwin freebsd linux netbsd openbsd plan9 windows " 8 | const goarchList = "386 amd64 arm " 9 | -------------------------------------------------------------------------------- /src/pkg/math/dim_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Dim(SB),7,$0 6 | B ·dim(SB) 7 | 8 | TEXT ·Min(SB),7,$0 9 | B ·min(SB) 10 | 11 | TEXT ·Max(SB),7,$0 12 | B ·max(SB) 13 | -------------------------------------------------------------------------------- /src/pkg/math/sqrt_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // func Sqrt(x float64) float64 6 | TEXT ·Sqrt(SB),7,$0 7 | FMOVD x+0(FP),F0 8 | FSQRT 9 | FMOVDP F0,ret+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug108.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | func f() { 9 | v := 1 << 1025; // ERROR "overflow|stupid shift" 10 | _ = v 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug129.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package foo 8 | import "fmt" 9 | 10 | func f() { 11 | fmt.Println(); 12 | fmt := 1; 13 | _ = fmt; 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug191.dir/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import . "./a" 8 | import . "./b" 9 | 10 | var _ T 11 | var _ V 12 | 13 | func main() { 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug318.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1411. 8 | 9 | package main 10 | 11 | const ui uint = 0 12 | const i int = ui // ERROR "type" 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug367.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1536: bug when handling imported interfaces with 8 | // private methods. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4370.dir/p3.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p3 6 | 7 | import "./p2" 8 | 9 | func F() { 10 | p2.F() 11 | var t p2.T 12 | println(t.T.M()) 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4370.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Re-exporting inlined function bodies missed types in x, ok := v.(Type) 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /test/interface/recursive1.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Mutually recursive type definitions imported and used by recursive1.go. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /src/cmd/go/mkdoc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2012 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | go install # So the next line will produce updated documentation. 7 | go help documentation > doc.go 8 | gofmt -w doc.go 9 | 10 | -------------------------------------------------------------------------------- /src/cmd/yacc/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2009 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | units: yacc.go units.y 6 | go run yacc.go -p units_ units.y 7 | go build -o units y.go 8 | 9 | clean: 10 | rm -f y.go y.output units 11 | -------------------------------------------------------------------------------- /src/pkg/math/dim_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Dim(SB),7,$0 6 | JMP ·dim(SB) 7 | 8 | TEXT ·Max(SB),7,$0 9 | JMP ·max(SB) 10 | 11 | TEXT ·Min(SB),7,$0 12 | JMP ·min(SB) 13 | -------------------------------------------------------------------------------- /src/pkg/math/sqrt_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // func Sqrt(x float64) float64 6 | TEXT ·Sqrt(SB),7,$0 7 | MOVD x+0(FP),F0 8 | SQRTD F0,F0 9 | MOVD F0,ret+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug030.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var x int; 11 | x := 0; // ERROR "declar|:=" 12 | _ = x; 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug172.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f() { 10 | a := true; 11 | a |= a; // ERROR "illegal.*OR|bool|expected" 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug222.dir/chanbug.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | package chanbug 6 | var C chan<- (chan int) 7 | var D chan<- func() 8 | var E func() chan int 9 | var F func() (func()) 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug328.go: -------------------------------------------------------------------------------- 1 | // cmpout 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | import "unsafe" 10 | 11 | func main() { 12 | var p unsafe.Pointer 13 | println(p) 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug376.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // issue 1951 8 | package foo 9 | import "unsafe" 10 | var v = unsafe.Sizeof // ERROR "must be called" 11 | 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug380.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Used to cause a typechecking loop error. 8 | 9 | package pkg 10 | type T map[int]string 11 | var q = &T{} 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug432.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // gccgo crashed compiling this. 8 | 9 | package p 10 | 11 | var v struct{ I } 12 | 13 | type I interface{} 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug465.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4230: inlining bug for composite literal in 8 | // if, for, switch statements. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4097.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package foo 8 | 9 | var s [][10]int 10 | const m = len(s[len(s)-1]) // ERROR "is not a constant" 11 | 12 | -------------------------------------------------------------------------------- /test/safe/nousesafe.go: -------------------------------------------------------------------------------- 1 | // $G $D/pkg.go && pack grc pkg.a pkg.$A 2> /dev/null && rm pkg.$A && errchk $G -I . -u $D/main.go 2 | // rm -f pkg.a 3 | 4 | // Copyright 2012 The Go Authors. All rights reserved. 5 | // Use of this source code is governed by a BSD-style 6 | // license that can be found in the LICENSE file. 7 | 8 | package ignored 9 | -------------------------------------------------------------------------------- /doc/articles/wiki/http-sample.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func handler(w http.ResponseWriter, r *http.Request) { 9 | fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) 10 | } 11 | 12 | func main() { 13 | http.HandleFunc("/", handler) 14 | http.ListenAndServe(":8080", nil) 15 | } 16 | -------------------------------------------------------------------------------- /misc/cgo/test/exports.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cgotest 6 | 7 | import "C" 8 | 9 | //export ReturnIntLong 10 | func ReturnIntLong() (int, C.long) { 11 | return 1, 2 12 | } 13 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/rewrite8.golden: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Check that literal type expression rewrites are accepted. 6 | // Was issue 4406. 7 | 8 | package p 9 | 10 | type T int 11 | -------------------------------------------------------------------------------- /src/pkg/math/cmplx/conj.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cmplx 6 | 7 | // Conj returns the complex conjugate of x. 8 | func Conj(x complex128) complex128 { return complex(real(x), -imag(x)) } 9 | -------------------------------------------------------------------------------- /src/pkg/math/floor_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Floor(SB),7,$0 6 | B ·floor(SB) 7 | 8 | TEXT ·Ceil(SB),7,$0 9 | B ·ceil(SB) 10 | 11 | TEXT ·Trunc(SB),7,$0 12 | B ·trunc(SB) 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug062.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var s string = nil; // ERROR "illegal|invalid|incompatible|cannot" 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug074.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | x := string{'a', 'b', '\n'}; // ERROR "composite" 11 | print(x); 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug115.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func isuint(i uint) { } 10 | 11 | func main() { 12 | i := ^uint(0); 13 | isuint(i); 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug192.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | import "fmt" // GCCGO_ERROR "previous" 10 | 11 | var fmt int // ERROR "redecl|redefinition" 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug382.dir/prog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file 4 | 5 | // Issue 2529 6 | 7 | package main 8 | 9 | import "./pkg" 10 | 11 | var x = pkg.E 12 | 13 | var fo = struct{ F pkg.T }{F: x} 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug415.dir/p.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p 6 | 7 | type A struct { 8 | s struct{int} 9 | } 10 | 11 | func (a *A) f() { 12 | a.s = struct{int}{0} 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug445.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 3765 8 | 9 | package main 10 | 11 | func f(x uint) uint { 12 | m := ^(1 << x) 13 | return uint(m) 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug451.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type T x.T // ERROR "undefined|expected package" 10 | 11 | // bogus "invalid recursive type" 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug460.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // part one of issue 4124. Make sure that the compiler rejects access attempts. 8 | 9 | package ignored 10 | 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug472.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Linker would incorrectly parse export data and think 8 | // definitions are inconsistent. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5105.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 5105: linker segfaults on duplicate definition 8 | // of a type..hash.* function. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/syntax/semi5.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() 10 | { // ERROR "unexpected semicolon or newline before .?{.?" 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/syntax/semi6.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type T // ERROR "unexpected semicolon or newline in type declaration" 10 | { 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /misc/cgo/testtls/tls_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package cgotlstest 8 | 9 | import "testing" 10 | 11 | func TestTLS(t *testing.T) { 12 | testTLS(t) 13 | } 14 | -------------------------------------------------------------------------------- /misc/swig/callback/callback.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package callback 6 | 7 | type GoCallback struct{} 8 | 9 | func (p *GoCallback) Run() string { 10 | return "GoCallback.Run" 11 | } 12 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/f.1.golden: -------------------------------------------------------------------------------- 1 | // The package f is a go/doc test for functions and factory ... 2 | PACKAGE f 3 | 4 | IMPORTPATH 5 | testdata/f 6 | 7 | FILENAMES 8 | testdata/f.go 9 | 10 | TYPES 11 | // 12 | type private struct{} 13 | 14 | // Exported must always be visible. Was issue 2824. 15 | func Exported() private 16 | 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug039.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f (x int) { // GCCGO_ERROR "previous" 10 | var x int; // ERROR "redecl|redefinition" 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug171.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f() int { } // ERROR "return|control" 10 | func g() (foo int) { } // ERROR "return|control" 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug198.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | func f(a T) T { return a } // ERROR "undefined" 9 | func main() { 10 | x := f(0); 11 | _ = x; 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug460.dir/b.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package b 6 | 7 | import "./a" 8 | 9 | var x a.Foo 10 | 11 | func main() { 12 | x.int = 20 // ERROR "unexported field" 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug466.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4159: exported inlinable functions squash 8 | // complex literals "a+bi" to "a+b". 9 | 10 | package ignored 11 | 12 | -------------------------------------------------------------------------------- /test/fixedbugs/issue3552.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 3552: cross-package inlining misbehaves when 8 | // referencing embedded builtins. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4590.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4590: linker fails on multiple imports of 8 | // an anonymous struct with methods. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4964.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4964: exported escape analysis result is not enough 8 | // for cross package analysis. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/helloworld.go: -------------------------------------------------------------------------------- 1 | // cmpout 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test that we can do page 1 of the C book. 8 | 9 | package main 10 | 11 | func main() { 12 | print("hello, world\n") 13 | } 14 | -------------------------------------------------------------------------------- /test/syntax/composite.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | var a = []int{ 10 | 3 // ERROR "need trailing comma before newline in composite literal" 11 | } 12 | -------------------------------------------------------------------------------- /src/cmd/go/signal_notunix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build plan9 windows 6 | 7 | package main 8 | 9 | import ( 10 | "os" 11 | ) 12 | 13 | var signalsToIgnore = []os.Signal{os.Interrupt} 14 | -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/rewrite8.input: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Check that literal type expression rewrites are accepted. 6 | // Was issue 4406. 7 | 8 | package p 9 | 10 | type T interface{} 11 | -------------------------------------------------------------------------------- /src/pkg/sync/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package sync 6 | 7 | // Export for testing. 8 | var Runtime_Semacquire = runtime_Semacquire 9 | var Runtime_Semrelease = runtime_Semrelease 10 | -------------------------------------------------------------------------------- /test/bench/shootout/regex-dna.txt: -------------------------------------------------------------------------------- 1 | agggtaaa|tttaccct 1 2 | [cgt]gggtaaa|tttaccc[acg] 0 3 | a[act]ggtaaa|tttacc[agt]t 0 4 | ag[act]gtaaa|tttac[agt]ct 0 5 | agg[act]taaa|ttta[agt]cct 1 6 | aggg[acg]aaa|ttt[cgt]ccct 0 7 | agggt[cgt]aa|tt[acg]accct 0 8 | agggta[cgt]a|t[acg]taccct 0 9 | agggtaa[cgt]|[acg]ttaccct 2 10 | 11 | 10245 12 | 10000 13 | 13348 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug002.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | if ; false {} // compiles; should be an error (should be simplevardecl before ;) 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug015.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var i33 int64; 11 | if i33 == (1<<64) -1 { // ERROR "overflow" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug040.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f (x, // GCCGO_ERROR "previous" 10 | x int) { // ERROR "duplicate argument|redefinition" 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug053.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var len int; // len should not be a keyword - this doesn't compile 11 | _ = len; 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug078.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func dosplit(wait chan int ){ 10 | select { 11 | case <-wait: 12 | } 13 | } 14 | 15 | func main() { 16 | } 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug202.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | func f() { 9 | v := [...]string{"a", "b"}; 10 | _ = v; 11 | } 12 | func main() { 13 | f(); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug420.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1757. 8 | // gccgo failed to compile this. 9 | 10 | package main 11 | 12 | func main() { 13 | (_) = 0 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug426.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // gccgo crashed compiling this. 8 | 9 | package p 10 | 11 | type T *T 12 | 13 | func f(t T) { 14 | println(t, *t) 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4370.dir/p2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package p2 6 | 7 | import "./p1" 8 | 9 | type T struct { 10 | p1.T 11 | } 12 | 13 | func F() { 14 | var t T 15 | p1.F(&t.T) 16 | } 17 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4879.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 4879: export data misses the '&' for some 8 | // composite literals in inlined bodies. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/interface/private.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test that unexported methods are not visible outside the package. 8 | // Does not compile. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/rotate0.go: -------------------------------------------------------------------------------- 1 | // runoutput ./rotate.go 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of bit rotations. 8 | // The output is compiled and run. 9 | 10 | package main 11 | 12 | const mode = 0 13 | -------------------------------------------------------------------------------- /test/rotate1.go: -------------------------------------------------------------------------------- 1 | // runoutput ./rotate.go 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of bit rotations. 8 | // The output is compiled and run. 9 | 10 | package main 11 | 12 | const mode = 1 13 | -------------------------------------------------------------------------------- /test/rotate2.go: -------------------------------------------------------------------------------- 1 | // runoutput ./rotate.go 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of bit rotations. 8 | // The output is compiled and run. 9 | 10 | package main 11 | 12 | const mode = 2 13 | -------------------------------------------------------------------------------- /test/rotate3.go: -------------------------------------------------------------------------------- 1 | // runoutput ./rotate.go 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of bit rotations. 8 | // The output is compiled and run. 9 | 10 | package main 11 | 12 | const mode = 3 13 | -------------------------------------------------------------------------------- /misc/chrome/gophertool/background.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/pkg/net/cgo_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package net 6 | 7 | /* 8 | #include 9 | */ 10 | import "C" 11 | 12 | func cgoAddrInfoFlags() C.int { 13 | return C.AI_CANONNAME 14 | } 15 | -------------------------------------------------------------------------------- /src/pkg/net/cgo_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package net 6 | 7 | /* 8 | #include 9 | */ 10 | import "C" 11 | 12 | func cgoAddrInfoFlags() C.int { 13 | return C.AI_CANONNAME 14 | } 15 | -------------------------------------------------------------------------------- /test/bench/shootout/binary-tree.txt: -------------------------------------------------------------------------------- 1 | stretch tree of depth 16 check: -1 2 | 65536 trees of depth 4 check: -65536 3 | 16384 trees of depth 6 check: -16384 4 | 4096 trees of depth 8 check: -4096 5 | 1024 trees of depth 10 check: -1024 6 | 256 trees of depth 12 check: -256 7 | 64 trees of depth 14 check: -64 8 | long lived tree of depth 15 check: -1 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug051.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f() int { 10 | return 0; 11 | } 12 | 13 | func main() { 14 | const n = f(); // ERROR "const" 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug067.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | var c chan int 10 | 11 | func main() { 12 | c = make(chan int); 13 | go func() { c <- 0 } (); 14 | <-c 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug118.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package bug118 8 | 9 | func Send(c chan int) int { 10 | select { 11 | default: 12 | return 1; 13 | } 14 | return 2; 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug351.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | var x int 10 | 11 | func main() { 12 | (x) := 0 // ERROR "non-name [(]x[)]|non-name on left side" 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug391.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 2576 8 | package bug 9 | 10 | type T struct { a int } 11 | 12 | func f(t T) { 13 | switch _, _ = t.a, t.a; {} 14 | } -------------------------------------------------------------------------------- /test/fixedbugs/bug399.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 2674 8 | 9 | package main 10 | const dow = "\000\003" 11 | 12 | func main() { 13 | println(int(dow[1])) 14 | } 15 | 16 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5125.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 5125: cyclic dependencies between types confuse 8 | // the hashability test during import. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5260.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2013 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 5260: Unicode BOM in exported string constant 8 | // cannot be read back during package import. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/golden.out: -------------------------------------------------------------------------------- 1 | 2 | == ./ 3 | 4 | == ken/ 5 | 6 | == chan/ 7 | 8 | == interface/ 9 | 10 | == syntax/ 11 | 12 | == dwarf/ 13 | 14 | == safe/ 15 | 16 | == fixedbugs/ 17 | 18 | =========== fixedbugs/bug429.go 19 | fatal error: all goroutines are asleep - deadlock! 20 | 21 | == bugs/ 22 | 23 | =========== bugs/bug395.go 24 | bug395 is broken 25 | -------------------------------------------------------------------------------- /test/syntax/forvar.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | for var x = 0; x < 10; x++ { // ERROR "var declaration not allowed in for initializer" 11 | -------------------------------------------------------------------------------- /src/cmd/go/go11.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.1 6 | 7 | package main 8 | 9 | // Test that go1.1 tag above is included in builds. main.go refers to this definition. 10 | const go11tag = true 11 | -------------------------------------------------------------------------------- /src/pkg/math/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package math 6 | 7 | // Export internal functions for testing. 8 | var ExpGo = exp 9 | var Exp2Go = exp2 10 | var HypotGo = hypot 11 | var SqrtGo = sqrt 12 | -------------------------------------------------------------------------------- /test/bench/shootout/regex-dna-parallel.txt: -------------------------------------------------------------------------------- 1 | agggtaaa|tttaccct 1 2 | [cgt]gggtaaa|tttaccc[acg] 0 3 | a[act]ggtaaa|tttacc[agt]t 0 4 | ag[act]gtaaa|tttac[agt]ct 0 5 | agg[act]taaa|ttta[agt]cct 1 6 | aggg[acg]aaa|ttt[cgt]ccct 0 7 | agggt[cgt]aa|tt[acg]accct 0 8 | agggta[cgt]a|t[acg]taccct 0 9 | agggtaa[cgt]|[acg]ttaccct 2 10 | 11 | 10245 12 | 10000 13 | 13348 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug131.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | const a uint64 = 10; 11 | var b int64 = a; // ERROR "convert|cannot|incompatible" 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug287.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Used to die dividing by zero; issue 879. 8 | 9 | package main 10 | 11 | var mult [3][...]byte = [3][5]byte{} // ERROR "\.\.\." 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug298.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package ddd 8 | 9 | func Sum() int 10 | for i := range []int{} { return i } // ERROR "statement outside function|expected" 11 | 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug322.dir/lib.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package lib 6 | 7 | type T struct { 8 | x int // non-exported field 9 | } 10 | 11 | func (t T) M() { 12 | } 13 | 14 | func (t *T) PM() { 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug394.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 2598 8 | package foo 9 | 10 | return nil // ERROR "non-declaration statement outside function body|expected declaration" 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug467.go: -------------------------------------------------------------------------------- 1 | // compiledir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Exported data for inlining could forget types of 8 | // local variables declared in inlinable bodies. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug468.go: -------------------------------------------------------------------------------- 1 | // rundir 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // The reflect package was not correctly checking field names 8 | // when checking for struct assignability. 9 | 10 | package ignored 11 | -------------------------------------------------------------------------------- /test/syntax/interface.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type T interface { 10 | f, g () // ERROR "name list not allowed in interface type" 11 | } 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /misc/cgo/life/main.out: -------------------------------------------------------------------------------- 1 | 2 | 3 | XXX XXX 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | XXX XXX 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/pkg/log/syslog/syslog_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package syslog provides a simple interface to the system log service. 6 | package syslog 7 | 8 | // BUG(akumar): This package is not implemented on Plan 9 yet. 9 | -------------------------------------------------------------------------------- /src/pkg/math/abs_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // func Abs(x float64) float64 6 | TEXT ·Abs(SB),7,$0 7 | FMOVD x+0(FP), F0 // F0=x 8 | FABS // F0=|x| 9 | FMOVDP F0, ret+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /src/pkg/math/abs_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | TEXT ·Abs(SB),7,$0 6 | MOVW x_lo+0(FP), R0 7 | MOVW x_hi+4(FP), R1 8 | AND $((1<<31)-1), R1 9 | MOVW R0, ret_lo+8(FP) 10 | MOVW R1, ret_hi+12(FP) 11 | RET 12 | -------------------------------------------------------------------------------- /src/pkg/math/signbit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package math 6 | 7 | // Signbit returns true if x is negative or negative zero. 8 | func Signbit(x float64) bool { 9 | return Float64bits(x)&(1<<63) != 0 10 | } 11 | -------------------------------------------------------------------------------- /test/bench/shootout/binary-tree-freelist.txt: -------------------------------------------------------------------------------- 1 | stretch tree of depth 16 check: -1 2 | 65536 trees of depth 4 check: -65536 3 | 16384 trees of depth 6 check: -16384 4 | 4096 trees of depth 8 check: -4096 5 | 1024 trees of depth 10 check: -1024 6 | 256 trees of depth 12 check: -256 7 | 64 trees of depth 14 check: -64 8 | long lived tree of depth 15 check: -1 9 | -------------------------------------------------------------------------------- /test/eof.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Test a source file does not need a final newline. 8 | // Compiles but does not run. 9 | 10 | // No newline at the end of this file. 11 | 12 | package main -------------------------------------------------------------------------------- /test/fixedbugs/bug122.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | // should allow at most 2 sizes 11 | a := make([]int, 10, 20, 30, 40); // ERROR "too many" 12 | } 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug123.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | const ( F = 1 ) 9 | func fn(i int) int { 10 | if i == F() { // ERROR "func" 11 | return 0 12 | } 13 | return 1 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug188.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | import "sort" 10 | 11 | func main() { 12 | sort.Sort(nil); 13 | var x int; 14 | sort(x); // ERROR "package" 15 | } 16 | -------------------------------------------------------------------------------- /test/index0.go: -------------------------------------------------------------------------------- 1 | // runoutput ./index.go 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of index and slice bounds checks. 8 | // The output is compiled and run. 9 | 10 | package main 11 | 12 | const pass = 0 13 | -------------------------------------------------------------------------------- /src/pkg/log/syslog/syslog_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package syslog provides a simple interface to the system log service. 6 | package syslog 7 | 8 | // BUG(brainman): This package is not implemented on Windows yet. 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug004.go: -------------------------------------------------------------------------------- 1 | // run 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | switch ; { case false: return; } // compiles; should be an error (should be simplevardecl before ;) 11 | } 12 | -------------------------------------------------------------------------------- /test/fixedbugs/bug235.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // used to crash the compiler 8 | 9 | package bug235 10 | 11 | type T struct { 12 | x [4]byte 13 | } 14 | 15 | var p *T 16 | var v = *p 17 | 18 | -------------------------------------------------------------------------------- /test/fixedbugs/issue5259.dir/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "./bug" 8 | 9 | type foo int 10 | 11 | func (f *foo) Bar() { 12 | } 13 | 14 | func main() { 15 | bug.Foo(new(foo)) 16 | } 17 | -------------------------------------------------------------------------------- /test/import4.go: -------------------------------------------------------------------------------- 1 | // errorcheckdir 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Verify that various kinds of "imported and not used" 8 | // errors are caught by the compiler. 9 | // Does not compile. 10 | 11 | package ignored 12 | -------------------------------------------------------------------------------- /test/index1.go: -------------------------------------------------------------------------------- 1 | // errorcheckoutput ./index.go 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of index and slice bounds checks. 8 | // The output is error checked. 9 | 10 | package main 11 | 12 | const pass = 1 13 | -------------------------------------------------------------------------------- /test/index2.go: -------------------------------------------------------------------------------- 1 | // errorcheckoutput ./index.go 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Generate test of index and slice bounds checks. 8 | // The output is error checked. 9 | 10 | package main 11 | 12 | const pass = 2 13 | -------------------------------------------------------------------------------- /test/syntax/semi2.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | switch x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined" 11 | { 12 | z 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/syntax/typesw.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | switch main() := interface{}(nil).(type) { // ERROR "invalid variable name" 11 | default: 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /misc/cgo/stdio/hello.go: -------------------------------------------------------------------------------- 1 | // cmpout 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build ignore 8 | 9 | package main 10 | 11 | import "../stdio" 12 | 13 | func main() { 14 | stdio.Stdout.WriteString(stdio.Greeting + "\n") 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug103.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f() /* no return type */ {} 10 | 11 | func main() { 12 | x := f(); // ERROR "mismatch|as value|no type" 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug145.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type t int 10 | 11 | func main() { 12 | t := 0; 13 | _ = t; 14 | } 15 | 16 | /* 17 | bug145.go:8: t is type, not var 18 | */ 19 | -------------------------------------------------------------------------------- /test/fixedbugs/bug175.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func f() (int, bool) { return 0, true } 10 | 11 | func main() { 12 | x, y := f(), 2; // ERROR "multi" 13 | _, _ = x, y 14 | } 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug280.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // http://code.google.com/p/go/issues/detail?id=808 8 | 9 | package main 10 | 11 | type A [...]int // ERROR "outside of array literal" 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug345.dir/io.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package io 6 | 7 | type Writer interface { 8 | WrongWrite() 9 | } 10 | 11 | type SectionReader struct { 12 | X int 13 | } 14 | 15 | func SR(*SectionReader) {} 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug437.dir/one.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package one 6 | 7 | type I1 interface { 8 | f() 9 | } 10 | 11 | type S1 struct { 12 | } 13 | 14 | func (s S1) f() { 15 | } 16 | 17 | func F1(i1 I1) { 18 | } 19 | -------------------------------------------------------------------------------- /test/syntax/else.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2011 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | if true { 11 | } else ; // ERROR "else must be followed by if or statement block|expected .if. or .{." 12 | } 13 | -------------------------------------------------------------------------------- /test/syntax/vareq.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | func main() { 10 | var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or '}' or newline" 11 | -------------------------------------------------------------------------------- /misc/cgo/testso/test.bash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2011 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | set -e 7 | $(go env CC) $(go env GOGCCFLAGS) -shared -o libcgosotest.so cgoso_c.c 8 | go build main.go 9 | LD_LIBRARY_PATH=. ./main 10 | rm -f libcgosotest.so main 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug081.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | const x x = 2 // ERROR "loop|type" 10 | 11 | /* 12 | bug081.go:3: first constant must evaluate an expression 13 | Bus error 14 | */ 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug165.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | type I interface { 10 | m(map[I] bool); // ok 11 | } 12 | 13 | type S struct { 14 | m map[S] bool; // ERROR "map key type" 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug186.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | const X = iota 10 | 11 | func f(x int) { } 12 | 13 | func main() { 14 | f(X); 15 | f(iota); // ERROR "iota" 16 | f(X); 17 | } 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug419.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // Issue 1811. 8 | // gccgo failed to compile this. 9 | 10 | package p 11 | 12 | type E interface{} 13 | 14 | type I interface { 15 | E 16 | E 17 | } 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug448.dir/pkg2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Issue 3843: inlining bug due to wrong receive operator precedence. 6 | 7 | package pkg2 8 | 9 | import "./pkg1" 10 | 11 | func F() { 12 | pkg1.Do() 13 | } 14 | 15 | -------------------------------------------------------------------------------- /test/fixedbugs/issue4429.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2012 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package p 8 | 9 | type a struct { 10 | a int 11 | } 12 | 13 | func main() { 14 | av := a{}; 15 | *a(av); // ERROR "invalid indirect" 16 | } 17 | -------------------------------------------------------------------------------- /test/syntax/vareq1.go: -------------------------------------------------------------------------------- 1 | // errorcheck 2 | 3 | // Copyright 2010 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or newline after top level declaration" 10 | 11 | -------------------------------------------------------------------------------- /misc/cgo/test/issue4273.c: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #ifdef __ELF__ 6 | __attribute__((weak)) 7 | __attribute__((visibility("hidden"))) 8 | void _compilerrt_abort_impl(const char *file, int line, const char *func) { 9 | } 10 | #endif 11 | -------------------------------------------------------------------------------- /misc/cgo/testso/cgoso.c: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "_cgo_export.h" 6 | 7 | #ifdef WIN32 8 | extern void setCallback(void *); 9 | void init() { 10 | setCallback(goCallback); 11 | } 12 | #else 13 | void init() {} 14 | #endif 15 | -------------------------------------------------------------------------------- /misc/cgo/testtls/tls_unix.c: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include 6 | 7 | static __thread int tls; 8 | 9 | void 10 | setTLS(int v) 11 | { 12 | tls = v; 13 | } 14 | 15 | int 16 | getTLS() 17 | { 18 | return tls; 19 | } 20 | -------------------------------------------------------------------------------- /src/pkg/net/empty.c: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This file is required to prevent compiler errors 6 | // when the package built with CGO_ENABLED=0. 7 | // Otherwise the compiler says: 8 | // pkg/net/fd_poll_runtime.go:15: missing function body 9 | -------------------------------------------------------------------------------- /src/pkg/runtime/cgo/setenv.c: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd linux netbsd openbsd 6 | 7 | #pragma cgo_import_static x_cgo_setenv 8 | 9 | void x_cgo_setenv(char**); 10 | void (*_cgo_setenv)(char**) = x_cgo_setenv; 11 | -------------------------------------------------------------------------------- /test/fixedbugs/bug164.go: -------------------------------------------------------------------------------- 1 | // compile 2 | 3 | // Copyright 2009 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package main 8 | 9 | // Multi-line string literal now allowed. 10 | 11 | const s = ` 12 | Hello, World! 13 | ` 14 | 15 | func main() { 16 | print(s) 17 | } 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug369.dir/pkg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package pkg 6 | 7 | func NonASCII(b []byte, i int) int { 8 | for i = 0; i < len(b); i++ { 9 | if b[i] >= 0x80 { 10 | break 11 | } 12 | } 13 | return i 14 | } 15 | 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug396.dir/two.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Use the functions in one.go so that the inlined 6 | // forms get type-checked. 7 | 8 | package two 9 | 10 | import "./one" 11 | 12 | func use() { 13 | _ = one.New(1) 14 | } --------------------------------------------------------------------------------