6 | See the Documents page for a complete list of Go articles.
7 |
8 |
--------------------------------------------------------------------------------
/misc/xcode/3/README:
--------------------------------------------------------------------------------
1 | This directory contains files for Go syntax highlighting in Xcode 3.x.
2 | See the comments in go.pbfilespec and go.xclangspec for installation
3 | instructions.
4 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/stdin2.input.gofmt:
--------------------------------------------------------------------------------
1 |
2 |
3 | var x int
4 |
5 | func f() {
6 | y := z
7 | /* this is a comment */
8 | // this is a comment too
9 | }
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj
--------------------------------------------------------------------------------
/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj
--------------------------------------------------------------------------------
/src/pkg/go/build/testdata/other/main.go:
--------------------------------------------------------------------------------
1 | // Test data - not compiled.
2 |
3 | package main
4 |
5 | import (
6 | "./file"
7 | )
8 |
9 | func main() {
10 | file.F()
11 | }
12 |
--------------------------------------------------------------------------------
/src/pkg/image/testdata/video-005.gray.q50.2x2.progressive.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/image/testdata/video-005.gray.q50.2x2.progressive.jpeg
--------------------------------------------------------------------------------
/src/pkg/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/polaris1119/go_src_comment/HEAD/src/pkg/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Go 语言源码阅读笔记 —— 为源代码添加中文注释
2 | ==============
3 |
4 | # 进度表(完成列表) #
5 |
6 | 1、源码安装 Go 的 shell 脚本 —— src/make.bash
7 |
8 | 2、linux-x86 平台程序的入口 —— src/pkg/runtime/rt0_linux_386.s
9 |
--------------------------------------------------------------------------------
/src/cmd/go/testdata/local/sub/sub.go:
--------------------------------------------------------------------------------
1 | package sub
2 |
3 | import (
4 | "fmt"
5 |
6 | subsub "./sub"
7 | )
8 |
9 | func Hello() {
10 | fmt.Println("sub.Hello")
11 | subsub.Hello()
12 | }
13 |
--------------------------------------------------------------------------------
/src/pkg/runtime/signals_windows.h:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4326.dir/q1.go:
--------------------------------------------------------------------------------
1 | package q1
2 |
3 | func Deref(typ interface{}) interface{} {
4 | if typ, ok := typ.(*int); ok {
5 | return *typ
6 | }
7 | return typ
8 | }
9 |
--------------------------------------------------------------------------------
/src/cmd/api/testdata/src/pkg/p3/p3.go:
--------------------------------------------------------------------------------
1 | package p3
2 |
3 | type ThirdBase struct{}
4 |
5 | func (tb *ThirdBase) GoodPlayer() (i, j, k int)
6 | func BadHop(i, j, k int) (l, m bool, n, o *ThirdBase, err error)
7 |
--------------------------------------------------------------------------------
/src/cmd/go/testdata/testimport/p_test.go:
--------------------------------------------------------------------------------
1 | package p
2 |
3 | import (
4 | "./p1"
5 |
6 | "testing"
7 | )
8 |
9 | func TestF(t *testing.T) {
10 | if F() != p1.F() {
11 | t.Fatal(F())
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/lib9/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../Make.dist
6 |
--------------------------------------------------------------------------------
/src/libbio/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../Make.dist
6 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4879.dir/b.go:
--------------------------------------------------------------------------------
1 | package b
2 |
3 | import "./a"
4 |
5 | func F() {
6 | a.MakePrivateCollection()
7 | a.MakePrivateCollection2()
8 | a.MakePrivateCollection3()
9 | }
10 |
--------------------------------------------------------------------------------
/include/plan9/mach.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "../mach.h"
6 |
--------------------------------------------------------------------------------
/src/cmd/5c/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/5g/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/5l/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/6c/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/6g/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/6l/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/8c/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/8g/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/8l/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/api/testdata/src/pkg/p3/golden.txt:
--------------------------------------------------------------------------------
1 | pkg p3, func BadHop(int, int, int) (bool, bool, *ThirdBase, *ThirdBase, error)
2 | pkg p3, method (*ThirdBase) GoodPlayer() (int, int, int)
3 | pkg p3, type ThirdBase struct
4 |
--------------------------------------------------------------------------------
/src/cmd/nm/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/cmd/pack/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/src/libmach/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../Make.dist
6 |
--------------------------------------------------------------------------------
/src/pkg/runtime/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2009 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4326.dir/q2.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "./q1"
4 |
5 | func main() {
6 | x := 1
7 | y := q1.Deref(&x)
8 | if y != 1 {
9 | panic("y != 1")
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/include/plan9/ureg_arm.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "/arm/include/ureg.h"
6 |
--------------------------------------------------------------------------------
/include/plan9/ureg_x86.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "/386/include/ureg.h"
6 |
--------------------------------------------------------------------------------
/src/cmd/api/testdata/src/pkg/p2/p2.go:
--------------------------------------------------------------------------------
1 | package p2
2 |
3 | type Twoer interface {
4 | PackageTwoMeth()
5 | }
6 |
7 | func F() string {}
8 | func G() Twoer {}
9 | func NewError(s string) error {}
10 |
--------------------------------------------------------------------------------
/src/pkg/math/exp_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Exp(SB),7,$0
6 | B ·exp(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/log_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Log(SB),7,$0
6 | B ·log(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/mod_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Mod(SB),7,$0
6 | B ·mod(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/tan_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Tan(SB),7,$0
6 | B ·tan(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/syscall/syscall_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package syscall
6 |
--------------------------------------------------------------------------------
/src/pkg/syscall/syscall_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package syscall
6 |
--------------------------------------------------------------------------------
/src/pkg/syscall/zerrors_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package syscall
6 |
--------------------------------------------------------------------------------
/src/pkg/syscall/zerrors_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package syscall
6 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug088.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug106.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug222.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug282.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug306.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | ignored
8 |
--------------------------------------------------------------------------------
/doc/articles/wiki/test_edit.good:
--------------------------------------------------------------------------------
1 |
Editing Test
2 |
3 |
7 |
--------------------------------------------------------------------------------
/include/plan9/ureg_amd64.h:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "/amd64/include/ureg.h"
6 |
--------------------------------------------------------------------------------
/misc/goplay/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2010 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | goplay: goplay.go
6 | go build goplay.go
7 |
--------------------------------------------------------------------------------
/src/cmd/api/testdata/src/pkg/p2/golden.txt:
--------------------------------------------------------------------------------
1 | pkg p2, func F() string
2 | pkg p2, func G() Twoer
3 | pkg p2, func NewError(string) error
4 | pkg p2, type Twoer interface { PackageTwoMeth }
5 | pkg p2, type Twoer interface, PackageTwoMeth()
6 |
--------------------------------------------------------------------------------
/src/pkg/math/atan_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Atan(SB),7,$0
6 | B ·atan(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/exp2_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Exp2(SB),7,$0
6 | B ·exp2(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/mod_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Mod(SB),7,$0
6 | JMP ·mod(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/modf_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Modf(SB),7,$0
6 | B ·modf(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/tan_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Tan(SB),7,$0
6 | JMP ·tan(SB)
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug160.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug392.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug396.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug404.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug407.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/src/pkg/math/atan2_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Atan2(SB),7,$0
6 | JMP ·atan2(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/atan2_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Atan2(SB),7,$0
6 | B ·atan2(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/atan_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Atan(SB),7,$0
6 | JMP ·atan(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/exp2_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Exp2(SB),7,$0
6 | JMP ·exp2(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/expm1_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Expm1(SB),7,$0
6 | JMP ·expm1(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/expm1_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Expm1(SB),7,$0
6 | B ·expm1(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/frexp_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Frexp(SB),7,$0
6 | JMP ·frexp(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/frexp_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Frexp(SB),7,$0
6 | B ·frexp(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/hypot_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Hypot(SB),7,$0
6 | B ·hypot(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/ldexp_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Ldexp(SB),7,$0
6 | JMP ·ldexp(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/ldexp_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Ldexp(SB),7,$0
6 | B ·ldexp(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/log1p_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Log1p(SB),7,$0
6 | JMP ·log1p(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/log1p_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Log1p(SB),7,$0
6 | B ·log1p(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/modf_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Modf(SB),7,$0
6 | JMP ·modf(SB)
7 |
--------------------------------------------------------------------------------
/src/pkg/math/sincos_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Sincos(SB),7,$0
6 | B ·sincos(SB)
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug083.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug133.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug448.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4510.dir/f2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p
6 |
7 | func fmt() {}
8 |
--------------------------------------------------------------------------------
/src/cmd/go/testdata/testimport/x_test.go:
--------------------------------------------------------------------------------
1 | package p_test
2 |
3 | import (
4 | . "../testimport"
5 |
6 | "./p2"
7 |
8 | "testing"
9 | )
10 |
11 | func TestF1(t *testing.T) {
12 | if F() != p2.F() {
13 | t.Fatal(F())
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/pkg/fmt/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package fmt
6 |
7 | var IsSpace = isSpace
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug106.dir/bug0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bug0
6 |
7 | const A = -1
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug222.dir/chanbug2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package Bar
6 | import _ "chanbug"
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug282.dir/p2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p2
6 |
7 | import _ "./p1"
8 |
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug306.dir/p2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p2
6 |
7 | import _ "./p1"
8 |
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4510.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ignored
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4932.dir/foo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package foo
6 |
7 | type Op struct{}
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5260.dir/a.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package a
6 |
7 | const BOM = "\uFEFF"
8 |
--------------------------------------------------------------------------------
/src/pkg/math/remainder_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Remainder(SB),7,$0
6 | B ·remainder(SB)
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug377.dir/two.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package two
6 |
7 | import _ "./one"
8 |
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug382.dir/pkg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pkg
6 | type T struct {}
7 | var E T
8 |
--------------------------------------------------------------------------------
/doc/progs/defer2.out:
--------------------------------------------------------------------------------
1 | Calling g.
2 | Printing in g 0
3 | Printing in g 1
4 | Printing in g 2
5 | Printing in g 3
6 | Panicking!
7 | Defer in g 3
8 | Defer in g 2
9 | Defer in g 1
10 | Defer in g 0
11 | Recovered in f 4
12 | Returned normally from f.
13 |
--------------------------------------------------------------------------------
/misc/chrome/gophertool/README.txt:
--------------------------------------------------------------------------------
1 | To install:
2 |
3 | 1) chrome://extensions/
4 | 2) click "[+] Developer Mode" in top right
5 | 3) "Load unpacked extension..."
6 | 4) pick $GOROOT/misc/chrome/gophertool
7 |
8 | Done. It'll now auto-reload from source.
9 |
--------------------------------------------------------------------------------
/src/pkg/math/remainder_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Remainder(SB),7,$0
6 | JMP ·remainder(SB)
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug063.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package bug063
8 | const c = 0 ^ 0
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug106.dir/bug1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bug1
6 |
7 | import _ "./bug0"
8 |
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug133.dir/bug0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bug0
6 |
7 | type T struct { i int }
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug468.dir/p1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p1
6 |
7 | type S struct { X, Y int }
8 |
--------------------------------------------------------------------------------
/doc/articles/wiki/edit.html:
--------------------------------------------------------------------------------
1 |
Editing {{.Title}}
2 |
3 |
7 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug050.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | func main() { // ERROR "package"
8 | }
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug160.dir/x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package x
6 |
7 | const Zero = 0.0
8 | const Ten = 10.0
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5105.dir/a.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package a
6 |
7 | var A = [2]string{"hello", "world"}
8 |
--------------------------------------------------------------------------------
/misc/notepadplus/README:
--------------------------------------------------------------------------------
1 | Given a Notepad++ installation at :
2 |
3 | 1. Add the contents of userDefineLang.xml at \userDefineLang.xml
4 | between ...
5 |
6 | 2. Copy go.xml to \plugins\APIs
7 |
8 | 3. Restart Notepad++
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug322.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test case for issue 1402.
8 | package ignored
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug460.dir/a.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package a
6 |
7 | type Foo struct {
8 | int
9 | }
10 |
--------------------------------------------------------------------------------
/doc/progs/eff_unused1.go:
--------------------------------------------------------------------------------
1 | // skip
2 |
3 | package main
4 |
5 | import (
6 | "fmt"
7 | "io"
8 | "log"
9 | "os"
10 | )
11 |
12 | func main() {
13 | fd, err := os.Open("test.go")
14 | if err != nil {
15 | log.Fatal(err)
16 | }
17 | // TODO: use fd.
18 | }
19 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug232.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package bug232
8 | type I interface { X(...int) }
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug335.dir/b.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package b
6 |
7 | import "./a"
8 |
9 | var Bar = a.Foo
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug335.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1705.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug377.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1802
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug382.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file
6 |
7 | // Issue 2529.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/method4.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test method expressions with arguments.
8 | package ignored
9 |
--------------------------------------------------------------------------------
/misc/cgo/test/backdoor/backdoor.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package backdoor
6 |
7 | func LockedOSThread() bool // in runtime.c
8 |
--------------------------------------------------------------------------------
/src/lib9/win.h:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | typedef unsigned short WinRune;
6 |
7 | WinRune* torune(char*);
8 | char *toutf(WinRune*);
9 |
--------------------------------------------------------------------------------
/src/pkg/os/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package os
6 |
7 | // Export for testing.
8 |
9 | var Atime = atime
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug282.dir/p1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p1
6 |
7 | type T struct {
8 | f func() "x"
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5291.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 5291: GC crash
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/import4.dir/empty.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package P
6 |
7 | import ( )
8 | const ( )
9 | var ( )
10 | type ( )
11 |
--------------------------------------------------------------------------------
/src/pkg/math/sin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Sin(SB),7,$0
6 | B ·sin(SB)
7 |
8 | TEXT ·Cos(SB),7,$0
9 | B ·cos(SB)
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug083.dir/bug0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bug0
6 |
7 | type t0 struct {
8 | }
9 |
10 | var V0 t0
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug306.dir/p1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p1
6 |
7 | type T <-chan int
8 | var x = make(chan T)
9 |
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug415.dir/prog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 | import "./p"
7 | func main() {}
8 | var _ p.A
9 |
10 |
--------------------------------------------------------------------------------
/src/pkg/go/doc/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2009 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | # Script to test heading detection heuristic
6 | headscan: headscan.go
7 | go build headscan.go
8 |
--------------------------------------------------------------------------------
/src/pkg/math/asin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Asin(SB),7,$0
6 | B ·asin(SB)
7 |
8 | TEXT ·Acos(SB),7,$0
9 | B ·acos(SB)
10 |
--------------------------------------------------------------------------------
/src/pkg/math/sin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Sin(SB),7,$0
6 | JMP ·sin(SB)
7 |
8 | TEXT ·Cos(SB),7,$0
9 | JMP ·cos(SB)
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug133.dir/bug1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bug1
6 |
7 | import "./bug0"
8 |
9 | type T struct { t bug0.T }
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug169.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 | var x = '''; // ERROR "char"
9 |
10 |
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug191.go:
--------------------------------------------------------------------------------
1 | // rundircmpout
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Tests bug with dot imports.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug224.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type T T // ERROR "recursive"
10 |
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5125.dir/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import _ "./bug"
8 |
9 | func main() {
10 | }
11 |
--------------------------------------------------------------------------------
/test/import2.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Tests that export data does not corrupt type syntax.
8 | package ignored
9 |
--------------------------------------------------------------------------------
/lib/godoc/error.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | {{html .}}
9 |
10 |
--------------------------------------------------------------------------------
/misc/dashboard/builder/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2009 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | builder: $(shell ls *.go)
6 | go build -o $@ $^
7 |
8 | clean:
9 | rm -f builder
10 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/crlf.golden:
--------------------------------------------------------------------------------
1 | /*
2 | Source containing CR/LF line endings.
3 | The gofmt'ed output must only have LF
4 | line endings.
5 | */
6 | package main
7 |
8 | func main() {
9 | // line comment
10 | println("hello, world!") // another line comment
11 | println()
12 | }
13 |
--------------------------------------------------------------------------------
/src/pkg/math/asin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Asin(SB),7,$0
6 | JMP ·asin(SB)
7 |
8 | TEXT ·Acos(SB),7,$0
9 | JMP ·acos(SB)
10 |
--------------------------------------------------------------------------------
/src/pkg/math/log10_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Log10(SB),7,$0
6 | B ·log10(SB)
7 |
8 | TEXT ·Log2(SB),7,$0
9 | B ·log2(SB)
10 |
--------------------------------------------------------------------------------
/src/pkg/mime/testdata/test.types:
--------------------------------------------------------------------------------
1 | # Copyright 2010 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 |
6 | # mime package test
7 | application/test t1 # Simple test
8 | text/test t2 # Text test
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug191.dir/b.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package b
6 |
7 | func init() {
8 | println("b");
9 | }
10 |
11 | type V int;
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug313.dir/b.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import . "fmt"
8 |
9 | func b() {
10 | Println()
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4932.dir/state2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package state2
6 |
7 | import "./state"
8 |
9 | type Foo *state.State
10 |
--------------------------------------------------------------------------------
/src/pkg/math/log10_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Log10(SB),7,$0
6 | JMP ·log10(SB)
7 |
8 | TEXT ·Log2(SB),7,$0
9 | JMP ·log2(SB)
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug191.dir/a.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package a
6 |
7 | func init() {
8 | println("a");
9 | }
10 |
11 | type T int;
12 |
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug233.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package bug233
8 | import p "fmt"
9 | var _ = p.Print
10 | var fmt = 10
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug377.dir/one.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package one
6 |
7 | func Foo() (n int64, _ *int) {
8 | return 42, nil
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug437.dir/two.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package two
6 |
7 | import "./one"
8 |
9 | type S2 struct {
10 | one.S1
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue3705.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package p
8 |
9 | func init() // ERROR "missing function body"
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5260.dir/b.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import "./a"
8 |
9 | func main() {
10 | _ = a.BOM
11 | }
12 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/crlf.input:
--------------------------------------------------------------------------------
1 | /*
2 | Source containing CR/LF line endings.
3 | The gofmt'ed output must only have LF
4 | line endings.
5 | */
6 | package main
7 |
8 | func main() {
9 | // line comment
10 | println("hello, world!") // another line comment
11 | println()
12 | }
13 |
--------------------------------------------------------------------------------
/src/pkg/crypto/md5/md5block_decl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64 386
6 |
7 | package md5
8 |
9 | func block(dig *digest, p []byte)
10 |
--------------------------------------------------------------------------------
/src/pkg/crypto/sha1/sha1block_decl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64 386
6 |
7 | package sha1
8 |
9 | func block(dig *digest, p []byte)
10 |
--------------------------------------------------------------------------------
/src/pkg/sort/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package sort
6 |
7 | func Heapsort(data Interface) {
8 | heapSort(data, 0, data.Len())
9 | }
10 |
--------------------------------------------------------------------------------
/src/pkg/syscall/asm_windows_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for 386, Windows are implemented in ../runtime/syscall_windows.goc
7 | //
8 |
--------------------------------------------------------------------------------
/test/ddd2.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test that variadic functions work across package boundaries.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4326.dir/p1.go:
--------------------------------------------------------------------------------
1 | package p1
2 |
3 | type O map[string]map[string]string
4 |
5 | func (opts O) RemoveOption(sect, opt string) bool {
6 | if _, ok := opts[sect]; !ok {
7 | return false
8 | }
9 | _, ok := opts[sect][opt]
10 | delete(opts[sect], opt)
11 | return ok
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4510.dir/f1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p
6 |
7 | import "fmt" // ERROR "fmt redeclared"
8 |
9 | var _ = fmt.Printf
10 |
--------------------------------------------------------------------------------
/src/pkg/go/doc/testdata/f.0.golden:
--------------------------------------------------------------------------------
1 | // The package f is a go/doc test for functions and factory ...
2 | PACKAGE f
3 |
4 | IMPORTPATH
5 | testdata/f
6 |
7 | FILENAMES
8 | testdata/f.go
9 |
10 | FUNCTIONS
11 | // Exported must always be visible. Was issue 2824.
12 | func Exported() private
13 |
14 |
--------------------------------------------------------------------------------
/src/pkg/go/doc/testdata/f.2.golden:
--------------------------------------------------------------------------------
1 | // The package f is a go/doc test for functions and factory ...
2 | PACKAGE f
3 |
4 | IMPORTPATH
5 | testdata/f
6 |
7 | FILENAMES
8 | testdata/f.go
9 |
10 | FUNCTIONS
11 | // Exported must always be visible. Was issue 2824.
12 | func Exported() private
13 |
14 |
--------------------------------------------------------------------------------
/src/pkg/syscall/asm_windows_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //
6 | // System calls for amd64, Windows are implemented in ../runtime/syscall_windows.goc
7 | //
8 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug163.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | x⊛y := 1; // ERROR "identifier"
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug174.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var x uint;
11 | println(1< "b"
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug472.dir/z.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import (
8 | _ "./p1"
9 | _ "./p2"
10 | )
11 |
12 | func main() {
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4517a.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package p
8 |
9 | var init = 1 // ERROR "cannot declare init - must be func"
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4517b.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package p
8 |
9 | const init = 1 // ERROR "cannot declare init - must be func"
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4517c.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package p
8 |
9 | type init byte // ERROR "cannot declare init - must be func"
10 |
--------------------------------------------------------------------------------
/test/interface/embed1.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test that embedded interface types can have local methods.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/misc/cgo/testso/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build ignore
6 |
7 | package main
8 |
9 | import "."
10 |
11 | func main() {
12 | cgosotest.Test()
13 | }
14 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/rewrite1.golden:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | type Bar int
8 |
9 | func main() {
10 | var a Bar
11 | println(a)
12 | }
13 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/rewrite1.input:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | type Foo int
8 |
9 | func main() {
10 | var a Foo
11 | println(a)
12 | }
13 |
--------------------------------------------------------------------------------
/src/pkg/net/dial_gen_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows plan9
6 |
7 | package net
8 |
9 | func init() {
10 | testingIssue5349 = true
11 | }
12 |
--------------------------------------------------------------------------------
/src/pkg/runtime/arch_amd64.h:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | enum {
6 | thechar = '6',
7 | BigEndian = 0,
8 | CacheLineSize = 64,
9 | appendCrossover = 16
10 | };
11 |
--------------------------------------------------------------------------------
/src/pkg/runtime/rt0_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // FreeBSD and Linux use the same linkage to main
6 |
7 | TEXT _rt0_arm_freebsd(SB),7,$-4
8 | B _rt0_arm(SB)
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug021.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | s1 := "hi";
11 | s2 := "ho";
12 | s1 += s2;
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug248.dir/bug0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package p
6 |
7 | type T struct {
8 | X, Y int
9 | }
10 |
11 | type I interface {
12 | M(T)
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug248.dir/bug1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package p
6 |
7 | type T struct {
8 | X, Y int
9 | }
10 |
11 | type I interface {
12 | M(T)
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug396.dir/one.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package one
6 |
7 | // Issue 2687
8 | type T struct { int }
9 |
10 | func New(i int) T { return T{i} }
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug415.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 2716. Export metadata error made main.go not compile.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue3783.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package foo
8 |
9 | var i int
10 |
11 | func (*i) bar() // ERROR "not a type"
12 |
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4326.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Printing local variables in inliner shadows global names.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4932.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4932: regression in export of composite literals.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/src/cmd/5a/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
7 | install: y.tab.h
8 |
9 | y.tab.h: a.y
10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y
11 |
--------------------------------------------------------------------------------
/src/cmd/6a/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
7 | install: y.tab.h
8 |
9 | y.tab.h: a.y
10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y
11 |
--------------------------------------------------------------------------------
/src/cmd/8a/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
7 | install: y.tab.h
8 |
9 | y.tab.h: a.y
10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y a.y
11 |
--------------------------------------------------------------------------------
/src/cmd/cc/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2012 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | include ../../Make.dist
6 |
7 | install: y.tab.h
8 |
9 | y.tab.h: cc.y
10 | LANG=C LANGUAGE=en_US.UTF8 bison -d -v -y cc.y
11 |
--------------------------------------------------------------------------------
/src/pkg/go/doc/testdata/a1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // comment 1
6 | package a
7 |
8 | //BUG(uid): bug1
9 |
10 | //TODO(uid): todo1
11 |
12 | //TODO(): ignored
13 |
--------------------------------------------------------------------------------
/src/pkg/math/sqrt_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // func Sqrt(x float64) float64
6 | TEXT ·Sqrt(SB),7,$0
7 | SQRTSD x+0(FP), X0
8 | MOVSD X0, ret+8(FP)
9 | RET
10 |
--------------------------------------------------------------------------------
/src/pkg/runtime/rt0_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // FreeBSD/NetBSD and Linux use the same linkage to main
6 |
7 | TEXT _rt0_arm_netbsd(SB),7,$-4
8 | B _rt0_arm(SB)
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug313.dir/a.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import "fmt"
8 |
9 | func a() {
10 | fmt.DoesNotExist() // ERROR "undefined"
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug414.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1743: test embedding of imported types with private methods.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/misc/cgo/test/issue4029w.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build windows
6 |
7 | package cgotest
8 |
9 | import "testing"
10 |
11 | func test4029(t *testing.T) {
12 | }
13 |
--------------------------------------------------------------------------------
/misc/chrome/gophertool/background.js:
--------------------------------------------------------------------------------
1 | chrome.omnibox.onInputEntered.addListener(function(t) {
2 | var url = urlForInput(t);
3 | if (url) {
4 | chrome.tabs.getSelected(null, function(tab) {
5 | if (!tab) return;
6 | chrome.tabs.update(tab.id, { "url": url, "selected": true });
7 | });
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/misc/dashboard/app/build/notify.txt:
--------------------------------------------------------------------------------
1 | Change {{shortHash .Commit.Hash}} broke the {{.Builder}} build:
2 | http://{{.Hostname}}/log/{{.Result.LogHash}}
3 |
4 | {{.Commit.Desc}}
5 |
6 | http://code.google.com/p/go/source/detail?r={{shortHash .Commit.Hash}}
7 |
8 | $ tail -200 < log
9 | {{printf "%s" .Log.Text | tail 200}}
10 |
--------------------------------------------------------------------------------
/test/dwarf/dwarf.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // See issue 2241 and issue 1878: dwarf include stack size
8 | // issues in linker.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug048.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | type M map[int] int;
11 | m1 := M{7 : 8};
12 | _ = m1;
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug077.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var exit int
11 | exit:
12 | _ = exit
13 | goto exit
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug182.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | x := 0;
11 | if x { // ERROR "x.*int|bool"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug448.dir/pkg1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pkg1
6 |
7 | var x = make(chan interface{})
8 |
9 | func Do() int {
10 | return (<-x).(int)
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5259.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 5259: Inlining of method value causes internal compiler error
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/safe/usesafe.go:
--------------------------------------------------------------------------------
1 | // $G $D/pkg.go && pack grcS pkg.a pkg.$A 2> /dev/null && rm pkg.$A && $G -I . -u $D/main.go
2 | // rm -f pkg.a
3 |
4 | // Copyright 2012 The Go Authors. All rights reserved.
5 | // Use of this source code is governed by a BSD-style
6 | // license that can be found in the LICENSE file.
7 |
8 | package ignored
9 |
--------------------------------------------------------------------------------
/test/syntax/import.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import (
10 | "io", // ERROR "unexpected comma"
11 | "os"
12 | )
13 |
14 |
15 |
--------------------------------------------------------------------------------
/misc/cgo/life/life.h:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | extern void Step(int, int, int *, int *);
6 | extern void DoStep(int, int, int, int, int, int, int *, int *);
7 | extern const int MYCONST;
8 |
--------------------------------------------------------------------------------
/src/pkg/go/build/syslist.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package build
6 |
7 | const goosList = "darwin freebsd linux netbsd openbsd plan9 windows "
8 | const goarchList = "386 amd64 arm "
9 |
--------------------------------------------------------------------------------
/src/pkg/math/dim_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Dim(SB),7,$0
6 | B ·dim(SB)
7 |
8 | TEXT ·Min(SB),7,$0
9 | B ·min(SB)
10 |
11 | TEXT ·Max(SB),7,$0
12 | B ·max(SB)
13 |
--------------------------------------------------------------------------------
/src/pkg/math/sqrt_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // func Sqrt(x float64) float64
6 | TEXT ·Sqrt(SB),7,$0
7 | FMOVD x+0(FP),F0
8 | FSQRT
9 | FMOVDP F0,ret+8(FP)
10 | RET
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug108.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 | func f() {
9 | v := 1 << 1025; // ERROR "overflow|stupid shift"
10 | _ = v
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug129.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package foo
8 | import "fmt"
9 |
10 | func f() {
11 | fmt.Println();
12 | fmt := 1;
13 | _ = fmt;
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug191.dir/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import . "./a"
8 | import . "./b"
9 |
10 | var _ T
11 | var _ V
12 |
13 | func main() {
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug318.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1411.
8 |
9 | package main
10 |
11 | const ui uint = 0
12 | const i int = ui // ERROR "type"
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug367.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1536: bug when handling imported interfaces with
8 | // private methods.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4370.dir/p3.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p3
6 |
7 | import "./p2"
8 |
9 | func F() {
10 | p2.F()
11 | var t p2.T
12 | println(t.T.M())
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4370.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Re-exporting inlined function bodies missed types in x, ok := v.(Type)
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/test/interface/recursive1.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Mutually recursive type definitions imported and used by recursive1.go.
8 |
9 | package ignored
10 |
--------------------------------------------------------------------------------
/src/cmd/go/mkdoc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright 2012 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | go install # So the next line will produce updated documentation.
7 | go help documentation > doc.go
8 | gofmt -w doc.go
9 |
10 |
--------------------------------------------------------------------------------
/src/cmd/yacc/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2009 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | units: yacc.go units.y
6 | go run yacc.go -p units_ units.y
7 | go build -o units y.go
8 |
9 | clean:
10 | rm -f y.go y.output units
11 |
--------------------------------------------------------------------------------
/src/pkg/math/dim_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Dim(SB),7,$0
6 | JMP ·dim(SB)
7 |
8 | TEXT ·Max(SB),7,$0
9 | JMP ·max(SB)
10 |
11 | TEXT ·Min(SB),7,$0
12 | JMP ·min(SB)
13 |
--------------------------------------------------------------------------------
/src/pkg/math/sqrt_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // func Sqrt(x float64) float64
6 | TEXT ·Sqrt(SB),7,$0
7 | MOVD x+0(FP),F0
8 | SQRTD F0,F0
9 | MOVD F0,ret+8(FP)
10 | RET
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug030.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var x int;
11 | x := 0; // ERROR "declar|:="
12 | _ = x;
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug172.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f() {
10 | a := true;
11 | a |= a; // ERROR "illegal.*OR|bool|expected"
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug222.dir/chanbug.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | package chanbug
6 | var C chan<- (chan int)
7 | var D chan<- func()
8 | var E func() chan int
9 | var F func() (func())
10 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug328.go:
--------------------------------------------------------------------------------
1 | // cmpout
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import "unsafe"
10 |
11 | func main() {
12 | var p unsafe.Pointer
13 | println(p)
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug376.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // issue 1951
8 | package foo
9 | import "unsafe"
10 | var v = unsafe.Sizeof // ERROR "must be called"
11 |
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug380.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Used to cause a typechecking loop error.
8 |
9 | package pkg
10 | type T map[int]string
11 | var q = &T{}
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug432.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // gccgo crashed compiling this.
8 |
9 | package p
10 |
11 | var v struct{ I }
12 |
13 | type I interface{}
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug465.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4230: inlining bug for composite literal in
8 | // if, for, switch statements.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4097.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package foo
8 |
9 | var s [][10]int
10 | const m = len(s[len(s)-1]) // ERROR "is not a constant"
11 |
12 |
--------------------------------------------------------------------------------
/test/safe/nousesafe.go:
--------------------------------------------------------------------------------
1 | // $G $D/pkg.go && pack grc pkg.a pkg.$A 2> /dev/null && rm pkg.$A && errchk $G -I . -u $D/main.go
2 | // rm -f pkg.a
3 |
4 | // Copyright 2012 The Go Authors. All rights reserved.
5 | // Use of this source code is governed by a BSD-style
6 | // license that can be found in the LICENSE file.
7 |
8 | package ignored
9 |
--------------------------------------------------------------------------------
/doc/articles/wiki/http-sample.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "net/http"
6 | )
7 |
8 | func handler(w http.ResponseWriter, r *http.Request) {
9 | fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
10 | }
11 |
12 | func main() {
13 | http.HandleFunc("/", handler)
14 | http.ListenAndServe(":8080", nil)
15 | }
16 |
--------------------------------------------------------------------------------
/misc/cgo/test/exports.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cgotest
6 |
7 | import "C"
8 |
9 | //export ReturnIntLong
10 | func ReturnIntLong() (int, C.long) {
11 | return 1, 2
12 | }
13 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/rewrite8.golden:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Check that literal type expression rewrites are accepted.
6 | // Was issue 4406.
7 |
8 | package p
9 |
10 | type T int
11 |
--------------------------------------------------------------------------------
/src/pkg/math/cmplx/conj.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cmplx
6 |
7 | // Conj returns the complex conjugate of x.
8 | func Conj(x complex128) complex128 { return complex(real(x), -imag(x)) }
9 |
--------------------------------------------------------------------------------
/src/pkg/math/floor_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Floor(SB),7,$0
6 | B ·floor(SB)
7 |
8 | TEXT ·Ceil(SB),7,$0
9 | B ·ceil(SB)
10 |
11 | TEXT ·Trunc(SB),7,$0
12 | B ·trunc(SB)
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug062.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var s string = nil; // ERROR "illegal|invalid|incompatible|cannot"
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug074.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | x := string{'a', 'b', '\n'}; // ERROR "composite"
11 | print(x);
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug115.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func isuint(i uint) { }
10 |
11 | func main() {
12 | i := ^uint(0);
13 | isuint(i);
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug192.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import "fmt" // GCCGO_ERROR "previous"
10 |
11 | var fmt int // ERROR "redecl|redefinition"
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug382.dir/prog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file
4 |
5 | // Issue 2529
6 |
7 | package main
8 |
9 | import "./pkg"
10 |
11 | var x = pkg.E
12 |
13 | var fo = struct{ F pkg.T }{F: x}
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug415.dir/p.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p
6 |
7 | type A struct {
8 | s struct{int}
9 | }
10 |
11 | func (a *A) f() {
12 | a.s = struct{int}{0}
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug445.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 3765
8 |
9 | package main
10 |
11 | func f(x uint) uint {
12 | m := ^(1 << x)
13 | return uint(m)
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug451.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type T x.T // ERROR "undefined|expected package"
10 |
11 | // bogus "invalid recursive type"
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug460.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // part one of issue 4124. Make sure that the compiler rejects access attempts.
8 |
9 | package ignored
10 |
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug472.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Linker would incorrectly parse export data and think
8 | // definitions are inconsistent.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5105.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 5105: linker segfaults on duplicate definition
8 | // of a type..hash.* function.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/syntax/semi5.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main()
10 | { // ERROR "unexpected semicolon or newline before .?{.?"
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/test/syntax/semi6.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type T // ERROR "unexpected semicolon or newline in type declaration"
10 | {
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/misc/cgo/testtls/tls_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !windows
6 |
7 | package cgotlstest
8 |
9 | import "testing"
10 |
11 | func TestTLS(t *testing.T) {
12 | testTLS(t)
13 | }
14 |
--------------------------------------------------------------------------------
/misc/swig/callback/callback.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package callback
6 |
7 | type GoCallback struct{}
8 |
9 | func (p *GoCallback) Run() string {
10 | return "GoCallback.Run"
11 | }
12 |
--------------------------------------------------------------------------------
/src/pkg/go/doc/testdata/f.1.golden:
--------------------------------------------------------------------------------
1 | // The package f is a go/doc test for functions and factory ...
2 | PACKAGE f
3 |
4 | IMPORTPATH
5 | testdata/f
6 |
7 | FILENAMES
8 | testdata/f.go
9 |
10 | TYPES
11 | //
12 | type private struct{}
13 |
14 | // Exported must always be visible. Was issue 2824.
15 | func Exported() private
16 |
17 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug039.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f (x int) { // GCCGO_ERROR "previous"
10 | var x int; // ERROR "redecl|redefinition"
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug171.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f() int { } // ERROR "return|control"
10 | func g() (foo int) { } // ERROR "return|control"
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug198.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 | func f(a T) T { return a } // ERROR "undefined"
9 | func main() {
10 | x := f(0);
11 | _ = x;
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug460.dir/b.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package b
6 |
7 | import "./a"
8 |
9 | var x a.Foo
10 |
11 | func main() {
12 | x.int = 20 // ERROR "unexported field"
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug466.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4159: exported inlinable functions squash
8 | // complex literals "a+bi" to "a+b".
9 |
10 | package ignored
11 |
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue3552.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 3552: cross-package inlining misbehaves when
8 | // referencing embedded builtins.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4590.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4590: linker fails on multiple imports of
8 | // an anonymous struct with methods.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4964.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4964: exported escape analysis result is not enough
8 | // for cross package analysis.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/helloworld.go:
--------------------------------------------------------------------------------
1 | // cmpout
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test that we can do page 1 of the C book.
8 |
9 | package main
10 |
11 | func main() {
12 | print("hello, world\n")
13 | }
14 |
--------------------------------------------------------------------------------
/test/syntax/composite.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | var a = []int{
10 | 3 // ERROR "need trailing comma before newline in composite literal"
11 | }
12 |
--------------------------------------------------------------------------------
/src/cmd/go/signal_notunix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build plan9 windows
6 |
7 | package main
8 |
9 | import (
10 | "os"
11 | )
12 |
13 | var signalsToIgnore = []os.Signal{os.Interrupt}
14 |
--------------------------------------------------------------------------------
/src/cmd/gofmt/testdata/rewrite8.input:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Check that literal type expression rewrites are accepted.
6 | // Was issue 4406.
7 |
8 | package p
9 |
10 | type T interface{}
11 |
--------------------------------------------------------------------------------
/src/pkg/sync/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package sync
6 |
7 | // Export for testing.
8 | var Runtime_Semacquire = runtime_Semacquire
9 | var Runtime_Semrelease = runtime_Semrelease
10 |
--------------------------------------------------------------------------------
/test/bench/shootout/regex-dna.txt:
--------------------------------------------------------------------------------
1 | agggtaaa|tttaccct 1
2 | [cgt]gggtaaa|tttaccc[acg] 0
3 | a[act]ggtaaa|tttacc[agt]t 0
4 | ag[act]gtaaa|tttac[agt]ct 0
5 | agg[act]taaa|ttta[agt]cct 1
6 | aggg[acg]aaa|ttt[cgt]ccct 0
7 | agggt[cgt]aa|tt[acg]accct 0
8 | agggta[cgt]a|t[acg]taccct 0
9 | agggtaa[cgt]|[acg]ttaccct 2
10 |
11 | 10245
12 | 10000
13 | 13348
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug002.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | if ; false {} // compiles; should be an error (should be simplevardecl before ;)
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug015.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var i33 int64;
11 | if i33 == (1<<64) -1 { // ERROR "overflow"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug040.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f (x, // GCCGO_ERROR "previous"
10 | x int) { // ERROR "duplicate argument|redefinition"
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug053.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var len int; // len should not be a keyword - this doesn't compile
11 | _ = len;
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug078.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func dosplit(wait chan int ){
10 | select {
11 | case <-wait:
12 | }
13 | }
14 |
15 | func main() {
16 | }
17 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug202.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 | func f() {
9 | v := [...]string{"a", "b"};
10 | _ = v;
11 | }
12 | func main() {
13 | f();
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug420.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1757.
8 | // gccgo failed to compile this.
9 |
10 | package main
11 |
12 | func main() {
13 | (_) = 0
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug426.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // gccgo crashed compiling this.
8 |
9 | package p
10 |
11 | type T *T
12 |
13 | func f(t T) {
14 | println(t, *t)
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4370.dir/p2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package p2
6 |
7 | import "./p1"
8 |
9 | type T struct {
10 | p1.T
11 | }
12 |
13 | func F() {
14 | var t T
15 | p1.F(&t.T)
16 | }
17 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4879.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 4879: export data misses the '&' for some
8 | // composite literals in inlined bodies.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/interface/private.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test that unexported methods are not visible outside the package.
8 | // Does not compile.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/rotate0.go:
--------------------------------------------------------------------------------
1 | // runoutput ./rotate.go
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of bit rotations.
8 | // The output is compiled and run.
9 |
10 | package main
11 |
12 | const mode = 0
13 |
--------------------------------------------------------------------------------
/test/rotate1.go:
--------------------------------------------------------------------------------
1 | // runoutput ./rotate.go
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of bit rotations.
8 | // The output is compiled and run.
9 |
10 | package main
11 |
12 | const mode = 1
13 |
--------------------------------------------------------------------------------
/test/rotate2.go:
--------------------------------------------------------------------------------
1 | // runoutput ./rotate.go
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of bit rotations.
8 | // The output is compiled and run.
9 |
10 | package main
11 |
12 | const mode = 2
13 |
--------------------------------------------------------------------------------
/test/rotate3.go:
--------------------------------------------------------------------------------
1 | // runoutput ./rotate.go
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of bit rotations.
8 | // The output is compiled and run.
9 |
10 | package main
11 |
12 | const mode = 3
13 |
--------------------------------------------------------------------------------
/misc/chrome/gophertool/background.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/pkg/net/cgo_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package net
6 |
7 | /*
8 | #include
9 | */
10 | import "C"
11 |
12 | func cgoAddrInfoFlags() C.int {
13 | return C.AI_CANONNAME
14 | }
15 |
--------------------------------------------------------------------------------
/src/pkg/net/cgo_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package net
6 |
7 | /*
8 | #include
9 | */
10 | import "C"
11 |
12 | func cgoAddrInfoFlags() C.int {
13 | return C.AI_CANONNAME
14 | }
15 |
--------------------------------------------------------------------------------
/test/bench/shootout/binary-tree.txt:
--------------------------------------------------------------------------------
1 | stretch tree of depth 16 check: -1
2 | 65536 trees of depth 4 check: -65536
3 | 16384 trees of depth 6 check: -16384
4 | 4096 trees of depth 8 check: -4096
5 | 1024 trees of depth 10 check: -1024
6 | 256 trees of depth 12 check: -256
7 | 64 trees of depth 14 check: -64
8 | long lived tree of depth 15 check: -1
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug051.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f() int {
10 | return 0;
11 | }
12 |
13 | func main() {
14 | const n = f(); // ERROR "const"
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug067.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | var c chan int
10 |
11 | func main() {
12 | c = make(chan int);
13 | go func() { c <- 0 } ();
14 | <-c
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug118.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package bug118
8 |
9 | func Send(c chan int) int {
10 | select {
11 | default:
12 | return 1;
13 | }
14 | return 2;
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug351.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | var x int
10 |
11 | func main() {
12 | (x) := 0 // ERROR "non-name [(]x[)]|non-name on left side"
13 | }
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug391.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 2576
8 | package bug
9 |
10 | type T struct { a int }
11 |
12 | func f(t T) {
13 | switch _, _ = t.a, t.a; {}
14 | }
--------------------------------------------------------------------------------
/test/fixedbugs/bug399.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 2674
8 |
9 | package main
10 | const dow = "\000\003"
11 |
12 | func main() {
13 | println(int(dow[1]))
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5125.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 5125: cyclic dependencies between types confuse
8 | // the hashability test during import.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5260.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2013 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 5260: Unicode BOM in exported string constant
8 | // cannot be read back during package import.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/golden.out:
--------------------------------------------------------------------------------
1 |
2 | == ./
3 |
4 | == ken/
5 |
6 | == chan/
7 |
8 | == interface/
9 |
10 | == syntax/
11 |
12 | == dwarf/
13 |
14 | == safe/
15 |
16 | == fixedbugs/
17 |
18 | =========== fixedbugs/bug429.go
19 | fatal error: all goroutines are asleep - deadlock!
20 |
21 | == bugs/
22 |
23 | =========== bugs/bug395.go
24 | bug395 is broken
25 |
--------------------------------------------------------------------------------
/test/syntax/forvar.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | for var x = 0; x < 10; x++ { // ERROR "var declaration not allowed in for initializer"
11 |
--------------------------------------------------------------------------------
/src/cmd/go/go11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.1
6 |
7 | package main
8 |
9 | // Test that go1.1 tag above is included in builds. main.go refers to this definition.
10 | const go11tag = true
11 |
--------------------------------------------------------------------------------
/src/pkg/math/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package math
6 |
7 | // Export internal functions for testing.
8 | var ExpGo = exp
9 | var Exp2Go = exp2
10 | var HypotGo = hypot
11 | var SqrtGo = sqrt
12 |
--------------------------------------------------------------------------------
/test/bench/shootout/regex-dna-parallel.txt:
--------------------------------------------------------------------------------
1 | agggtaaa|tttaccct 1
2 | [cgt]gggtaaa|tttaccc[acg] 0
3 | a[act]ggtaaa|tttacc[agt]t 0
4 | ag[act]gtaaa|tttac[agt]ct 0
5 | agg[act]taaa|ttta[agt]cct 1
6 | aggg[acg]aaa|ttt[cgt]ccct 0
7 | agggt[cgt]aa|tt[acg]accct 0
8 | agggta[cgt]a|t[acg]taccct 0
9 | agggtaa[cgt]|[acg]ttaccct 2
10 |
11 | 10245
12 | 10000
13 | 13348
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug131.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | const a uint64 = 10;
11 | var b int64 = a; // ERROR "convert|cannot|incompatible"
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug287.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Used to die dividing by zero; issue 879.
8 |
9 | package main
10 |
11 | var mult [3][...]byte = [3][5]byte{} // ERROR "\.\.\."
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug298.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package ddd
8 |
9 | func Sum() int
10 | for i := range []int{} { return i } // ERROR "statement outside function|expected"
11 |
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug322.dir/lib.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package lib
6 |
7 | type T struct {
8 | x int // non-exported field
9 | }
10 |
11 | func (t T) M() {
12 | }
13 |
14 | func (t *T) PM() {
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug394.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 2598
8 | package foo
9 |
10 | return nil // ERROR "non-declaration statement outside function body|expected declaration"
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug467.go:
--------------------------------------------------------------------------------
1 | // compiledir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Exported data for inlining could forget types of
8 | // local variables declared in inlinable bodies.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug468.go:
--------------------------------------------------------------------------------
1 | // rundir
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // The reflect package was not correctly checking field names
8 | // when checking for struct assignability.
9 |
10 | package ignored
11 |
--------------------------------------------------------------------------------
/test/syntax/interface.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type T interface {
10 | f, g () // ERROR "name list not allowed in interface type"
11 | }
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/misc/cgo/life/main.out:
--------------------------------------------------------------------------------
1 |
2 |
3 | XXX XXX
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | XXX XXX
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/pkg/log/syslog/syslog_plan9.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package syslog provides a simple interface to the system log service.
6 | package syslog
7 |
8 | // BUG(akumar): This package is not implemented on Plan 9 yet.
9 |
--------------------------------------------------------------------------------
/src/pkg/math/abs_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // func Abs(x float64) float64
6 | TEXT ·Abs(SB),7,$0
7 | FMOVD x+0(FP), F0 // F0=x
8 | FABS // F0=|x|
9 | FMOVDP F0, ret+8(FP)
10 | RET
11 |
--------------------------------------------------------------------------------
/src/pkg/math/abs_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | TEXT ·Abs(SB),7,$0
6 | MOVW x_lo+0(FP), R0
7 | MOVW x_hi+4(FP), R1
8 | AND $((1<<31)-1), R1
9 | MOVW R0, ret_lo+8(FP)
10 | MOVW R1, ret_hi+12(FP)
11 | RET
12 |
--------------------------------------------------------------------------------
/src/pkg/math/signbit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package math
6 |
7 | // Signbit returns true if x is negative or negative zero.
8 | func Signbit(x float64) bool {
9 | return Float64bits(x)&(1<<63) != 0
10 | }
11 |
--------------------------------------------------------------------------------
/test/bench/shootout/binary-tree-freelist.txt:
--------------------------------------------------------------------------------
1 | stretch tree of depth 16 check: -1
2 | 65536 trees of depth 4 check: -65536
3 | 16384 trees of depth 6 check: -16384
4 | 4096 trees of depth 8 check: -4096
5 | 1024 trees of depth 10 check: -1024
6 | 256 trees of depth 12 check: -256
7 | 64 trees of depth 14 check: -64
8 | long lived tree of depth 15 check: -1
9 |
--------------------------------------------------------------------------------
/test/eof.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Test a source file does not need a final newline.
8 | // Compiles but does not run.
9 |
10 | // No newline at the end of this file.
11 |
12 | package main
--------------------------------------------------------------------------------
/test/fixedbugs/bug122.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | // should allow at most 2 sizes
11 | a := make([]int, 10, 20, 30, 40); // ERROR "too many"
12 | }
13 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug123.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 | const ( F = 1 )
9 | func fn(i int) int {
10 | if i == F() { // ERROR "func"
11 | return 0
12 | }
13 | return 1
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug188.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | import "sort"
10 |
11 | func main() {
12 | sort.Sort(nil);
13 | var x int;
14 | sort(x); // ERROR "package"
15 | }
16 |
--------------------------------------------------------------------------------
/test/index0.go:
--------------------------------------------------------------------------------
1 | // runoutput ./index.go
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of index and slice bounds checks.
8 | // The output is compiled and run.
9 |
10 | package main
11 |
12 | const pass = 0
13 |
--------------------------------------------------------------------------------
/src/pkg/log/syslog/syslog_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package syslog provides a simple interface to the system log service.
6 | package syslog
7 |
8 | // BUG(brainman): This package is not implemented on Windows yet.
9 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug004.go:
--------------------------------------------------------------------------------
1 | // run
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | switch ; { case false: return; } // compiles; should be an error (should be simplevardecl before ;)
11 | }
12 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug235.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // used to crash the compiler
8 |
9 | package bug235
10 |
11 | type T struct {
12 | x [4]byte
13 | }
14 |
15 | var p *T
16 | var v = *p
17 |
18 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue5259.dir/main.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package main
6 |
7 | import "./bug"
8 |
9 | type foo int
10 |
11 | func (f *foo) Bar() {
12 | }
13 |
14 | func main() {
15 | bug.Foo(new(foo))
16 | }
17 |
--------------------------------------------------------------------------------
/test/import4.go:
--------------------------------------------------------------------------------
1 | // errorcheckdir
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Verify that various kinds of "imported and not used"
8 | // errors are caught by the compiler.
9 | // Does not compile.
10 |
11 | package ignored
12 |
--------------------------------------------------------------------------------
/test/index1.go:
--------------------------------------------------------------------------------
1 | // errorcheckoutput ./index.go
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of index and slice bounds checks.
8 | // The output is error checked.
9 |
10 | package main
11 |
12 | const pass = 1
13 |
--------------------------------------------------------------------------------
/test/index2.go:
--------------------------------------------------------------------------------
1 | // errorcheckoutput ./index.go
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Generate test of index and slice bounds checks.
8 | // The output is error checked.
9 |
10 | package main
11 |
12 | const pass = 2
13 |
--------------------------------------------------------------------------------
/test/syntax/semi2.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | switch x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined"
11 | {
12 | z
13 |
14 |
15 |
--------------------------------------------------------------------------------
/test/syntax/typesw.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | switch main() := interface{}(nil).(type) { // ERROR "invalid variable name"
11 | default:
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/misc/cgo/stdio/hello.go:
--------------------------------------------------------------------------------
1 | // cmpout
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // +build ignore
8 |
9 | package main
10 |
11 | import "../stdio"
12 |
13 | func main() {
14 | stdio.Stdout.WriteString(stdio.Greeting + "\n")
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug103.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f() /* no return type */ {}
10 |
11 | func main() {
12 | x := f(); // ERROR "mismatch|as value|no type"
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug145.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type t int
10 |
11 | func main() {
12 | t := 0;
13 | _ = t;
14 | }
15 |
16 | /*
17 | bug145.go:8: t is type, not var
18 | */
19 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug175.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func f() (int, bool) { return 0, true }
10 |
11 | func main() {
12 | x, y := f(), 2; // ERROR "multi"
13 | _, _ = x, y
14 | }
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug280.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // http://code.google.com/p/go/issues/detail?id=808
8 |
9 | package main
10 |
11 | type A [...]int // ERROR "outside of array literal"
12 |
13 |
14 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug345.dir/io.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package io
6 |
7 | type Writer interface {
8 | WrongWrite()
9 | }
10 |
11 | type SectionReader struct {
12 | X int
13 | }
14 |
15 | func SR(*SectionReader) {}
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug437.dir/one.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package one
6 |
7 | type I1 interface {
8 | f()
9 | }
10 |
11 | type S1 struct {
12 | }
13 |
14 | func (s S1) f() {
15 | }
16 |
17 | func F1(i1 I1) {
18 | }
19 |
--------------------------------------------------------------------------------
/test/syntax/else.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2011 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | if true {
11 | } else ; // ERROR "else must be followed by if or statement block|expected .if. or .{."
12 | }
13 |
--------------------------------------------------------------------------------
/test/syntax/vareq.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | func main() {
10 | var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or '}' or newline"
11 |
--------------------------------------------------------------------------------
/misc/cgo/testso/test.bash:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright 2011 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | set -e
7 | $(go env CC) $(go env GOGCCFLAGS) -shared -o libcgosotest.so cgoso_c.c
8 | go build main.go
9 | LD_LIBRARY_PATH=. ./main
10 | rm -f libcgosotest.so main
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug081.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | const x x = 2 // ERROR "loop|type"
10 |
11 | /*
12 | bug081.go:3: first constant must evaluate an expression
13 | Bus error
14 | */
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug165.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | type I interface {
10 | m(map[I] bool); // ok
11 | }
12 |
13 | type S struct {
14 | m map[S] bool; // ERROR "map key type"
15 | }
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug186.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | const X = iota
10 |
11 | func f(x int) { }
12 |
13 | func main() {
14 | f(X);
15 | f(iota); // ERROR "iota"
16 | f(X);
17 | }
18 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug419.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | // Issue 1811.
8 | // gccgo failed to compile this.
9 |
10 | package p
11 |
12 | type E interface{}
13 |
14 | type I interface {
15 | E
16 | E
17 | }
18 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug448.dir/pkg2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Issue 3843: inlining bug due to wrong receive operator precedence.
6 |
7 | package pkg2
8 |
9 | import "./pkg1"
10 |
11 | func F() {
12 | pkg1.Do()
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/test/fixedbugs/issue4429.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2012 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package p
8 |
9 | type a struct {
10 | a int
11 | }
12 |
13 | func main() {
14 | av := a{};
15 | *a(av); // ERROR "invalid indirect"
16 | }
17 |
--------------------------------------------------------------------------------
/test/syntax/vareq1.go:
--------------------------------------------------------------------------------
1 | // errorcheck
2 |
3 | // Copyright 2010 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or newline after top level declaration"
10 |
11 |
--------------------------------------------------------------------------------
/misc/cgo/test/issue4273.c:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #ifdef __ELF__
6 | __attribute__((weak))
7 | __attribute__((visibility("hidden")))
8 | void _compilerrt_abort_impl(const char *file, int line, const char *func) {
9 | }
10 | #endif
11 |
--------------------------------------------------------------------------------
/misc/cgo/testso/cgoso.c:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "_cgo_export.h"
6 |
7 | #ifdef WIN32
8 | extern void setCallback(void *);
9 | void init() {
10 | setCallback(goCallback);
11 | }
12 | #else
13 | void init() {}
14 | #endif
15 |
--------------------------------------------------------------------------------
/misc/cgo/testtls/tls_unix.c:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include
6 |
7 | static __thread int tls;
8 |
9 | void
10 | setTLS(int v)
11 | {
12 | tls = v;
13 | }
14 |
15 | int
16 | getTLS()
17 | {
18 | return tls;
19 | }
20 |
--------------------------------------------------------------------------------
/src/pkg/net/empty.c:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // This file is required to prevent compiler errors
6 | // when the package built with CGO_ENABLED=0.
7 | // Otherwise the compiler says:
8 | // pkg/net/fd_poll_runtime.go:15: missing function body
9 |
--------------------------------------------------------------------------------
/src/pkg/runtime/cgo/setenv.c:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin freebsd linux netbsd openbsd
6 |
7 | #pragma cgo_import_static x_cgo_setenv
8 |
9 | void x_cgo_setenv(char**);
10 | void (*_cgo_setenv)(char**) = x_cgo_setenv;
11 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug164.go:
--------------------------------------------------------------------------------
1 | // compile
2 |
3 | // Copyright 2009 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package main
8 |
9 | // Multi-line string literal now allowed.
10 |
11 | const s = `
12 | Hello, World!
13 | `
14 |
15 | func main() {
16 | print(s)
17 | }
18 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug369.dir/pkg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pkg
6 |
7 | func NonASCII(b []byte, i int) int {
8 | for i = 0; i < len(b); i++ {
9 | if b[i] >= 0x80 {
10 | break
11 | }
12 | }
13 | return i
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/test/fixedbugs/bug396.dir/two.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Use the functions in one.go so that the inlined
6 | // forms get type-checked.
7 |
8 | package two
9 |
10 | import "./one"
11 |
12 | func use() {
13 | _ = one.New(1)
14 | }
--------------------------------------------------------------------------------