├── test ├── fixedbugs │ ├── bug328.out │ ├── bug409.out │ ├── bug106.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug222.dir │ │ ├── chanbug2.go │ │ └── chanbug.go │ ├── bug282.dir │ │ ├── p2.go │ │ └── p1.go │ ├── bug306.dir │ │ ├── p2.go │ │ └── p1.go │ ├── bug377.dir │ │ ├── two.go │ │ └── one.go │ ├── bug382.dir │ │ └── pkg.go │ ├── bug063.go │ ├── bug133.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug050.go │ ├── bug160.dir │ │ └── x.go │ ├── bug282.go │ ├── bug306.go │ ├── bug083.go │ ├── bug232.go │ ├── bug335.dir │ │ ├── a.go │ │ └── b.go │ ├── bug396.go │ ├── bug404.go │ ├── bug407.go │ ├── bug222.go │ ├── bug302.go │ ├── bug345.go │ ├── bug083.dir │ │ └── bug0.go │ ├── bug415.dir │ │ ├── main.go │ │ └── p.go │ ├── bug169.go │ ├── bug224.go │ ├── bug088.go │ ├── bug106.go │ ├── bug133.go │ ├── bug191.dir │ │ ├── b.go │ │ └── a.go │ ├── bug313.dir │ │ ├── b.go │ │ └── a.go │ ├── bug392.go │ ├── bug414.go │ ├── bug160.go │ ├── bug233.go │ ├── bug377.go │ ├── bug396.dir │ │ ├── one.go │ │ └── two.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 │ ├── bug021.go │ ├── bug248.dir │ │ ├── bug0.go │ │ └── bug1.go │ ├── bug324.go │ ├── bug367.go │ ├── bug048.go │ ├── bug077.go │ ├── bug182.go │ ├── bug108.go │ ├── bug129.go │ ├── bug318.go │ ├── bug030.go │ ├── bug172.go │ ├── bug328.go │ ├── bug376.go │ ├── bug380.go │ ├── bug062.go │ ├── bug074.go │ ├── bug115.go │ ├── bug192.go │ ├── bug335.go │ ├── bug039.go │ ├── bug171.go │ ├── bug198.go │ ├── bug322.go │ ├── bug415.go │ ├── bug002.go │ ├── bug015.go │ ├── bug053.go │ ├── bug078.go │ ├── bug202.go │ ├── bug420.go │ ├── bug040.go │ ├── bug051.go │ ├── bug067.go │ ├── bug118.go │ ├── bug351.go │ ├── bug391.go │ ├── bug399.go │ ├── bug413.go │ ├── bug131.go │ ├── bug287.go │ ├── bug298.go │ ├── bug322.dir │ │ └── lib.go │ ├── bug394.go │ ├── bug122.go │ ├── bug123.go │ ├── bug188.go │ ├── bug416.go │ ├── bug004.go │ ├── bug235.go │ ├── bug103.go │ ├── bug145.go │ ├── bug175.go │ ├── bug280.go │ ├── bug345.dir │ │ └── io.go │ ├── bug081.go │ ├── bug165.go │ ├── bug186.go │ ├── bug419.go │ ├── bug164.go │ ├── bug369.dir │ │ └── pkg.go │ ├── bug003.go │ ├── bug046.go │ ├── bug152.go │ ├── bug245.go │ ├── bug252.go │ ├── bug259.go │ ├── bug317.go │ ├── bug355.go │ ├── bug382.go │ ├── bug392.dir │ │ └── three.go │ ├── bug112.go │ ├── bug161.go │ ├── bug250.go │ ├── bug295.go │ ├── bug361.go │ ├── bug397.go │ ├── bug176.go │ ├── bug367.dir │ │ └── p.go │ ├── bug383.go │ ├── bug404.dir │ │ ├── two.go │ │ └── one.go │ ├── bug407.dir │ │ └── two.go │ ├── bug035.go │ ├── bug110.go │ ├── bug211.go │ ├── bug073.go │ ├── bug126.go │ ├── bug127.go │ ├── bug191.go │ ├── bug256.go │ ├── bug302.dir │ │ └── main.go │ ├── bug375.go │ ├── bug412.go │ ├── bug000.go │ ├── bug203.go │ ├── bug254.go │ ├── bug385_32.go │ ├── bug248.go │ ├── bug214.go │ ├── bug315.go │ ├── bug330.go │ ├── bug370.go │ ├── bug005.go │ ├── bug121.go │ ├── bug213.go │ ├── bug263.go │ └── bug290.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 │ │ ├── meteor-contest.txt │ │ ├── k-nucleotide.txt │ │ └── k-nucleotide-parallel.txt │ └── go1 │ │ ├── dummy.go │ │ └── Makefile ├── printbig.out ├── ken │ ├── string.out │ ├── cplx0.out │ └── for.go ├── dwarf │ ├── 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 ├── goprint.out ├── bugs │ ├── placeholder │ ├── 424.go │ └── 424.dir │ │ └── lib.go ├── deferprint.out ├── golden.out ├── safe │ ├── usesafe.go │ ├── nousesafe.go │ └── main.go ├── syntax │ ├── import.go │ ├── semi5.go │ ├── semi6.go │ ├── forvar.go │ ├── interface.go │ ├── semi2.go │ ├── typesw.go │ ├── else.go │ ├── vareq.go │ ├── vareq1.go │ ├── semi1.go │ ├── semi7.go │ ├── if.go │ ├── semi3.go │ └── semi4.go ├── helloworld.go ├── eof.go ├── gc1.go ├── eof1.go ├── empty.go ├── printbig.go └── ddd2.go ├── misc ├── goplay │ ├── README │ └── Makefile ├── osx │ ├── etc │ │ └── paths.d │ │ │ └── go │ └── README ├── dist │ ├── darwin │ │ ├── etc │ │ │ └── paths.d │ │ │ │ └── go │ │ └── README │ ├── windows │ │ └── images │ │ │ ├── Banner.jpg │ │ │ ├── Dialog.jpg │ │ │ ├── gopher.ico │ │ │ └── DialogLeft.jpg │ └── README ├── chrome │ └── gophertool │ │ ├── gopher.png │ │ └── README.txt ├── vim │ ├── ftdetect │ │ └── gofiletype.vim │ └── ftplugin │ │ └── go │ │ └── godoc.vim ├── dashboard │ ├── app │ │ ├── static │ │ │ ├── status_alert.gif │ │ │ └── status_good.gif │ │ ├── cron.yaml │ │ └── build │ │ │ └── notify.txt │ ├── godashboard │ │ ├── static │ │ │ └── favicon.ico │ │ ├── cron.yaml │ │ ├── _multiprocessing.py │ │ ├── fail-notify.txt │ │ ├── project-notify.txt │ │ └── auth.py │ └── builder │ │ └── Makefile ├── notepadplus │ └── README ├── cgo │ ├── testso │ │ ├── test.bash │ │ ├── cgoso_c.c │ │ ├── main.go │ │ └── cgoso.go │ ├── stdio │ │ └── hello.go │ ├── life │ │ ├── life.h │ │ ├── test.bash │ │ └── golden.out │ └── test │ │ ├── exports.go │ │ └── sleep_windows.go ├── swig │ └── stdio │ │ ├── hello.go │ │ └── file.swig └── zsh │ └── go ├── src ├── pkg │ ├── archive │ │ ├── tar │ │ │ └── testdata │ │ │ │ ├── small.txt │ │ │ │ ├── small2.txt │ │ │ │ ├── v7.tar │ │ │ │ └── writer-big.tar │ │ └── zip │ │ │ └── testdata │ │ │ ├── dd.zip │ │ │ ├── r.zip │ │ │ ├── test.zip │ │ │ ├── unix.zip │ │ │ ├── winxp.zip │ │ │ ├── readme.zip │ │ │ ├── symlink.zip │ │ │ ├── readme.notzip │ │ │ └── gophercolor16x16.png │ ├── net │ │ ├── http │ │ │ └── testdata │ │ │ │ ├── file │ │ │ │ ├── style.css │ │ │ │ └── index.html │ │ ├── cgo_bsd.go │ │ ├── cgo_linux.go │ │ ├── testdata │ │ │ └── hosts │ │ └── sendfile_stub.go │ ├── runtime │ │ ├── cgo │ │ │ └── gcc_arm.S │ │ ├── signals_plan9.h │ │ ├── defs_plan9_386.h │ │ ├── arch_386.h │ │ ├── arch_arm.h │ │ ├── arch_amd64.h │ │ ├── signals_windows.h │ │ ├── Makefile │ │ ├── rt0_netbsd_386.s │ │ ├── rt0_openbsd_386.s │ │ ├── rt0_netbsd_amd64.s │ │ ├── rt0_openbsd_amd64.s │ │ ├── rt0_darwin_386.s │ │ ├── rt0_freebsd_386.s │ │ ├── rt0_freebsd_amd64.s │ │ ├── rt0_linux_amd64.s │ │ ├── rt0_darwin_amd64.s │ │ ├── runtime1.goc │ │ ├── cgocall.h │ │ └── rt0_windows_amd64.s │ ├── go │ │ ├── build │ │ │ ├── pkgtest │ │ │ │ ├── sqrt_386_test.go │ │ │ │ ├── sqrt_amd64_test.go │ │ │ │ ├── sqrt_arm_test.go │ │ │ │ ├── sqrt_test.go │ │ │ │ ├── xsqrt_test.go │ │ │ │ ├── sqrt_amd64.s │ │ │ │ ├── sqrt_386.s │ │ │ │ ├── sqrt_arm.s │ │ │ │ └── pkgtest.go │ │ │ ├── syslist.go │ │ │ ├── cgotest │ │ │ │ ├── cgotest.h │ │ │ │ └── cgotest.c │ │ │ └── cmdtest │ │ │ │ └── main.go │ │ ├── printer │ │ │ └── testdata │ │ │ │ ├── empty.input │ │ │ │ └── empty.golden │ │ └── doc │ │ │ ├── testdata │ │ │ ├── a.0.golden │ │ │ ├── a.1.golden │ │ │ ├── a.2.golden │ │ │ ├── a0.go │ │ │ ├── a1.go │ │ │ ├── f.0.golden │ │ │ ├── f.2.golden │ │ │ └── f.1.golden │ │ │ └── Makefile │ ├── syscall │ │ ├── zsysnum_windows_386.go │ │ ├── zsysnum_windows_amd64.go │ │ ├── syscall_plan9_386.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 │ ├── 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.interlaced.gif │ │ └── png │ │ │ └── testdata │ │ │ ├── invalid-zlib.png │ │ │ ├── invalid-crc32.png │ │ │ ├── invalid-noend.png │ │ │ ├── invalid-trunc.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 │ ├── debug │ │ ├── dwarf │ │ │ └── testdata │ │ │ │ ├── typedef.elf │ │ │ │ └── typedef.macho │ │ ├── pe │ │ │ └── testdata │ │ │ │ ├── gcc-386-mingw-obj │ │ │ │ ├── gcc-386-mingw-exec │ │ │ │ └── hello.c │ │ ├── elf │ │ │ └── testdata │ │ │ │ ├── gcc-386-freebsd-exec │ │ │ │ ├── gcc-amd64-linux-exec │ │ │ │ ├── go-relocation-test-gcc441-x86.obj │ │ │ │ ├── go-relocation-test-gcc424-x86-64.obj │ │ │ │ └── go-relocation-test-gcc441-x86-64.obj │ │ ├── macho │ │ │ └── testdata │ │ │ │ ├── gcc-386-darwin-exec │ │ │ │ ├── gcc-amd64-darwin-exec │ │ │ │ ├── hello.c │ │ │ │ └── gcc-amd64-darwin-exec-debug │ │ └── gosym │ │ │ └── pclinetest.h │ ├── encoding │ │ └── json │ │ │ └── testdata │ │ │ └── code.json.gz │ ├── regexp │ │ └── testdata │ │ │ └── re2-exhaustive.txt.bz2 │ ├── exp │ │ ├── README │ │ └── html │ │ │ └── testdata │ │ │ └── webkit │ │ │ ├── plain-text-unsafe.dat │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ └── scripted │ │ │ └── adoption01.dat │ ├── math │ │ ├── abs_arm.s │ │ ├── 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 │ │ │ └── rect.go │ │ ├── floor_arm.s │ │ ├── floor_amd64.s │ │ ├── abs_386.s │ │ ├── export_test.go │ │ ├── signbit.go │ │ ├── abs_amd64.s │ │ ├── atan_386.s │ │ └── log_386.s │ ├── os │ │ ├── export_test.go │ │ └── signal │ │ │ └── signal_stub.go │ ├── mime │ │ └── test.types │ ├── crypto │ │ └── tls │ │ │ └── root_stub.go │ ├── sort │ │ ├── export_test.go │ │ └── example_test.go │ ├── strings │ │ └── export_test.go │ ├── bytes │ │ ├── export_test.go │ │ ├── bytes_decl.go │ │ └── asm_arm.s │ ├── sync │ │ └── export_test.go │ ├── time │ │ └── internal_test.go │ └── unicode │ │ └── digit.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 │ │ │ ├── rewrite1.golden │ │ │ └── rewrite1.input │ ├── godoc │ │ └── README.godoc-app │ ├── 5c │ │ └── Makefile │ ├── 5g │ │ └── Makefile │ ├── 5l │ │ ├── Makefile │ │ └── doc.go │ ├── 6c │ │ └── Makefile │ ├── 6g │ │ └── Makefile │ ├── 6l │ │ ├── Makefile │ │ └── doc.go │ ├── 8c │ │ └── Makefile │ ├── 8g │ │ └── Makefile │ ├── 8l │ │ ├── Makefile │ │ └── doc.go │ ├── cov │ │ └── Makefile │ ├── nm │ │ └── Makefile │ ├── pack │ │ └── Makefile │ ├── prof │ │ └── Makefile │ ├── api │ │ └── testdata │ │ │ └── src │ │ │ └── pkg │ │ │ └── p2 │ │ │ ├── p2.go │ │ │ └── golden.txt │ ├── go │ │ ├── mkdoc.sh │ │ └── script │ ├── vet │ │ └── Makefile │ ├── 5a │ │ └── Makefile │ ├── 6a │ │ └── Makefile │ ├── 8a │ │ └── Makefile │ ├── cc │ │ ├── Makefile │ │ └── doc.go │ ├── yacc │ │ └── Makefile │ └── gc │ │ └── md5.h ├── lib9 │ └── Makefile ├── libbio │ └── Makefile └── libmach │ └── Makefile ├── doc ├── articles │ ├── wiki │ │ ├── test_Test.txt.good │ │ ├── test_view.good │ │ ├── view.html │ │ ├── test_edit.good │ │ ├── edit.html │ │ ├── http-sample.go │ │ └── htmlify.go │ ├── slice-1.png │ ├── slice-2.png │ ├── slice-3.png │ ├── slice-array.png │ └── slice-struct.png ├── ie.css ├── logo.png ├── sieve.gif ├── gopher │ ├── ref.png │ ├── bumper.png │ ├── gopherbw.png │ ├── frontpage.png │ ├── appenginelogo.gif │ ├── bumper192x108.png │ ├── bumper320x180.png │ ├── bumper480x270.png │ ├── bumper640x360.png │ ├── gophercolor.png │ ├── appenginegopher.jpg │ ├── gophercolor16x16.png │ └── appenginegophercolor.jpg ├── video-001.png ├── video-002.png ├── video-003.png ├── video-004.png ├── video-005.jpg ├── go-logo-blue.png ├── logo-153x55.png ├── play_overlay.png ├── codewalk │ └── popout.png ├── go-logo-black.png ├── go-logo-white.png ├── button_background.png ├── talks │ ├── io2010 │ │ └── talk.pdf │ ├── java-typing.png │ ├── go_talk-20091030.pdf │ ├── io2011 │ │ ├── Real_World_Go.pdf │ │ └── Writing_Web_Apps_in_Go.pdf │ └── gofrontend-gcc-summit-2010.pdf ├── ExpressivenessOfGo.pdf ├── progs │ ├── helloworld.go │ └── strings.go └── devel │ └── index.html ├── robots.txt ├── include ├── utf.h └── plan9 │ ├── mach.h │ ├── ureg_arm.h │ ├── ureg_x86.h │ └── ureg_amd64.h ├── favicon.ico └── lib ├── codereview └── codereview.cfg ├── time └── zoneinfo.zip └── godoc └── error.html /test/fixedbugs/bug328.out: -------------------------------------------------------------------------------- 1 | 0x0 2 | -------------------------------------------------------------------------------- /misc/goplay/README: -------------------------------------------------------------------------------- 1 | See doc.go. 2 | -------------------------------------------------------------------------------- /test/helloworld.out: -------------------------------------------------------------------------------- 1 | hello, world 2 | -------------------------------------------------------------------------------- /test/sigchld.out: -------------------------------------------------------------------------------- 1 | survived SIGCHLD 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 | -------------------------------------------------------------------------------- /misc/osx/etc/paths.d/go: -------------------------------------------------------------------------------- 1 | /usr/local/go/bin 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/runtime/cgo/gcc_arm.S: -------------------------------------------------------------------------------- 1 | /* unimplemented */ 2 | -------------------------------------------------------------------------------- /test/bench/shootout/spectral-norm.txt: -------------------------------------------------------------------------------- 1 | 1.274224152 2 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/small2.txt: -------------------------------------------------------------------------------- 1 | Google.com 2 | -------------------------------------------------------------------------------- /src/pkg/runtime/signals_plan9.h: -------------------------------------------------------------------------------- 1 | // nothing to see here 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/go/build/pkgtest/sqrt_386_test.go: -------------------------------------------------------------------------------- 1 | package pkgtest 2 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/sqrt_amd64_test.go: -------------------------------------------------------------------------------- 1 | package pkgtest 2 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/sqrt_arm_test.go: -------------------------------------------------------------------------------- 1 | package pkgtest 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/logo.png -------------------------------------------------------------------------------- /doc/sieve.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/sieve.gif -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/favicon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/codereview/codereview.cfg: -------------------------------------------------------------------------------- 1 | defaultcc: golang-dev@googlegroups.com 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doc/gopher/ref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/ref.png -------------------------------------------------------------------------------- /doc/video-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/video-001.png -------------------------------------------------------------------------------- /doc/video-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/video-002.png -------------------------------------------------------------------------------- /doc/video-003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/video-003.png -------------------------------------------------------------------------------- /doc/video-004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/video-004.png -------------------------------------------------------------------------------- /doc/video-005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/video-005.jpg -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test/dwarf/z11.go: -------------------------------------------------------------------------------- 1 | 2 | //line x11.go:4 3 | package main 4 | func F11() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z12.go: -------------------------------------------------------------------------------- 1 | 2 | //line x12.go:4 3 | package main 4 | func F12() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z13.go: -------------------------------------------------------------------------------- 1 | 2 | //line x13.go:4 3 | package main 4 | func F13() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z14.go: -------------------------------------------------------------------------------- 1 | 2 | //line x14.go:4 3 | package main 4 | func F14() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z15.go: -------------------------------------------------------------------------------- 1 | 2 | //line x15.go:4 3 | package main 4 | func F15() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z16.go: -------------------------------------------------------------------------------- 1 | 2 | //line x16.go:4 3 | package main 4 | func F16() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z17.go: -------------------------------------------------------------------------------- 1 | 2 | //line x17.go:4 3 | package main 4 | func F17() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z19.go: -------------------------------------------------------------------------------- 1 | 2 | //line x19.go:4 3 | package main 4 | func F19() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z2.go: -------------------------------------------------------------------------------- 1 | 2 | //line x2.go:4 3 | package main 4 | func F2() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z20.go: -------------------------------------------------------------------------------- 1 | 2 | //line x20.go:4 3 | package main 4 | func F20() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z3.go: -------------------------------------------------------------------------------- 1 | 2 | //line x3.go:4 3 | package main 4 | func F3() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z4.go: -------------------------------------------------------------------------------- 1 | 2 | //line x4.go:4 3 | package main 4 | func F4() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z5.go: -------------------------------------------------------------------------------- 1 | 2 | //line x5.go:4 3 | package main 4 | func F5() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z6.go: -------------------------------------------------------------------------------- 1 | 2 | //line x6.go:4 3 | package main 4 | func F6() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z7.go: -------------------------------------------------------------------------------- 1 | 2 | //line x7.go:4 3 | package main 4 | func F7() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z8.go: -------------------------------------------------------------------------------- 1 | 2 | //line x8.go:4 3 | package main 4 | func F8() {} 5 | -------------------------------------------------------------------------------- /test/dwarf/z9.go: -------------------------------------------------------------------------------- 1 | 2 | //line x9.go:4 3 | package main 4 | func F9() {} 5 | -------------------------------------------------------------------------------- /doc/go-logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/go-logo-blue.png -------------------------------------------------------------------------------- /doc/logo-153x55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/logo-153x55.png -------------------------------------------------------------------------------- /doc/play_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/play_overlay.png -------------------------------------------------------------------------------- /src/pkg/runtime/defs_plan9_386.h: -------------------------------------------------------------------------------- 1 | // nothing to see here 2 | #define tos_pid 48 3 | -------------------------------------------------------------------------------- /test/dwarf/z1.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | //line x1.go:4 4 | package main 5 | func F1() {} 6 | -------------------------------------------------------------------------------- /test/dwarf/z18.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | //line x18.go:4 4 | package main 5 | func F18() {} 6 | -------------------------------------------------------------------------------- /doc/codewalk/popout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/codewalk/popout.png -------------------------------------------------------------------------------- /doc/go-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/go-logo-black.png -------------------------------------------------------------------------------- /doc/go-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/go-logo-white.png -------------------------------------------------------------------------------- /doc/gopher/bumper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/bumper.png -------------------------------------------------------------------------------- /doc/gopher/gopherbw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/gopherbw.png -------------------------------------------------------------------------------- /lib/time/zoneinfo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/lib/time/zoneinfo.zip -------------------------------------------------------------------------------- /src/pkg/runtime/arch_386.h: -------------------------------------------------------------------------------- 1 | enum { 2 | thechar = '8', 3 | CacheLineSize = 64 4 | }; 5 | -------------------------------------------------------------------------------- /src/pkg/runtime/arch_arm.h: -------------------------------------------------------------------------------- 1 | enum { 2 | thechar = '5', 3 | CacheLineSize = 32 4 | }; 5 | -------------------------------------------------------------------------------- /test/dwarf/z10.go: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | //line x10.go:4 5 | package main 6 | func F10() {} 7 | -------------------------------------------------------------------------------- /test/goprint.out: -------------------------------------------------------------------------------- 1 | 42 true false true +1.500000e+000 world 0x0 [0/0]0x0 0x0 0x0 255 2 | -------------------------------------------------------------------------------- /doc/articles/slice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/articles/slice-1.png -------------------------------------------------------------------------------- /doc/articles/slice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/articles/slice-2.png -------------------------------------------------------------------------------- /doc/articles/slice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/articles/slice-3.png -------------------------------------------------------------------------------- /doc/button_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/button_background.png -------------------------------------------------------------------------------- /doc/gopher/frontpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/frontpage.png -------------------------------------------------------------------------------- /doc/talks/io2010/talk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/io2010/talk.pdf -------------------------------------------------------------------------------- /doc/talks/java-typing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/java-typing.png -------------------------------------------------------------------------------- /src/pkg/runtime/arch_amd64.h: -------------------------------------------------------------------------------- 1 | enum { 2 | thechar = '6', 3 | CacheLineSize = 64 4 | }; 5 | -------------------------------------------------------------------------------- /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/fixedbugs/bug409.out: -------------------------------------------------------------------------------- 1 | +1.000000e+000 +2.000000e+000 +3.000000e+000 +4.000000e+000 2 | -------------------------------------------------------------------------------- /doc/ExpressivenessOfGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/ExpressivenessOfGo.pdf -------------------------------------------------------------------------------- /doc/articles/slice-array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/articles/slice-array.png -------------------------------------------------------------------------------- /doc/gopher/appenginelogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/appenginelogo.gif -------------------------------------------------------------------------------- /doc/gopher/bumper192x108.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/bumper192x108.png -------------------------------------------------------------------------------- /doc/gopher/bumper320x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/bumper320x180.png -------------------------------------------------------------------------------- /doc/gopher/bumper480x270.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/bumper480x270.png -------------------------------------------------------------------------------- /doc/gopher/bumper640x360.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/bumper640x360.png -------------------------------------------------------------------------------- /doc/gopher/gophercolor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/gophercolor.png -------------------------------------------------------------------------------- /doc/articles/slice-struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/articles/slice-struct.png -------------------------------------------------------------------------------- /doc/gopher/appenginegopher.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/appenginegopher.jpg -------------------------------------------------------------------------------- /doc/talks/go_talk-20091030.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/go_talk-20091030.pdf -------------------------------------------------------------------------------- /src/cmd/godoc/README.godoc-app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/cmd/godoc/README.godoc-app -------------------------------------------------------------------------------- /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/gopher/gophercolor16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/gophercolor16x16.png -------------------------------------------------------------------------------- /misc/chrome/gophertool/gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/chrome/gophertool/gopher.png -------------------------------------------------------------------------------- /src/pkg/text/template/testdata/file1.tmpl: -------------------------------------------------------------------------------- 1 | {{define "x"}}TEXT{{end}} 2 | {{define "dotV"}}{{.V}}{{end}} 3 | -------------------------------------------------------------------------------- /test/bench/go1/dummy.go: -------------------------------------------------------------------------------- 1 | package go1 2 | 3 | // Nothing to see here: everything is in the _test files. 4 | -------------------------------------------------------------------------------- /doc/gopher/appenginegophercolor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/gopher/appenginegophercolor.jpg -------------------------------------------------------------------------------- /doc/talks/io2011/Real_World_Go.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/io2011/Real_World_Go.pdf -------------------------------------------------------------------------------- /misc/dist/windows/images/Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dist/windows/images/Banner.jpg -------------------------------------------------------------------------------- /misc/dist/windows/images/Dialog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dist/windows/images/Dialog.jpg -------------------------------------------------------------------------------- /misc/dist/windows/images/gopher.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dist/windows/images/gopher.ico -------------------------------------------------------------------------------- /src/cmd/gofmt/testdata/old.input: -------------------------------------------------------------------------------- 1 | package P 2 | 3 | func f() { 4 | if x { 5 | y 6 | } else 7 | z 8 | } 9 | -------------------------------------------------------------------------------- /src/pkg/archive/tar/testdata/v7.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/tar/testdata/v7.tar -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/dd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/dd.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/r.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/r.zip -------------------------------------------------------------------------------- /test/bench/shootout/mandelbrot.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/test/bench/shootout/mandelbrot.txt -------------------------------------------------------------------------------- /test/bugs/placeholder: -------------------------------------------------------------------------------- 1 | This file keeps Mercurial from deleting the directory 2 | when there are no known bugs. 3 | -------------------------------------------------------------------------------- /misc/vim/ftdetect/gofiletype.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile *.go set filetype=go fileencoding=utf-8 fileencodings=utf-8 2 | -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/test.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/unix.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/unix.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/winxp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/winxp.zip -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-001.gif -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-001.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-001.png -------------------------------------------------------------------------------- /doc/talks/gofrontend-gcc-summit-2010.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/gofrontend-gcc-summit-2010.pdf -------------------------------------------------------------------------------- /misc/dist/windows/images/DialogLeft.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dist/windows/images/DialogLeft.jpg -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/readme.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/readme.zip -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/symlink.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/symlink.zip -------------------------------------------------------------------------------- /src/pkg/debug/dwarf/testdata/typedef.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/dwarf/testdata/typedef.elf -------------------------------------------------------------------------------- /doc/talks/io2011/Writing_Web_Apps_in_Go.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/doc/talks/io2011/Writing_Web_Apps_in_Go.pdf -------------------------------------------------------------------------------- /misc/dashboard/app/static/status_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dashboard/app/static/status_alert.gif -------------------------------------------------------------------------------- /misc/dashboard/app/static/status_good.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dashboard/app/static/status_good.gif -------------------------------------------------------------------------------- /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/archive/tar/testdata/writer-big.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/tar/testdata/writer-big.tar -------------------------------------------------------------------------------- /src/pkg/archive/zip/testdata/readme.notzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/readme.notzip -------------------------------------------------------------------------------- /src/pkg/debug/dwarf/testdata/typedef.macho: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/dwarf/testdata/typedef.macho -------------------------------------------------------------------------------- /src/pkg/debug/pe/testdata/gcc-386-mingw-obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/pe/testdata/gcc-386-mingw-obj -------------------------------------------------------------------------------- /src/pkg/encoding/json/testdata/code.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/encoding/json/testdata/code.json.gz -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-zlib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/invalid-zlib.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.5bpp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-001.5bpp.gif -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-005.gray.jpeg -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-005.gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-005.gray.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /misc/dashboard/godashboard/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/misc/dashboard/godashboard/static/favicon.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/debug/pe/testdata/gcc-386-mingw-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/pe/testdata/gcc-386-mingw-exec -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-crc32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/invalid-crc32.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-noend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/invalid-noend.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/invalid-trunc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/invalid-trunc.png -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/gcc-386-freebsd-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/elf/testdata/gcc-386-freebsd-exec -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/gcc-amd64-linux-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/elf/testdata/gcc-amd64-linux-exec -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-386-darwin-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/macho/testdata/gcc-386-darwin-exec -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g01.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g02.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g04.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn2c08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn2c16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p01.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p02.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p04.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn4a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn4a08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn4a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn4a16.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn6a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn6a08.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn6a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn6a16.png -------------------------------------------------------------------------------- /src/pkg/image/testdata/video-001.interlaced.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/testdata/video-001.interlaced.gif -------------------------------------------------------------------------------- /src/pkg/regexp/testdata/re2-exhaustive.txt.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/regexp/testdata/re2-exhaustive.txt.bz2 -------------------------------------------------------------------------------- /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/gophercolor16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/archive/zip/testdata/gophercolor16x16.png -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /misc/dashboard/godashboard/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: daily package maintenance 3 | url: /package/daily 4 | schedule: every 24 hours 5 | -------------------------------------------------------------------------------- /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/image/png/testdata/pngsuite/basn0g01-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g01-30.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g02-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g02-29.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn0g04-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn0g04-31.png -------------------------------------------------------------------------------- /src/pkg/image/png/testdata/pngsuite/basn3p08-trns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/image/png/testdata/pngsuite/basn3p08-trns.png -------------------------------------------------------------------------------- /misc/dashboard/app/cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: update rolling package install counts 3 | url: /install/cron 4 | schedule: every 24 hours 5 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec-debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/macho/testdata/gcc-amd64-darwin-exec-debug -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /misc/osx/README: -------------------------------------------------------------------------------- 1 | Use package.bash to construct a package file (Go.pkg) for installation on OS X. 2 | 3 | This script depends on PackageMaker (Developer Tools). 4 | -------------------------------------------------------------------------------- /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/debug/elf/testdata/go-relocation-test-gcc441-x86.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86.obj -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doc/articles/wiki/view.html: -------------------------------------------------------------------------------- 1 |

