github.com/corona10/go@v0.0.0-20180224231303-7a218942be57/misc/cgo/testplugin/unnamed1/main.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() {}