Thank you Kurtis. It was a great help.

 

Sent from Mail for Windows 10

 

From: Kurtis Rader
Sent: 03 August 2020 10:40
To: Anjana Prabhakar
Cc: golang-nuts
Subject: Re: [go-nuts] golan operator

 

On Sun, Aug 2, 2020 at 9:56 PM Anjana Prabhakar <prabhakar.anj...@gmail.com> wrote:

Dear All,

 

Can someone help me understand the syntax

a <- b
b := <-a

 

The "<-" operator is the channel receive operator. See https://golang.org/ref/spec#Channel_types and https://golang.org/ref/spec#Receive_operator. Those statements are retrieving the next value from a channel and assigning it to a variable. I recommend working through every example at https://tour.golang.org/. That is the easiest, quickest, way to gain a basic understanding of the Go language. Your question is addressed by the concurrency section of the tour: https://tour.golang.org/concurrency/1.

 

--

Kurtis Rader

Caretaker of the exceptional canines Junior and Hank

 

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/DCE1DCE6-6418-4EDA-97E6-22E49F458CD5%40hxcore.ol.

Reply via email to