Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. func CallerMethod() {
  2. events := make(chan string)
  3. go func() {
  4. Callee(events)
  5. }()
  6. select {
  7. case msg := <-events:
  8. fmt.Println(msg)
  9. }
  10. }
  11.  
  12. func Callee(events chan string) {
  13. events <- "hello"
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement