Not sure where you read that. Anything can be sent on a channel. Even channels can be sent over channels. That's often used when one goroutine needs to reply to a message from another goroutine.
ne 30. 6. 2019 o 18:31 Sathish VJ <sathis...@gmail.com> napĂsal(a): > I thought I read somewhere that functions cannot be sent on channels. But > I tried it out and it can be. Play link: > https://play.golang.org/p/OeLpQsNwnCn > > So, is there anything that cannot be sent on channels? > > -- > 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/608c41d5-a226-4d77-a8fc-c4563d69f5db%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/608c41d5-a226-4d77-a8fc-c4563d69f5db%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAO6k0uuhmC6ryBnQp4kb3pG94Ly5o5r0ktVfCseeXK4_kZ91aA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.