Original post

package main

import (
“fmt”
“sync”
)

var wg sync.WaitGroup

func main() {
wg.Add(2)

go func(){
        fmt.Println("Hello form one")
        wg.Done()
}()

go func(){
        fmt.Println("Hello form two")
        wg.Done()
}()

wg.Wait()

}

by running the following program.
Why does “Hello form two” prints first the “Hello from one”.