{{.Title |html}}

2 | 3 |

[edit]

4 | 5 |
{{printf "%s" .Body |html}}
6 | -------------------------------------------------------------------------------- /misc/dist/README: -------------------------------------------------------------------------------- 1 | This directory contains the binary distribution packaging scripts for the 2 | supported GOOSes. 3 | 4 | To build a package, run $GOOS/dist.bash. 5 | -------------------------------------------------------------------------------- /misc/dist/darwin/README: -------------------------------------------------------------------------------- 1 | Use dist.bash to construct a package file (Go.pkg) for installation on OS X. 2 | 3 | This script depends on PackageMaker (Developer Tools). 4 | -------------------------------------------------------------------------------- /src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tav/go/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/tav/go/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj -------------------------------------------------------------------------------- /src/pkg/exp/README: -------------------------------------------------------------------------------- 1 | This directory tree contains experimental packages and 2 | unfinished code that is subject to even more change than the 3 | rest of the Go tree. 4 | -------------------------------------------------------------------------------- /src/pkg/exp/html/testdata/webkit/plain-text-unsafe.dat: -------------------------------------------------------------------------------- 1 | #data 2 | FOO ZOO 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | "FOO ZOO" 9 | -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /src/pkg/go/build/syslist.go: -------------------------------------------------------------------------------- 1 | // Generated automatically by make. 2 | 3 | package build 4 | 5 | const goosList = "darwin freebsd linux netbsd openbsd plan9 windows " 6 | const goarchList = "386 amd64 arm " 7 | -------------------------------------------------------------------------------- /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/bench/go1/Makefile: -------------------------------------------------------------------------------- 1 | include $(GOROOT)/src/Make.inc 2 | 3 | TARG=go1 4 | GOFILES=\ 5 | dummy.go\ 6 | 7 | include $(GOROOT)/src/Make.pkg 8 | 9 | test: 10 | echo go1: tests disabled for now TODO 11 | -------------------------------------------------------------------------------- /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/cov/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/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/cmd/prof/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/go/doc/testdata/a.0.golden: -------------------------------------------------------------------------------- 1 | // comment 0 comment 1 2 | PACKAGE a 3 | 4 | IMPORTPATH 5 | testdata/a 6 | 7 | FILENAMES 8 | testdata/a0.go 9 | testdata/a1.go 10 | 11 | BUGS 12 | // bug0 13 | // bug1 14 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/a.1.golden: -------------------------------------------------------------------------------- 1 | // comment 0 comment 1 2 | PACKAGE a 3 | 4 | IMPORTPATH 5 | testdata/a 6 | 7 | FILENAMES 8 | testdata/a0.go 9 | testdata/a1.go 10 | 11 | BUGS 12 | // bug0 13 | // bug1 14 | -------------------------------------------------------------------------------- /src/pkg/go/doc/testdata/a.2.golden: -------------------------------------------------------------------------------- 1 | // comment 0 comment 1 2 | PACKAGE a 3 | 4 | IMPORTPATH 5 | testdata/a 6 | 7 | FILENAMES 8 | testdata/a0.go 9 | testdata/a1.go 10 | 11 | BUGS 12 | // bug0 13 | // bug1 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/syscall/syscall_plan9_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 | -------------------------------------------------------------------------------- /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/exp/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat: -------------------------------------------------------------------------------- 1 | #data 2 | fillertext 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | "fillertext" 9 | |
10 | -------------------------------------------------------------------------------- /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 | B ·abs(SB) 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /misc/dashboard/godashboard/_multiprocessing.py: -------------------------------------------------------------------------------- 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 | import multiprocessing 6 | -------------------------------------------------------------------------------- /src/pkg/go/build/cgotest/cgotest.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 | extern int Add(int, int, int *); 6 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/go/doc/testdata/a0.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 0 6 | package a 7 | 8 | //BUG(uid): bug0 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 help documentation > doc.go 7 | gofmt -w doc.go 8 | 9 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_netbsd_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 | TEXT _rt0_386_netbsd(SB),7,$0 6 | JMP _rt0_386(SB) 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/bug282.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/p1.go && $G $D/$F.dir/p2.go 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 | // $G $D/$F.dir/p1.go && $G $D/$F.dir/p2.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 | ignored 8 | -------------------------------------------------------------------------------- /misc/dashboard/godashboard/fail-notify.txt: -------------------------------------------------------------------------------- 1 | Change {{node}} broke the {{builder}} build: 2 | http://godashboard.appspot.com/log/{{loghash}} 3 | 4 | {{desc}} 5 | 6 | http://code.google.com/p/go/source/detail?r={{node}} 7 | 8 | $ tail -n 100 < log 9 | {{log}} 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_openbsd_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 | TEXT _rt0_386_openbsd(SB),7,$0 6 | JMP _rt0_386(SB) 7 | -------------------------------------------------------------------------------- /test/fixedbugs/bug083.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/bug0.go && errchk $G $D/$F.dir/bug1.go 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/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/a.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 a 6 | 7 | import "./b" 8 | 9 | var Bar = b.Foo 10 | -------------------------------------------------------------------------------- /test/fixedbugs/bug396.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go 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 | // $G $D/$F.dir/one.go && $G $D/$F.dir/two.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 | package ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug407.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go 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/bug222.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/chanbug.go && $G -I. $D/$F.dir/chanbug2.go 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 | -------------------------------------------------------------------------------- /doc/articles/wiki/edit.html: -------------------------------------------------------------------------------- 1 |

