使用相同功能的通道发送和接收

How can I make a channel 2-way (I don't know if this is right term) in the same function. If I have the following code, then:

func server (a <-chan string) {
    data:= <-a
    // now is there a way I can send data through the same channel
    // data <- "yet another string"
}  

Is there anyother way of implementing this ? Appreciate any help.

In the code referred above, the directional pointer with channel restricts the function to do any other activity on that channel instead of the one that is allowed. So, make it:

func server (a chan string) {

instead of

func server (a <-chan string) {

will allow the function to send as well as receive data through the same channel.