libgo/misc/cgo/testplugin/testdata/sub/plugin1/plugin1.go
raw| 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 | import "testplugin/common" |
| 11 | |
| 12 | func F() int { return 17 } |
| 13 | |
| 14 | var FuncVar = func() {} |
| 15 | |
| 16 | func ReadCommonX() int { |
| 17 | FuncVar() |
| 18 | return common.X |
| 19 | } |
| 20 | |
| 21 | func main() { |
| 22 | panic("plugin1.main called") |
| 23 | } |