Skip to content

Instantly share code, notes, and snippets.

@piEsposito
Created February 13, 2020 17:26
Show Gist options
  • Save piEsposito/2585efb91e28fd0c1d06263e22da9180 to your computer and use it in GitHub Desktop.
Save piEsposito/2585efb91e28fd0c1d06263e22da9180 to your computer and use it in GitHub Desktop.
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