Skip to content

aaddss111/go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

package main

import ( "fmt" "strconv" )

func main() { numChannel := make(chan int) strChannel := make(chan string)

go func() {
	for i := 0; i < 10; i++ {
		numChannel <- i
	}
	close(numChannel)
}()

for i := 0; i < 10; i++ {
	go func() {
		for num := range numChannel {
			strChannel <- strconv.Itoa(num)
		}
	}()
}

for i := 0; i < 10; i++ {
	str := <-strChannel
	fmt.Println(str)
}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages