Created
February 13, 2020 17:26
-
-
Save piEsposito/2585efb91e28fd0c1d06263e22da9180 to your computer and use it in GitHub Desktop.
This file contains 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 characters
package main | |
import ( | |
"fmt" | |
) | |
func hello() { | |
fmt.Println("Hello world goroutine") | |
} | |
func main() { | |
// para rodar uma função como goroutine, basta escrever go antes de chama-la | |
go hello() | |
fmt.Println("main function") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment