Black Lives Matter. Support the Equal Justice Initiative.

Source file src/go/internal/gcimporter/testdata/exports.go

Documentation: go/internal/gcimporter/testdata

     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  // This file is used to generate an object file which
     6  // serves as test file for gcimporter_test.go.
     7  
     8  package exports
     9  
    10  import "go/ast"
    11  
    12  // Issue 3682: Correctly read dotted identifiers from export data.
    13  const init1 = 0
    14  
    15  func init() {}
    16  
    17  const (
    18  	C0 int = 0
    19  	C1     = 3.14159265
    20  	C2     = 2.718281828i
    21  	C3     = -123.456e-789
    22  	C4     = +123.456e+789
    23  	C5     = 1234i
    24  	C6     = "foo\n"
    25  	C7     = `bar\n`
    26  )
    27  
    28  type (
    29  	T1  int
    30  	T2  [10]int
    31  	T3  []int
    32  	T4  *int
    33  	T5  chan int
    34  	T6a chan<- int
    35  	T6b chan (<-chan int)
    36  	T6c chan<- (chan int)
    37  	T7  <-chan *ast.File
    38  	T8  struct{}
    39  	T9  struct {
    40  		a    int
    41  		b, c float32
    42  		d    []string `go:"tag"`
    43  	}
    44  	T10 struct {
    45  		T8
    46  		T9
    47  		_ *T10
    48  	}
    49  	T11 map[int]string
    50  	T12 interface{}
    51  	T13 interface {
    52  		m1()
    53  		m2(int) float32
    54  	}
    55  	T14 interface {
    56  		T12
    57  		T13
    58  		m3(x ...struct{}) []T9
    59  	}
    60  	T15 func()
    61  	T16 func(int)
    62  	T17 func(x int)
    63  	T18 func() float32
    64  	T19 func() (x float32)
    65  	T20 func(...interface{})
    66  	T21 struct{ next *T21 }
    67  	T22 struct{ link *T23 }
    68  	T23 struct{ link *T22 }
    69  	T24 *T24
    70  	T25 *T26
    71  	T26 *T27
    72  	T27 *T25
    73  	T28 func(T28) T28
    74  )
    75  
    76  var (
    77  	V0 int
    78  	V1         = -991.0
    79  	V2 float32 = 1.2
    80  )
    81  
    82  func F1()         {}
    83  func F2(x int)    {}
    84  func F3() int     { return 0 }
    85  func F4() float32 { return 0 }
    86  func F5(a, b, c int, u, v, w struct{ x, y T1 }, more ...interface{}) (p, q, r chan<- T10)
    87  
    88  func (p *T1) M1()
    89  

View as plain text