A method to implement Concurrency or Parallelism in Golang. Makes use of:
Boilerplate
func main(){
var wg sync.WaitGroup
wg.add(1)
go func(){
defer wg.Done() // when this function exits, set the waitgroup as done
// body of function
}()
wg.Wait() // wait till all waitgroups are done
fmt.Println("Done")
}