Answers for "buffered channels golang"

Go
0

Buffered channels in golang

package main

import "fmt"

func main() {
  message := greetMe("world")
  fmt.Println(message)
}

func greetMe(name string) string {
  return "Hello, " + name + "!"
}
Posted by: Guest on December-29-2021
0

Buffered channels in golang

ch := make(chan int, 2)
ch <- 1
ch <- 2
ch <- 3
// fatal error:
// all goroutines are asleep - deadlock!
Posted by: Guest on December-29-2021
0

Buffered channels in golang

var msg string
msg = "Hello"
Posted by: Guest on December-29-2021

Browse Popular Code Answers by Language