Editing {{.Title |html}}

2 | 3 |
4 |
5 |
6 | 7 | -------------------------------------------------------------------------------- /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/bug302.go: -------------------------------------------------------------------------------- 1 | // $G $D/bug302.dir/p.go && pack grc pp.a p.$A && $G $D/bug302.dir/main.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 | -------------------------------------------------------------------------------- /test/fixedbugs/bug345.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/io.go && errchk $G -e $D/$F.dir/main.go 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/go/build/cgotest/cgotest.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 | int 6 | Add(int x, int y, int *sum) 7 | { 8 | sum = x+y; 9 | } 10 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/sqrt_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 pkgtest 6 | 7 | import "fmt" 8 | 9 | var _ = fmt.Printf 10 | -------------------------------------------------------------------------------- /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/main.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 | -------------------------------------------------------------------------------- /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 | gomake out 8 | LD_LIBRARY_PATH=. ./out 9 | gomake clean 10 | -------------------------------------------------------------------------------- /src/cmd/vet/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 | test testshort: 6 | go build 7 | ../../../test/errchk ./vet -printfuncs='Warn:1,Warnf:1' print.go 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/mime/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/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/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 | -------------------------------------------------------------------------------- /lib/godoc/error.html: -------------------------------------------------------------------------------- 1 | 6 | 7 |

