Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func CallerMethod() {
- events := make(chan string)
- go func() {
- Callee(events)
- }()
- select {
- case msg := <-events:
- fmt.Println(msg)
- }
- }
- func Callee(events chan string) {
- events <- "hello"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement