Go: Goroutines

Create a Goroutine

Syntax:

func name(){
// statements
}

// using go keyword as the 
// prefix of your function call
go name()

Anonymous Goroutine

Syntax:

// Anonymous function call
go func (parameter_list){
// statement
}(arguments)

Leave a Reply

Your email address will not be published. Required fields are marked *