8 | {{html .}} 9 |

10 | -------------------------------------------------------------------------------- /misc/cgo/testso/cgoso_c.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 | void sofunc(void) 6 | { 7 | extern void goCallback(void); 8 | goCallback(); 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /test/fixedbugs/bug088.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go || echo BUG: fails incorrectly 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 | // $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go || echo BUG: failed to 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 | ignored 8 | -------------------------------------------------------------------------------- /test/fixedbugs/bug133.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go && errchk $G $D/$F.dir/bug2.go 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/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/bug392.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go && $G $D/$F.dir/three.go 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/bug414.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/p1.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out 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 | -------------------------------------------------------------------------------- /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 | package main 6 | 7 | import "cgosotest" 8 | 9 | func main() { 10 | cgosotest.Test() 11 | } 12 | -------------------------------------------------------------------------------- /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 | gobuilder: $(shell ls *.go) 6 | go build -o $@ $^ 7 | 8 | clean: 9 | rm -f gobuilder 10 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/xsqrt_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 pkgtest_test 6 | 7 | import "pkgtest" 8 | 9 | var _ = pkgtest.Foo 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 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_netbsd_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 | TEXT _rt0_amd64_netbsd(SB),7,$-8 6 | MOVQ $_rt0_amd64(SB), DX 7 | MOVQ SP, DI 8 | JMP DX 9 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_openbsd_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 | TEXT _rt0_amd64_openbsd(SB),7,$-8 6 | MOVQ $_rt0_amd64(SB), DX 7 | MOVQ SP, DI 8 | JMP DX 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug160.go: -------------------------------------------------------------------------------- 1 | // $G $D/bug160.dir/x.go && $G $D/bug160.dir/y.go && $L y.$A && ./$A.out 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 | nothing to see here 8 | -------------------------------------------------------------------------------- /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/bug377.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go 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 | -------------------------------------------------------------------------------- /src/pkg/crypto/tls/root_stub.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 plan9 darwin,!cgo 6 | 7 | package tls 8 | 9 | func initDefaultRoots() { 10 | } 11 | -------------------------------------------------------------------------------- /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/strings/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 strings 6 | 7 | func (r *Replacer) Replacer() interface{} { 8 | return r.r 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/windows/syscall.goc 7 | // 8 | -------------------------------------------------------------------------------- /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 | type T struct { int } 8 | 9 | func New(i int) T { return T{i} } 10 | -------------------------------------------------------------------------------- /misc/dashboard/godashboard/project-notify.txt: -------------------------------------------------------------------------------- 1 | A new project has been submitted: 2 | 3 | Name: {{project.name}} 4 | Description: {{project.descr}} 5 | URL: {{project.web_url}} 6 | 7 | To edit/approve/delete: 8 | http://godashboard.appspot.com/project/edit?name={{project.name|toutf8|urlencode}} 9 | 10 | -------------------------------------------------------------------------------- /misc/swig/stdio/hello.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 main 6 | 7 | import "swig/file" 8 | 9 | func main() { 10 | file.Puts("Hello, world") 11 | } 12 | -------------------------------------------------------------------------------- /misc/zsh/go: -------------------------------------------------------------------------------- 1 | # install in /etc/zsh/zshrc or your personal .zshrc 2 | 3 | # gc 4 | prefixes=(5 6 8) 5 | for p in $prefixes; do 6 | compctl -g "*.${p}" ${p}l 7 | compctl -g "*.go" ${p}g 8 | done 9 | 10 | # standard go tools 11 | compctl -g "*.go" gofmt 12 | 13 | # gccgo 14 | compctl -g "*.go" gccgo 15 | -------------------------------------------------------------------------------- /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/windows/syscall.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 | -------------------------------------------------------------------------------- /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/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, r+8(FP) 9 | RET 10 | -------------------------------------------------------------------------------- /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/bug324.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out 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 1550 8 | ignored 9 | -------------------------------------------------------------------------------- /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 a.y 11 | -------------------------------------------------------------------------------- /src/pkg/os/signal/signal_stub.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 6 | 7 | package signal 8 | 9 | import "os" 10 | 11 | func enableSignal(sig os.Signal) {} 12 | -------------------------------------------------------------------------------- /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/bug367.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: should not fail 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/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 | == bugs/ 19 | 20 | =========== bugs/424.go 21 | BUG: myT3: lib.T.m called 22 | 23 | =========== bugs/bug395.go 24 | bug395 is broken 25 | -------------------------------------------------------------------------------- /misc/cgo/stdio/hello.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 "stdio" 8 | 9 | func main() { 10 | stdio.Stdout.WriteString(stdio.Greeting + "\n") 11 | } 12 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /misc/cgo/life/test.bash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2010 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 | gomake life 8 | echo '*' life >run.out 9 | ./life >>run.out 10 | diff run.out golden.out 11 | gomake clean 12 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/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, r+8(FP) 9 | RET 10 | -------------------------------------------------------------------------------- /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,r+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_freebsd_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 | // Darwin and Linux use the same linkage to main 6 | 7 | TEXT _rt0_386_freebsd(SB),7,$0 8 | JMP _rt0_386(SB) 9 | 10 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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,r+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /test/bugs/424.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/lib.go && $G $D/$F.dir/main.go && $L main.$A && $A.out 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 case for embedded method invocation. 8 | 9 | ignored 10 | -------------------------------------------------------------------------------- /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/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/pkg/bytes/export_test.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 bytes 6 | 7 | // Export func for testing 8 | var IndexBytePortable = indexBytePortable 9 | var EqualPortable = equalPortable 10 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/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,r+8(FP) 10 | RET 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/bug335.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/b.go && $G $D/$F.dir/a.go 2 | // rm -f a.$A b.$A 3 | 4 | // Copyright 2011 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 | // Issue 1705. 9 | 10 | unused (see script at top of file) 11 | -------------------------------------------------------------------------------- /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/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/swig/stdio/file.swig: -------------------------------------------------------------------------------- 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 | /* A trivial example of wrapping a C library using SWIG. */ 6 | 7 | %{ 8 | #include 9 | %} 10 | 11 | int puts(const char *); 12 | -------------------------------------------------------------------------------- /src/pkg/go/build/cmdtest/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 | package main 6 | 7 | import "go/build/pkgtest" 8 | 9 | func main() { 10 | pkgtest.Foo() 11 | print(int(pkgtest.Sqrt(9))) 12 | } 13 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/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,r+8(FP) 10 | RET 11 | -------------------------------------------------------------------------------- /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/bug322.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/lib.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: fails incorrectly 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 | ignored 9 | -------------------------------------------------------------------------------- /test/fixedbugs/bug415.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/p.go && $G $D/$F.dir/main.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 | // Issue 2716. Export metadata error made main.go not compile. 8 | 9 | package ignored 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/math/floor_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 ·Floor(SB),7,$0 6 | JMP ·floor(SB) 7 | 8 | TEXT ·Ceil(SB),7,$0 9 | JMP ·ceil(SB) 10 | 11 | TEXT ·Trunc(SB),7,$0 12 | JMP ·trunc(SB) 13 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_freebsd_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 | // Darwin and Linux use the same linkage to main 6 | 7 | TEXT _rt0_amd64_freebsd(SB),7,$-8 8 | MOVQ $_rt0_amd64(SB), DX 9 | JMP DX 10 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /src/pkg/go/build/pkgtest/pkgtest.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 pkgtest 6 | 7 | import "bytes" 8 | 9 | func Foo() *bytes.Buffer { 10 | return nil 11 | } 12 | 13 | func Sqrt(x float64) float64 14 | -------------------------------------------------------------------------------- /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/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 "redeclared|redefinition" "duplicate" 11 | } 12 | -------------------------------------------------------------------------------- /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/bug413.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 f(i int) int { return i } 10 | 11 | var i = func() int {a := f(i); return a}() // ERROR "initialization loop" -------------------------------------------------------------------------------- /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/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, r+8(FP) 10 | RET 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 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_linux_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 | // Darwin and Linux use the same linkage to main 6 | 7 | TEXT _rt0_amd64_linux(SB),7,$-8 8 | MOVQ $_rt0_amd64(SB), AX 9 | MOVQ SP, DI 10 | JMP AX 11 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/pkg/runtime/rt0_darwin_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 | // Darwin and Linux use the same linkage to main 6 | 7 | TEXT _rt0_amd64_darwin(SB),7,$-8 8 | MOVQ $_rt0_amd64(SB), AX 9 | MOVQ SP, DI 10 | JMP AX 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/fixedbugs/bug416.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 T struct { 10 | X int 11 | } 12 | 13 | func (t *T) X() {} // ERROR "type T has both field and method named X" 14 | -------------------------------------------------------------------------------- /src/cmd/5l/doc.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 | /* 6 | 7 | 5l is the linker for the ARM. 8 | The $GOARCH for these tools is arm. 9 | 10 | The flags are documented in ../ld/doc.go. 11 | 12 | */ 13 | package documentation 14 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /doc/progs/helloworld.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 fmt "fmt" // Package implementing formatted I/O. 8 | 9 | func main() { 10 | fmt.Printf("Hello, world; or Καλημέρα κόσμε; or こんにちは 世界\n") 11 | } 12 | -------------------------------------------------------------------------------- /misc/cgo/testso/cgoso.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 cgosotest 6 | 7 | //void sofunc(void); 8 | import "C" 9 | 10 | func Test() { 11 | C.sofunc() 12 | } 13 | 14 | //export goCallback 15 | func goCallback() { 16 | } 17 | -------------------------------------------------------------------------------- /src/cmd/6l/doc.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 | /* 6 | 7 | 6l is the linker for the x86-64. 8 | The $GOARCH for these tools is amd64. 9 | 10 | The flags are documented in ../ld/doc.go. 11 | 12 | */ 13 | package documentation 14 | -------------------------------------------------------------------------------- /src/cmd/cc/doc.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 | /* 6 | 7 | This directory contains the portable section of the Plan 9 C compilers. 8 | See ../6c, ../8c, and ../5c for more information. 9 | 10 | */ 11 | package documentation 12 | -------------------------------------------------------------------------------- /src/pkg/bytes/bytes_decl.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 bytes 6 | 7 | // IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s. 8 | func IndexByte(s []byte, c byte) int // asm_$GOARCH.s 9 | -------------------------------------------------------------------------------- /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/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/life/golden.out: -------------------------------------------------------------------------------- 1 | * life 2 | 3 | 4 | XXX XXX 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | XXX XXX 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/cmd/8l/doc.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 | /* 6 | 7 | 8l is the linker for the 32-bit x86. 8 | The $GOARCH for these tools is 386. 9 | 10 | The flags are documented in ../ld/doc.go. 11 | 12 | */ 13 | package documentation 14 | -------------------------------------------------------------------------------- /src/pkg/net/cgo_bsd.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 darwin freebsd 6 | 7 | package net 8 | 9 | /* 10 | #include 11 | */ 12 | import "C" 13 | 14 | func cgoAddrInfoMask() C.int { 15 | return C.AI_MASK 16 | } 17 | -------------------------------------------------------------------------------- /src/pkg/net/cgo_linux.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 cgoAddrInfoMask() C.int { 13 | return C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL 14 | } 15 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /test/gc1.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 | // A simple test of the garbage collector. 8 | 9 | package main 10 | 11 | func main() { 12 | for i := 0; i < 1e5; i++ { 13 | x := new([100]byte) 14 | _ = x 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /doc/devel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 12 | -------------------------------------------------------------------------------- /src/pkg/net/testdata/hosts: -------------------------------------------------------------------------------- 1 | 255.255.255.255 broadcasthost 2 | 127.0.0.2 odin 3 | 127.0.0.3 odin # inline comment 4 | ::2 odin 5 | 127.1.1.1 thor 6 | # aliases 7 | 127.1.1.2 ullr ullrhost 8 | # Bogus entries that must be ignored. 9 | 123.123.123 loki 10 | 321.321.321.321 11 | # TODO(yvesj): Should we be able to parse this? From a Darwin system. 12 | fe80::1%lo0 localhost 13 | -------------------------------------------------------------------------------- /test/eof1.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 that a comment ending a source file does not need a final newline. 8 | // Compiles but does not run. 9 | 10 | package eof1 11 | 12 | // No newline at the end of this comment. -------------------------------------------------------------------------------- /test/fixedbugs/bug003.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 true: return; default: return } 11 | } 12 | /* 13 | bug003.go:6: fatal error: walkswitch: not case EMPTY 14 | */ 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug046.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 *struct {} 10 | 11 | func (x T) M () {} // ERROR "pointer|receiver" 12 | 13 | /* 14 | bug046.go:7: illegal pointer 15 | */ 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug152.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 | s := 0; 11 | for _, v := range []int{1} { 12 | s += v; 13 | } 14 | if s != 1 { 15 | println("BUG: s =", s); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug245.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 | package main 8 | 9 | type T []int 10 | func (t T) m() 11 | 12 | func main() { 13 | _ = T{} 14 | } 15 | 16 | // bug245.go:14: fatal error: method mismatch: T for T 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug252.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 f(args ...int) { 10 | g(args) 11 | } 12 | 13 | func g(args ...interface{}) { 14 | f(args) // ERROR "cannot use|incompatible" 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug259.go: -------------------------------------------------------------------------------- 1 | // run 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 "fmt" 10 | 11 | var x = uint32(0x01020304) 12 | var y = [...]uint32{1,2,3,4,5} 13 | 14 | func main() { 15 | fmt.Sprint(y[byte(x)]) 16 | } 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug317.go: -------------------------------------------------------------------------------- 1 | // run 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 | x := []uint{0} 11 | x[0] &^= f() 12 | } 13 | 14 | func f() uint { 15 | return 1<<31 // doesn't panic with 1<<31 - 1 16 | } 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug355.go: -------------------------------------------------------------------------------- 1 | // run 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 f = func() int { 10 | type S int 11 | return 42 12 | } 13 | 14 | func main() { 15 | if f() != 42 { 16 | panic("BUG: bug355") 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/fixedbugs/bug382.go: -------------------------------------------------------------------------------- 1 | // $G $D/$F.dir/pkg.go && $G $D/$F.go || echo "Bug 382" 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 main 10 | import "./pkg" 11 | 12 | var x = pkg.E 13 | 14 | var fo = struct {F pkg.T}{F: x} 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug392.dir/three.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 three 9 | 10 | import "./two" 11 | 12 | var x = two.F() 13 | var v = two.V 14 | -------------------------------------------------------------------------------- /doc/progs/strings.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 "os" 8 | 9 | func main() { 10 | s := "hello" 11 | if s[1] != 'e' { 12 | os.Exit(1) 13 | } 14 | s = "good bye" 15 | var p *string = &s 16 | *p = "ciao" 17 | } 18 | -------------------------------------------------------------------------------- /src/pkg/time/internal_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 time 6 | 7 | func init() { 8 | // force US/Pacific for time zone tests 9 | localOnce.Do(initTestingZone) 10 | } 11 | 12 | var Interrupt = interrupt 13 | var DaysIn = daysIn 14 | -------------------------------------------------------------------------------- /test/empty.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 | // Test that top-level parenthesized declarations can be empty. 8 | // Compiles but does not run. 9 | 10 | package P 11 | 12 | import ( ) 13 | const ( ) 14 | var ( ) 15 | type ( ) 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug112.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 struct { s string } 10 | var t = T{"hi"} 11 | 12 | func main() {} 13 | 14 | /* 15 | bug112.go:6: illegal conversion of constant to T 16 | */ 17 | -------------------------------------------------------------------------------- /test/fixedbugs/bug161.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 P 8 | 9 | const a = 0; 10 | 11 | func f(a int) { 12 | a = 0; 13 | } 14 | 15 | /* 16 | bug161.go:8: operation LITERAL not allowed in assignment context 17 | */ 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug250.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 | package bug250 8 | 9 | type I1 interface { 10 | m() I2 11 | } 12 | 13 | type I2 interface { 14 | I1 15 | } 16 | 17 | var i1 I1 = i2 18 | var i2 I2 19 | var i2a I2 = i1 20 | -------------------------------------------------------------------------------- /test/fixedbugs/bug295.go: -------------------------------------------------------------------------------- 1 | // run 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 . "testing" // defines top-level T 10 | 11 | type S struct { 12 | T int 13 | } 14 | 15 | func main() { 16 | _ = &S{T: 1} // should work 17 | } 18 | -------------------------------------------------------------------------------- /test/fixedbugs/bug361.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 1908 8 | // unreasonable width used to be internal fatal error 9 | 10 | package test 11 | 12 | func main() { 13 | buf := [1<<30]byte{} 14 | _ = buf[:] 15 | } 16 | -------------------------------------------------------------------------------- /test/fixedbugs/bug397.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 | // Issue 2623 10 | var m = map[string]int { 11 | "abc":1, 12 | 1:2, // ERROR "cannot use 1.*as type string in map key|incompatible type" 13 | } 14 | -------------------------------------------------------------------------------- /test/printbig.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 big numbers work as constants and print can print them. 8 | 9 | package main 10 | 11 | func main() { 12 | print(-(1<<63), "\n") 13 | print((1<<63)-1, "\n") 14 | } 15 | -------------------------------------------------------------------------------- /test/syntax/semi1.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 | if x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined" 11 | { 12 | z // GCCGO_ERROR "undefined" 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/syntax/semi7.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 | if x { } // GCCGO_ERROR "undefined" 11 | else { } // ERROR "unexpected semicolon or newline before .?else.?" 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /misc/cgo/test/sleep_windows.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 | /* 8 | #include 9 | 10 | unsigned int sleep(unsigned int seconds) { 11 | Sleep(1000 * seconds); 12 | return 0; 13 | } 14 | 15 | */ 16 | import "C" 17 | -------------------------------------------------------------------------------- /src/pkg/bytes/asm_arm.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 | // no memchr implementation on arm yet 6 | TEXT ·IndexByte(SB),7,$0 7 | B ·indexBytePortable(SB) 8 | 9 | // no memcmp implementation on arm yet 10 | TEXT ·Equal(SB),7,$0 11 | B ·equalPortable(SB) 12 | -------------------------------------------------------------------------------- /src/pkg/math/abs_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 | // func Abs(x float64) float64 6 | TEXT ·Abs(SB),7,$0 7 | MOVQ $(1<<63), BX 8 | MOVQ BX, X0 // movsd $(-0.0), x0 9 | MOVSD x+0(FP), X1 10 | ANDNPD X1, X0 11 | MOVSD X0, r+8(FP) 12 | RET 13 | -------------------------------------------------------------------------------- /test/bench/shootout/meteor-contest.txt: -------------------------------------------------------------------------------- 1 | 2098 solutions found 2 | 3 | 0 0 0 0 1 4 | 2 2 2 0 1 5 | 2 6 6 1 1 6 | 2 6 1 5 5 7 | 8 6 5 5 5 8 | 8 6 3 3 3 9 | 4 8 8 9 3 10 | 4 4 8 9 3 11 | 4 7 4 7 9 12 | 7 7 7 9 9 13 | 14 | 9 9 9 9 8 15 | 9 6 6 8 5 16 | 6 6 8 8 5 17 | 6 8 2 5 5 18 | 7 7 7 2 5 19 | 7 4 7 2 0 20 | 1 4 2 2 0 21 | 1 4 4 0 3 22 | 1 4 0 0 3 23 | 1 1 3 3 3 24 | 25 | -------------------------------------------------------------------------------- /test/fixedbugs/bug176.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 | var x int 10 | 11 | var a = []int{ x: 1} // ERROR "constant" 12 | var b = [...]int{ x : 1} // ERROR "constant" 13 | var c = map[int]int{ x: 1} 14 | 15 | -------------------------------------------------------------------------------- /test/fixedbugs/bug367.dir/p.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 p 6 | 7 | type T struct{ x int } 8 | type S struct{} 9 | 10 | func (p *S) get() { 11 | } 12 | 13 | type I interface { 14 | get() 15 | } 16 | 17 | func F(i I) { 18 | i.get() 19 | } 20 | -------------------------------------------------------------------------------- /test/fixedbugs/bug383.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 2520 8 | 9 | package main 10 | func main() { 11 | if 2e9 { } // ERROR "2e.09|expected bool" 12 | if 3.14+1i { } // ERROR "3.14 . 1i|expected bool" 13 | } 14 | -------------------------------------------------------------------------------- /test/fixedbugs/bug404.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 | // The gccgo compiler would fail on the import statement. 6 | // two.go:10:13: error: use of undefined type ‘one.T2’ 7 | 8 | package two 9 | 10 | import "./one" 11 | 12 | var V one.T3 13 | -------------------------------------------------------------------------------- /test/fixedbugs/bug407.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 | var r one.T 14 | r.F() 15 | } 16 | -------------------------------------------------------------------------------- /test/safe/main.go: -------------------------------------------------------------------------------- 1 | // true 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 | // can't use local path with -u, use -I. instead 10 | import "pkg" // ERROR "import unsafe package" 11 | 12 | func main() { 13 | print(pkg.Float32bits(1.0)) 14 | } 15 | -------------------------------------------------------------------------------- /test/syntax/if.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 x() { 10 | } 11 | 12 | func main() { 13 | if { // ERROR "missing condition" 14 | } 15 | 16 | if x(); { // ERROR "missing condition" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/syntax/semi3.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 x; y; z // ERROR "unexpected semicolon or newline before .?{.?|undefined" 11 | { 12 | z // GCCGO_ERROR "undefined" 13 | 14 | 15 | -------------------------------------------------------------------------------- /doc/articles/wiki/htmlify.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 ( 8 | "io/ioutil" 9 | "os" 10 | "text/template" 11 | ) 12 | 13 | func main() { 14 | b, _ := ioutil.ReadAll(os.Stdin) 15 | template.HTMLEscape(os.Stdout, b) 16 | } 17 | -------------------------------------------------------------------------------- /misc/vim/ftplugin/go/godoc.vim: -------------------------------------------------------------------------------- 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 | " godoc.vim: Vim command to see godoc. 6 | 7 | if exists("b:did_ftplugin") 8 | finish 9 | endif 10 | 11 | silent! nmap K (godoc-keyword) 12 | 13 | " vim:ts=4:sw=4:et 14 | -------------------------------------------------------------------------------- /src/cmd/go/script: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | x() { 4 | echo '--- ' "$@" 5 | "$@" 6 | echo '---' 7 | echo 8 | } 9 | 10 | x go help 11 | x go help build 12 | x go help clean 13 | x go help install 14 | x go help fix 15 | x go help fmt 16 | x go help get 17 | x go help list 18 | x go help test 19 | x go help version 20 | x go help vet 21 | x go help gopath 22 | x go help importpath 23 | x go help remote 24 | -------------------------------------------------------------------------------- /src/pkg/exp/html/testdata/webkit/scripted/adoption01.dat: -------------------------------------------------------------------------------- 1 | #data 2 |

TEXT 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | |

9 | | 10 | | id="B" 11 | |