]> Cypherpunks.ru repositories - gostls13.git/blob - misc/cgo/testplugin/testdata/issue24351/main.go
4107adff7b476cb69db6e58ef00c774bb91fe576
[gostls13.git] / misc / cgo / testplugin / testdata / issue24351 / main.go
1 // Copyright 2018 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 "plugin"
8
9 func main() {
10         p, err := plugin.Open("issue24351.so")
11         if err != nil {
12                 panic(err)
13         }
14         f, err := p.Lookup("B")
15         if err != nil {
16                 panic(err)
17         }
18         c := make(chan bool)
19         f.(func(chan bool))(c)
20         <-c
21 }