A goroutine is a lightweight thread managed by the Go runtime. You start it with the `go` keyword.
package main import ( "fmt" "time" ) func work(name string) { fmt.Println("start:", name) time.Sleep(200 * time.Millisecond) fmt.Println("done:", name) } func main() { go work("A") go work("B") time.Sleep(500 * time.Millisecond) // demo: wait a bit }