Last active
December 29, 2015 22:49
-
-
Save jsgoecke/7738466 to your computer and use it in GitHub Desktop.
Revisions
-
jsgoecke revised this gist
Dec 2, 2013 . 1 changed file with 7 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,13 @@ package main import "fmt" func hello(ch chan string) { ch <- "Hello world!" } func main() { ch := make(chan string) go hello(ch) fmt.Println(<-ch) } -
jsgoecke revised this gist
Dec 1, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package main import "fmt" func hello(channel chan string) { channel <- "Hello world!\n" } func main() { channel := make(chan string) go hello(channel) response := <- channel fmt.Printf(response) } -
jsgoecke created this gist
Dec 1, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ package main import "fmt" func helloWorld(channel chan string) { channel <- "Hello world!\n" } func main() { channel := make(chan string) go helloWorld(channel) response := <- channel fmt.Printf(response) } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ go run hello_world.go Hello world!