github.com/MangoDowner/go-gm@v0.0.0-20180818020936-8baa2bd4408c/misc/cgo/testplugin/unnamed1.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     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  // // No C code required.
     8  import "C"
     9  
    10  func FuncInt() int { return 1 }
    11  
    12  // Add a recursive type to to check that type equality across plugins doesn't
    13  // crash. See https://golang.org/issues/19258
    14  func FuncRecursive() X { return X{} }
    15  
    16  type Y struct {
    17  	X *X
    18  }
    19  type X struct {
    20  	Y Y
    21  }
    22  
    23  func main() {}