Which keyword is used to create a goroutine in Go?
- go
- gor
- goroutine
- gr
The correct keyword to create a goroutine in Go is 'go'. When 'go' keyword is used in front of a function call, it instructs Go runtime to execute that function concurrently as a goroutine.
Loading...
Related Quiz
- How can you specify the output file name when using the go build command?
- What are lightweight threads called in Go?
- The _______ function is used to register a handler function for a specific HTTP pattern.
- The json.Marshal function in Go returns a ________ and an error.
- Describe how to close a channel and why it's important.