Programming Code Center(PCC)
[GO]

(PCC)::[How-to-send-ping-to-the-messages-channel-using-chan-in-go-language]::[go]

File Name : channels.go

package main

import "fmt"

func main() {

    messages := make(chan string)

    go func() { messages <- "ping" }()

    msg := <-messages
    fmt.Println(msg)
}

Output :

channels.jpg